- All Known Subinterfaces:
IAssemblyDefinition,IBindingDefinitionModel,IBindingDefinitionModelAssembly,IBoundDefinition,IBoundDefinitionFlag,IBoundDefinitionModel<ITEM>,IBoundDefinitionModelAssembly,IBoundDefinitionModelComplex,IBoundDefinitionModelField<ITEM>,IBoundDefinitionModelFieldComplex,IBoundInstanceFlag,IBoundInstanceModelFieldScalar,IDefinition,IFeatureContainerFlag<FI>,IFeatureDefinitionInstanceInlined<DEFINITION,,INSTANCE> IFeatureModelConstrained,IFeatureValueConstrained,IFieldDefinition,IFlagDefinition,IModelConstrained,IModelDefinition,ITargetedConstraints,IValuedDefinition
- All Known Implementing Classes:
AbstractGlobalAssemblyDefinition,AbstractGlobalDefinition,AbstractGlobalFieldDefinition,AbstractGlobalFlagDefinition,AbstractInlineAssemblyDefinition,AbstractInlineFieldDefinition,AbstractInlineFlagDefinition,AbstractTargetedConstraints,AssemblyConstraintSet,AssemblyTargetedConstraints,FieldTargetedConstraints,FlagTargetedConstraints,ModelTargetedConstraints,ValueConstraintSet
public interface IValueConstrained
Represents a container of rules constraining the effective model of a
Metaschema field or flag data instance.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddConstraint(IAllowedValuesConstraint constraint) Add a new constraint.voidaddConstraint(IExpectConstraint constraint) Add a new constraint.voidaddConstraint(IIndexHasKeyConstraint constraint) Add a new constraint.voidaddConstraint(IMatchesConstraint constraint) Add a new constraint.voidaddConstraint(IReportConstraint constraint) Add a new constraint.addLetExpression(ILet let) Add a new let expression.List<? extends IAllowedValuesConstraint>Get the collection of allowed value constraints, if any.List<? extends IConstraint>Retrieve the ordered collection of constraints.List<? extends IExpectConstraint>Get the collection of expect constraints, if any.List<? extends IIndexHasKeyConstraint>Get the collection of index key reference constraints, if any.Get the collection of let expressions, if any.List<? extends IMatchesConstraint>Get the collection of matches constraints, if any.List<? extends IReportConstraint>Get the collection of report constraints, if any.Get information about the resource the constraints were loaded from.
-
Method Details
-
getSource
Get information about the resource the constraints were loaded from.- Returns:
- the source information
-
getConstraints
Retrieve the ordered collection of constraints.- Returns:
- the constraints or an empty list
-
getLetExpressions
Get the collection of let expressions, if any.- Returns:
- the constraints or an empty list
-
getAllowedValuesConstraints
Get the collection of allowed value constraints, if any.- Returns:
- the constraints or an empty list
-
getMatchesConstraints
Get the collection of matches constraints, if any.- Returns:
- the constraints or an empty list
-
getIndexHasKeyConstraints
Get the collection of index key reference constraints, if any.- Returns:
- the constraints or an empty list
-
getExpectConstraints
Get the collection of expect constraints, if any.- Returns:
- the constraints or an empty list
-
getReportConstraints
Get the collection of report constraints, if any.- Returns:
- the constraints or an empty list
-
addLetExpression
Add a new let expression.- Parameters:
let- the let statement to add- Returns:
- the original let with the same name or
nullif no let existed with the same name
-
addConstraint
Add a new constraint.- Parameters:
constraint- the constraint to add
-
addConstraint
Add a new constraint.- Parameters:
constraint- the constraint to add
-
addConstraint
Add a new constraint.- Parameters:
constraint- the constraint to add
-
addConstraint
Add a new constraint.- Parameters:
constraint- the constraint to add
-
addConstraint
Add a new constraint.- Parameters:
constraint- the constraint to add
-