Direct Known Subclasses:
EntityDetailMapping, EntityProxyMapping

public class EntitySummaryMapping extends InstanceHeaderMapping
Maps the properties of EntitySummaries between persistence and objects.
  • Field Details

  • Constructor Details

    • EntitySummaryMapping

      public EntitySummaryMapping(XTDBOMRSRepositoryConnector xtdbConnector, EntitySummary entitySummary)
      Construct a mapping from an EntityDetail (to map to a XTDB representation).
      Parameters:
      xtdbConnector - connectivity to XTDB
      entitySummary - from which to map
    • EntitySummaryMapping

      public EntitySummaryMapping(XTDBOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument xtdbDoc)
      Construct a mapping from a XTDB map (to map to an Egeria representation).
      Parameters:
      xtdbConnector - connectivity to XTDB
      xtdbDoc - from which to map
  • Method Details

    • toEgeria

      public EntitySummary toEgeria()
      Map from XTDB to Egeria.
      Returns:
      EntityDetail
      See Also:
    • toDoc

      protected xtdb.api.XtdbDocument.Builder toDoc()
      Translate the provided Egeria representation into a XTDB document.
      Overrides:
      toDoc in class InstanceHeaderMapping
      Returns:
      XtdbDocument.Builder from which to build the document
    • fromDoc

      protected void fromDoc()
      Translate the provided XTDB representation into an Egeria representation.
      Overrides:
      fromDoc in class InstanceHeaderMapping
    • fromMap

      protected static void fromMap(EntitySummary es, clojure.lang.IPersistentMap doc) throws IOException, InvalidParameterException
      Translate the provided XTDB representation into an Egeria representation.
      Parameters:
      es - into which to map
      doc - from which to map
      Throws:
      IOException - on any issue deserializing values
      InvalidParameterException - for any unmapped properties
    • getReference

      public static String getReference(String guid)
      Retrieve the canonical reference to the entity summary with the specified GUID.
      Parameters:
      guid - of the entity summary to reference
      Returns:
      String giving the XTDB reference to this entity summary document