Class AbstractKeyConstraint
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
-
- gov.nist.secauto.metaschema.core.model.constraint.AbstractKeyConstraint
-
- All Implemented Interfaces:
IConstraint
,IKeyConstraint
- Direct Known Subclasses:
DefaultIndexConstraint
,DefaultIndexHasKeyConstraint
,DefaultUniqueConstraint
public abstract class AbstractKeyConstraint extends AbstractConstraint implements IKeyConstraint
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractKeyConstraint.AbstractKeyConstraintBuilder<T extends AbstractKeyConstraint.AbstractKeyConstraintBuilder<T,R>,R extends AbstractKeyConstraint>
-
Nested classes/interfaces inherited from class gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
AbstractConstraint.AbstractConstraintBuilder<T extends AbstractConstraint.AbstractConstraintBuilder<T,R>,R extends AbstractConstraint>
-
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractKeyConstraint(String id, String formalName, MarkupLine description, IConstraint.ISource source, IConstraint.Level level, MetapathExpression target, Map<QName,Set<String>> properties, List<DefaultKeyField> keyFields, MarkupMultiline remarks)
Create a new key-based constraint, which uses a set of key fields to build a key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DefaultKeyField>
getKeyFields()
Retrieve the list of keys to use in creating and looking up an entry in a given index.-
Methods inherited from class gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
accept, getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget, matchTargets, matchTargets
-
-
-
-
Constructor Detail
-
AbstractKeyConstraint
protected AbstractKeyConstraint(@Nullable String id, @Nullable String formalName, @Nullable MarkupLine description, @NonNull IConstraint.ISource source, @NonNull IConstraint.Level level, @NonNull MetapathExpression target, @NonNull Map<QName,Set<String>> properties, @NonNull List<DefaultKeyField> keyFields, @Nullable MarkupMultiline remarks)
Create a new key-based constraint, which uses a set of key fields to build a key.- Parameters:
id
- the optional identifier for the constraintformalName
- the constraint's formal name ornull
if not provideddescription
- the constraint's semantic description ornull
if not providedsource
- information about the constraint sourcelevel
- the significance of a violation of this constrainttarget
- the Metapath expression identifying the nodes the constraint targetsproperties
- a collection of associated propertieskeyFields
- a list of key fields associated with the constraintremarks
- optional remarks describing the intent of the constraint
-
-
Method Detail
-
getKeyFields
public List<DefaultKeyField> getKeyFields()
Description copied from interface:IKeyConstraint
Retrieve the list of keys to use in creating and looking up an entry in a given index.- Specified by:
getKeyFields
in interfaceIKeyConstraint
- Returns:
- one or more keys
-
-