Class InstancePropertiesMapping
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstancePropertiesMapping
Maps the properties of InstanceProperties between persistence and objects.
The values of the properties (InstancePropertyValue) will be both JSON-serialized and searchable.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddToDoc(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.IPersistentMapaddToMap(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.InstancePropertiesgetFromDoc(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.InstancePropertiesgetFromMap(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 Details
-
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 repositorytype- of the Egeria instance from which we are retrieving the valuesxtdbDoc- 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 valuesdoc- 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 repositorybuilder- to which to add the propertiestype- of the Egeria instance to which the values are being addedproperties- 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 propertiestypeDefGUID- of the Egeria instance to which the values are being addedproperties- 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 persistedIOException- on any error serializing the properties
-