Class PedigreeMapItem

All Implemented Interfaces:
PedigreeValue, Callable, FunctionItem, GroundedValue, Item, Sequence

public class PedigreeMapItem extends DelegatingMapItem implements PedigreeValue
A PedigreeMapItem represents an XDM map together with a Pedigree: that is, retained information about how the map was selected within a JSON-like tree.
  • Constructor Details Link icon

    • PedigreeMapItem Link icon

      public PedigreeMapItem(MapItem base)
      Create a PedigreeMapItem with an empty pedigree
      Parameters:
      base - the underlying map item
    • PedigreeMapItem Link icon

      public PedigreeMapItem(MapItem base, Pedigree pedigree)
      Create a PedigreeMapItem with a known pedigree
      Parameters:
      base - the underlying array item
  • Method Details Link icon

    • get Link icon

      public GroundedValue get(AtomicValue key)
      Get the value of the entry in the map with a specified key, retaining information about how that value was selected
      Overrides:
      get in class DelegatingMapItem
      Parameters:
      key - the key of the required entry
      Returns:
      the corresponding value, which will itself have a pedigree if it is a singleton map or array; or null if there is no entry with this key
    • keyValuePairs Link icon

      public Iterable<KeyValuePair> keyValuePairs()
      Get an iterable collection of key-value pairs representing the entries in this map; any entry whose value is a singleton array or map will itself have a pedigree indicating how it was selected
      Overrides:
      keyValuePairs in class DelegatingMapItem
      Returns:
      the entries in this map as an iterable collection
    • getPedigree Link icon

      public Pedigree getPedigree()
      Get the pedigree of this map item, providing information as to how it was selected.
      Specified by:
      getPedigree in interface PedigreeValue
      Returns:
      the pedigree of this map item