Interface IKeyField


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 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 field
      pattern - an optional used to extract a portion of the resulting key value
      remarks - optional remarks describing the intent of the constraint
      Returns:
      the new key field
    • getTarget

      @NonNull IMetapathExpression 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

      @Nullable Pattern 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 null if the full value is to be used
    • getRemarks

      @Nullable MarkupMultiline getRemarks()
      Any remarks about the key field as markup text.
      Returns:
      markup text or null if no text is provided