Class InstanceAuditHeaderMapping
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.AbstractMapping
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.InstanceAuditHeaderMapping
- Direct Known Subclasses:
ClassificationMapping
,InstanceHeaderMapping
Maps the properties of InstanceAuditHeaders between persistence and objects.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.AbstractMapping
mapper, xtdbConnector
-
Constructor Summary
ModifierConstructorDescriptionprotected
InstanceAuditHeaderMapping
(XTDBOMRSRepositoryConnector xtdbConnector) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic clojure.lang.IPersistentVector
addToMap
(clojure.lang.IPersistentMap doc, InstanceAuditHeader iah, String namespace) Translate the provided Egeria representation into a XTDB document map.static clojure.lang.IPersistentMap
addTypeDetailsToMap
(clojure.lang.IPersistentMap doc, InstanceType type, String namespace) Translate the provided Egeria type information into a XTDB document map.protected static void
buildDoc
(xtdb.api.XtdbDocument.Builder builder, InstanceAuditHeader iah) Translate the provided Egeria representation into a XTDB document.static Date
buildDoc
(xtdb.api.XtdbDocument.Builder builder, InstanceAuditHeader iah, String namespace) Translate the provided Egeria representation into a XTDB document.protected void
fromDoc
(InstanceAuditHeader iah, xtdb.api.XtdbDocument doc) Translate the provided XTDB representation into an Egeria representation.protected void
fromDoc
(InstanceAuditHeader iah, xtdb.api.XtdbDocument doc, String namespace) Translate the provided XTDB representation into an Egeria representation.protected static void
fromMap
(InstanceAuditHeader iah, clojure.lang.IPersistentMap doc, String namespace) Translate the provided XTDB representation into an Egeria representation.static InstanceType
getTypeFromInstance
(clojure.lang.IPersistentMap doc, String namespace) Retrieve the instance type details from the provided XTDB document map.static boolean
isKnownBaseProperty
(String property) Check whether the specified property is a known base-level Instance property.Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.mapping.AbstractMapping
getDeserializedValue, getDeserializedValue, getEmbeddedSerializedForm, getEmbeddedSerializedForm, getKeyword, getKeyword
-
Field Details
-
METADATA_COLLECTION_ID
-
METADATA_COLLECTION_NAME
-
CREATE_TIME
-
UPDATE_TIME
-
CURRENT_STATUS
-
STATUS_ON_DELETE
-
TYPE_DEF_GUIDS
-
TYPE_DEF_CATEGORY
-
VERSION
-
MAINTAINED_BY
-
UPDATED_BY
-
REPLICATED_BY
-
INSTANCE_PROVENANCE_TYPE
-
-
Constructor Details
-
InstanceAuditHeaderMapping
Default constructor.- Parameters:
xtdbConnector
- connectivity to XTDB
-
-
Method Details
-
isKnownBaseProperty
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, InstanceAuditHeader iah) throws IOException Translate 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, 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, InstanceAuditHeader iah, String namespace) throws IOException Translate 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, InstanceType type, String namespace) throws IOException Translate 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 InstanceType getTypeFromInstance(clojure.lang.IPersistentMap doc, String namespace) throws IOException Retrieve 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
Translate the provided XTDB representation into an Egeria representation.- Parameters:
iah
- into which to mapdoc
- from which to map
-
fromDoc
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(InstanceAuditHeader iah, clojure.lang.IPersistentMap doc, String namespace) throws IOException, InvalidParameterException 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- Throws:
IOException
- on any issue deserializing valuesInvalidParameterException
- for any unmapped properties
-