Class InstancePropertiesMapping


  • public class InstancePropertiesMapping
    extends Object
    Maps the properties of InstanceProperties between persistence and objects. The values of the properties (InstancePropertyValue) will be both JSON-serialized and searchable.
    See Also:
    InstancePropertyValueMapping
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addToDoc​(XtdbOMRSRepositoryConnector xtdbConnector, xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties properties)
      Add the provided instance property values to the XTDB document.
      static clojure.lang.IPersistentMap addToMap​(clojure.lang.IPersistentMap doc, String typeDefGUID, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties properties)
      Add the provided instance property values to the XTDB document map.
      static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties getFromDoc​(XtdbOMRSRepositoryConnector xtdbConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type, xtdb.api.XtdbDocument xtdbDoc)
      Retrieve the instance property values from the provided XTDB document.
      static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties getFromMap​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type, clojure.lang.IPersistentMap doc)
      Translate the provided XTDB representation into an Egeria representation.
    • Method Detail

      • getFromDoc

        public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties getFromDoc​(XtdbOMRSRepositoryConnector xtdbConnector,
                                                                                                                                                            org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type,
                                                                                                                                                            xtdb.api.XtdbDocument xtdbDoc)
        Retrieve the instance property values from the provided XTDB document. NOTE: whether empty or null, the instance properties will always be returned back from the XTDB representation as an empty set of properties (not null).
        Parameters:
        xtdbConnector - connectivity to the repository
        type - of the Egeria instance from which we are retrieving the values
        xtdbDoc - from which to retrieve the values
        Returns:
        InstanceProperties
      • getFromMap

        public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties getFromMap​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type,
                                                                                                                                                            clojure.lang.IPersistentMap doc)
                                                                                                                                                     throws IOException
        Translate the provided XTDB representation into an Egeria representation.
        Parameters:
        type - of the Egeria instance from which we are retrieving the values
        doc - from which to map
        Returns:
        InstanceProperties
        Throws:
        IOException - on any issue deserializing values
      • addToDoc

        public static void addToDoc​(XtdbOMRSRepositoryConnector xtdbConnector,
                                    xtdb.api.XtdbDocument.Builder builder,
                                    org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type,
                                    org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties properties)
        Add the provided instance property values to the XTDB document.
        Parameters:
        xtdbConnector - connectivity to the repository
        builder - to which to add the properties
        type - of the Egeria instance to which the values are being added
        properties - to add
      • addToMap

        public static clojure.lang.IPersistentMap addToMap​(clojure.lang.IPersistentMap doc,
                                                           String typeDefGUID,
                                                           org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties properties)
                                                    throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                                           IOException
        Add the provided instance property values to the XTDB document map.
        Parameters:
        doc - metadata instance in XTDB document map form to which to add the properties
        typeDefGUID - of the Egeria instance to which the values are being added
        properties - full set of properties for the instance
        Returns:
        IPersistentMap giving the updated instance representation
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - if any of the properties cannot be persisted
        IOException - on any error serializing the properties