Class InstanceAuditHeaderMapping
- java.lang.Object
-
- org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping
-
- org.odpi.egeria.connectors.juxt.xtdb.mapping.InstanceAuditHeaderMapping
-
- Direct Known Subclasses:
ClassificationMapping,InstanceHeaderMapping
public abstract class InstanceAuditHeaderMapping extends AbstractMapping
Maps the properties of InstanceAuditHeaders between persistence and objects.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCREATE_TIMEstatic StringCURRENT_STATUSstatic StringINSTANCE_PROVENANCE_TYPEstatic StringMAINTAINED_BYstatic StringMETADATA_COLLECTION_IDstatic StringMETADATA_COLLECTION_NAMEstatic StringREPLICATED_BYstatic StringSTATUS_ON_DELETEstatic StringTYPE_DEF_CATEGORYstatic StringTYPE_DEF_GUIDSstatic StringUPDATE_TIMEstatic StringUPDATED_BYstatic StringVERSION-
Fields inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping
mapper, xtdbConnector
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedInstanceAuditHeaderMapping(XtdbOMRSRepositoryConnector xtdbConnector)Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static clojure.lang.IPersistentVectoraddToMap(clojure.lang.IPersistentMap doc, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, String namespace)Translate the provided Egeria representation into a XTDB document map.static clojure.lang.IPersistentMapaddTypeDetailsToMap(clojure.lang.IPersistentMap doc, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type, String namespace)Translate the provided Egeria type information into a XTDB document map.protected static voidbuildDoc(xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah)Translate the provided Egeria representation into a XTDB document.static DatebuildDoc(xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, String namespace)Translate the provided Egeria representation into a XTDB document.protected voidfromDoc(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, xtdb.api.XtdbDocument doc)Translate the provided XTDB representation into an Egeria representation.protected voidfromDoc(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, xtdb.api.XtdbDocument doc, String namespace)Translate the provided XTDB representation into an Egeria representation.protected static voidfromMap(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, clojure.lang.IPersistentMap doc, String namespace)Translate the provided XTDB representation into an Egeria representation.static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceTypegetTypeFromInstance(clojure.lang.IPersistentMap doc, String namespace)Retrieve the instance type details from the provided XTDB document map.static booleanisKnownBaseProperty(String property)Check whether the specified property is a known base-level Instance property.-
Methods inherited from class org.odpi.egeria.connectors.juxt.xtdb.mapping.AbstractMapping
getDeserializedValue, getDeserializedValue, getEmbeddedSerializedForm, getEmbeddedSerializedForm, getKeyword, getKeyword
-
-
-
-
Field Detail
-
METADATA_COLLECTION_ID
public static final String METADATA_COLLECTION_ID
-
METADATA_COLLECTION_NAME
public static final String METADATA_COLLECTION_NAME
-
CREATE_TIME
public static final String CREATE_TIME
-
UPDATE_TIME
public static final String UPDATE_TIME
-
CURRENT_STATUS
public static final String CURRENT_STATUS
-
STATUS_ON_DELETE
public static final String STATUS_ON_DELETE
-
TYPE_DEF_GUIDS
public static final String TYPE_DEF_GUIDS
-
TYPE_DEF_CATEGORY
public static final String TYPE_DEF_CATEGORY
-
VERSION
public static final String VERSION
-
MAINTAINED_BY
public static final String MAINTAINED_BY
-
UPDATED_BY
public static final String UPDATED_BY
-
REPLICATED_BY
public static final String REPLICATED_BY
-
INSTANCE_PROVENANCE_TYPE
public static final String INSTANCE_PROVENANCE_TYPE
-
-
Constructor Detail
-
InstanceAuditHeaderMapping
protected InstanceAuditHeaderMapping(XtdbOMRSRepositoryConnector xtdbConnector)
Default constructor.- Parameters:
xtdbConnector- connectivity to XTDB
-
-
Method Detail
-
isKnownBaseProperty
public static boolean isKnownBaseProperty(String property)
Check whether the specified property is a known base-level Instance property.- Parameters:
property- to check- Returns:
- boolean
-
buildDoc
protected static void buildDoc(xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah) throws IOExceptionTranslate the provided Egeria representation into a XTDB document.- Parameters:
builder- for the XTDB documentiah- Egeria representation from which to map- Throws:
IOException- on any error serializing the provided values
-
buildDoc
public static Date buildDoc(xtdb.api.XtdbDocument.Builder builder, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, String namespace) throws IOException
Translate the provided Egeria representation into a XTDB document.- Parameters:
builder- for the XTDB documentiah- Egeria representation from which to mapnamespace- by which to qualify the properties- Returns:
- the latest change date in the header (updateTime or if empty createTime)
- Throws:
IOException- on any error serializing the provided values
-
addToMap
public static clojure.lang.IPersistentVector addToMap(clojure.lang.IPersistentMap doc, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, String namespace) throws IOExceptionTranslate the provided Egeria representation into a XTDB document map.- Parameters:
doc- for the XTDB documentiah- Egeria representation from which to mapnamespace- by which to qualify the properties- Returns:
- a tuple containing the timestamp of the create / update followed by the updated document map itself
- Throws:
IOException- on any error serializing the provided values
-
addTypeDetailsToMap
public static clojure.lang.IPersistentMap addTypeDetailsToMap(clojure.lang.IPersistentMap doc, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType type, String namespace) throws IOExceptionTranslate the provided Egeria type information into a XTDB document map.- Parameters:
doc- for the XTDB documenttype- to update into the documentnamespace- by which to qualify the properties- Returns:
- IPersistentMap containing the updated XTDB document
- Throws:
IOException- on any error serializing the provided values
-
getTypeFromInstance
public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType getTypeFromInstance(clojure.lang.IPersistentMap doc, String namespace) throws IOExceptionRetrieve the instance type details from the provided XTDB document map.- Parameters:
doc- for the XTDB documentnamespace- by which the properties are qualified- Returns:
- InstanceType
- Throws:
IOException- on any error deserializing the value
-
fromDoc
protected void fromDoc(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, xtdb.api.XtdbDocument doc)Translate the provided XTDB representation into an Egeria representation.- Parameters:
iah- into which to mapdoc- from which to map
-
fromDoc
protected void fromDoc(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, xtdb.api.XtdbDocument doc, String namespace)Translate the provided XTDB representation into an Egeria representation.- Parameters:
iah- into which to mapdoc- from which to mapnamespace- by which the properties are qualified
-
fromMap
protected static void fromMap(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader iah, clojure.lang.IPersistentMap doc, String namespace) throws IOException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterExceptionTranslate the provided XTDB representation into an Egeria representation.- Parameters:
iah- into which to mapdoc- from which to mapnamespace- by which the properties are qualified- Throws:
IOException- on any issue deserializing valuesorg.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException- for any unmapped properties
-
-