- All Known Implementing Classes:
AbstractConstraintSet,MetaConstraintSet,ScopedConstraintSet
public interface IConstraintSet
A set of constraints targeted at the contents of a Metaschema module.
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyConstraintsForModule(IModuleNodeItem moduleItem, IModelElementVisitor<ITargetedConstraints, Void> visitor) Apply the constraints associated with this constraint set to the provided module, if applicable.Collection<? extends IConstraintSet>Get constraint sets imported by this constraint set.Get information about where the constraint set was sourced from.
-
Method Details
-
getSource
Get information about where the constraint set was sourced from.- Returns:
- the source information
-
getImportedConstraintSets
Get constraint sets imported by this constraint set.- Returns:
- the imported constraint sets
-
applyConstraintsForModule
void applyConstraintsForModule(@NonNull IModuleNodeItem moduleItem, @NonNull IModelElementVisitor<ITargetedConstraints, Void> visitor) Apply the constraints associated with this constraint set to the provided module, if applicable.Callers of this method are required to track which definitions have been previously targeted based on the result of this method and to provide these to subsequent calls of this method targeting different modules. This approach ensures that a given constraint is not applied more than once.
- Parameters:
moduleItem- the module node item to apply applicable constraints tovisitor- the visitor used to apply constraints to target definitions
-