Class DefaultUniqueConstraint
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
-
- gov.nist.secauto.metaschema.core.model.constraint.AbstractKeyConstraint
-
- gov.nist.secauto.metaschema.core.model.constraint.DefaultUniqueConstraint
-
- All Implemented Interfaces:
IConstraint
,IKeyConstraint
,IUniqueConstraint
public class DefaultUniqueConstraint extends AbstractKeyConstraint implements IUniqueConstraint
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultUniqueConstraint.Builder
-
Nested classes/interfaces inherited from class gov.nist.secauto.metaschema.core.model.constraint.AbstractKeyConstraint
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 Constructor Description DefaultUniqueConstraint(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 used to identify non-unique items.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,R>
Raccept(IConstraintVisitor<T,R> visitor, T state)
static DefaultUniqueConstraint.Builder
builder()
-
Methods inherited from class gov.nist.secauto.metaschema.core.model.constraint.AbstractKeyConstraint
getKeyFields
-
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
getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget, matchTargets, matchTargets
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IKeyConstraint
getKeyFields
-
-
-
-
Constructor Detail
-
DefaultUniqueConstraint
public DefaultUniqueConstraint(@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 used to identify non-unique items.- 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
-
accept
public <T,R> R accept(IConstraintVisitor<T,R> visitor, T state)
- Specified by:
accept
in interfaceIConstraint
-
builder
@NonNull public static DefaultUniqueConstraint.Builder builder()
-
-