public interface IKeyField
Represents a component of a key used in a key-based index.
A key field is targeted at a Metaschema field or flag data object's value. An optional pattern can be used to extract a portion of the value for use in generating an index key.
-
Method Summary
Modifier and TypeMethodDescriptionA pattern to use to retrieve the value.Any remarks about the key field as markup text.Get the Metapath expression that identifies the node item whose value will be used as the key value.static IKeyFieldof(IMetapathExpression target, Pattern pattern, MarkupMultiline remarks) Construct a new key field based on the provided target.
-
Method Details
-
of
@NonNull static IKeyField of(@NonNull IMetapathExpression 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- Returns:
- the new key field
-
getTarget
Get the Metapath expression that identifies the node item whose value will be used as the key value.- Returns:
- the Metapath expression identifying the key value target
-
getPattern
A pattern to use to retrieve the value. If non-null, the first capturing group is used to retrieve the value.- Returns:
- a pattern to use to get the value or
nullif the full value is to be used
-
getRemarks
Any remarks about the key field as markup text.- Returns:
- markup text or
nullif no text is provided
-