Class DefaultKeyField
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.model.constraint.DefaultKeyField
-
- All Implemented Interfaces:
IKeyField
public class DefaultKeyField extends Object implements IKeyField
-
-
Constructor Summary
Constructors Constructor Description DefaultKeyField(MetapathExpression target, Pattern pattern, MarkupMultiline remarks)
Construct a new key field based on the provided target.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pattern
getPattern()
A pattern to use to retrieve the value.MarkupMultiline
getRemarks()
Any remarks about the key field as markup text.MetapathExpression
getTarget()
-
-
-
Constructor Detail
-
DefaultKeyField
public DefaultKeyField(@NonNull MetapathExpression target, @Nullable Pattern pattern, @Nullable MarkupMultiline remarks)
Construct a new key field based on the provided target. An optional pattern can be used to extract a portion of the resulting key value.- Parameters:
target
- a Metapath expression identifying the target of the key fieldpattern
- an optional used to extract a portion of the resulting key valueremarks
- optional remarks describing the intent of the constraint
-
-
Method Detail
-
getPattern
public Pattern getPattern()
Description copied from interface:IKeyField
A pattern to use to retrieve the value. If non-null
, the first capturing group is used to retrieve the value.- Specified by:
getPattern
in interfaceIKeyField
- Returns:
- a pattern to use to get the value or
null
if the full value is to be used
-
getTarget
public MetapathExpression getTarget()
-
getRemarks
public MarkupMultiline getRemarks()
Description copied from interface:IKeyField
Any remarks about the key field as markup text.- Specified by:
getRemarks
in interfaceIKeyField
- Returns:
- markup text or
null
if no text is provided
-
-