org.apache.sling.validation.impl.model

## Class MergedValidationModel

- java.lang.Object
- - org.apache.sling.validation.impl.model.MergedValidationModel

All Implemented Interfaces:
  org.apache.sling.validation.model.ValidationModel

    public class MergedValidationModel
    extends Object
    implements org.apache.sling.validation.model.ValidationModel

Generates a merged validation model out of one base `ValidationModel` and 1 or more models to merge. The resource properties and children are basically concatenated with the exception that if a resource property/child with the same name is already defined in the baseModel it is not added again. That way you can overwrite and even remove validation rules from the model to merge.

### Constructor Summary

Constructors
Constructor and Description
`MergedValidationModel(org.apache.sling.validation.model.ValidationModel baseModel, org.apache.sling.validation.model.ValidationModel... modelsToMerge)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Collection<String>` `getApplicablePaths()`
`Collection<org.apache.sling.validation.model.ChildResource>` `getChildren()`
`Collection<org.apache.sling.validation.model.ResourceProperty>` `getResourceProperties()`
`String` `getSource()`
`String` `getValidatingResourceType()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MergedValidationModel

    public MergedValidationModel(org.apache.sling.validation.model.ValidationModel baseModel,
                                 org.apache.sling.validation.model.ValidationModel... modelsToMerge)

### Method Detail

#### getResourceProperties

    @Nonnull
    public Collection<org.apache.sling.validation.model.ResourceProperty> getResourceProperties()

Specified by:
  `getResourceProperties` in interface `org.apache.sling.validation.model.ValidationModel`

#### getValidatingResourceType

    @Nonnull
    public String getValidatingResourceType()

Specified by:
  `getValidatingResourceType` in interface `org.apache.sling.validation.model.ValidationModel`

#### getApplicablePaths

    @Nonnull
    public Collection<String> getApplicablePaths()

Specified by:
  `getApplicablePaths` in interface `org.apache.sling.validation.model.ValidationModel`

#### getChildren

    @Nonnull
    public Collection<org.apache.sling.validation.model.ChildResource> getChildren()

Specified by:
  `getChildren` in interface `org.apache.sling.validation.model.ValidationModel`

#### getSource

    @Nonnull
    public String getSource()

Specified by:
  `getSource` in interface `org.apache.sling.validation.model.ValidationModel`