Interface ICardinalityConstraint
-
- All Superinterfaces:
IConstraint
- All Known Implementing Classes:
DefaultCardinalityConstraint
public interface ICardinalityConstraint extends IConstraint
Represents a rule requiring a Metaschema assembly data instance to have elements with a minimum and/or maximum occurrence.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
IConstraint.ExternalModelSource, IConstraint.ExternalSource, IConstraint.InternalModelSource, IConstraint.ISource, IConstraint.Level
-
-
Field Summary
-
Fields inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
DEFAULT_LEVEL, DEFAULT_TARGET, DEFAULT_TARGET_METAPATH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Integer
getMaxOccurs()
Retrieve the required maximum occurrence of the target instance.Integer
getMinOccurs()
Retrieve the required minimum occurrence of the target instance.-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
accept, getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget, matchTargets, matchTargets
-
-
-
-
Method Detail
-
getMinOccurs
@Nullable Integer getMinOccurs()
Retrieve the required minimum occurrence of the target instance. If specified, this value must be less than or equal to the value ofIModelInstance.getMaxOccurs()
and greater thanIModelInstance.getMinOccurs()
.- Returns:
- a non-negative integer or
null
if not defined
-
getMaxOccurs
@Nullable Integer getMaxOccurs()
Retrieve the required maximum occurrence of the target instance. If specified, this value must be less than the value ofIModelInstance.getMaxOccurs()
and greater than or equal toIModelInstance.getMinOccurs()
.- Returns:
- a non-negative integer or
null
if not defined
-
-