Class InstanceHeaderMapping
- java.lang.Object
-
- org.odpi.egeria.connectors.juxt.crux.mapping.AbstractMapping
-
- org.odpi.egeria.connectors.juxt.crux.mapping.InstanceAuditHeaderMapping
-
- org.odpi.egeria.connectors.juxt.crux.mapping.InstanceHeaderMapping
-
- Direct Known Subclasses:
EntitySummaryMapping,RelationshipMapping
public class InstanceHeaderMapping extends InstanceAuditHeaderMapping
Maps the properties of InstanceHeaders between persistence and objects. (Note that this is the first level of mapping that can be instantiated, as it is the first level in which a Crux ID (GUID) is mapped.)
-
-
Field Summary
Fields Modifier and Type Field Description protected crux.api.CruxDocumentcruxDocprotected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeaderinstanceHeader-
Fields inherited from class org.odpi.egeria.connectors.juxt.crux.mapping.InstanceAuditHeaderMapping
CREATE_TIME, CURRENT_STATUS, METADATA_COLLECTION_ID, TYPE_DEF_CATEGORY, TYPE_DEF_GUIDS, UPDATE_TIME, VERSION
-
Fields inherited from class org.odpi.egeria.connectors.juxt.crux.mapping.AbstractMapping
cruxConnector, mapper
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedInstanceHeaderMapping(CruxOMRSRepositoryConnector cruxConnector, crux.api.CruxDocument cruxDoc)Construct a mapping from a Crux map (to map to an Egeria representation).protectedInstanceHeaderMapping(CruxOMRSRepositoryConnector cruxConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader instanceHeader)Construct a mapping from an InstanceAuditHeader (to map to a Crux representation).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfromDoc()Translate the provided Crux representation into an Egeria representation.static StringgetGuidReference(CruxOMRSRepositoryConnector cruxConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader ih)Translate the provided InstanceHeader information into a Crux reference to the GUID of the instance.protected static StringgetReference(String instanceType, String guid)Translate the provided details into a Crux reference.crux.api.CruxDocumenttoCrux()Map from Egeria to Crux.protected crux.api.CruxDocument.BuildertoDoc()Translate the provided Egeria representation into a Crux document.static StringtrimGuidFromReference(String reference)Retrieve only the GUID portion of a Crux reference.-
Methods inherited from class org.odpi.egeria.connectors.juxt.crux.mapping.InstanceAuditHeaderMapping
buildDoc, buildDoc, fromDoc, fromDoc, isKnownBaseProperty
-
Methods inherited from class org.odpi.egeria.connectors.juxt.crux.mapping.AbstractMapping
getDeserializedValue, getEmbeddedSerializedForm, getKeyword, getKeyword
-
-
-
-
Constructor Detail
-
InstanceHeaderMapping
protected InstanceHeaderMapping(CruxOMRSRepositoryConnector cruxConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader instanceHeader)
Construct a mapping from an InstanceAuditHeader (to map to a Crux representation).- Parameters:
cruxConnector- connectivity to CruxinstanceHeader- from which to map
-
InstanceHeaderMapping
protected InstanceHeaderMapping(CruxOMRSRepositoryConnector cruxConnector, crux.api.CruxDocument cruxDoc)
Construct a mapping from a Crux map (to map to an Egeria representation).- Parameters:
cruxConnector- connectivity to CruxcruxDoc- from which to map
-
-
Method Detail
-
toCrux
public crux.api.CruxDocument toCrux()
Map from Egeria to Crux.- Returns:
- CruxDocument
- See Also:
InstanceHeaderMapping(CruxOMRSRepositoryConnector, InstanceHeader)
-
toDoc
protected crux.api.CruxDocument.Builder toDoc()
Translate the provided Egeria representation into a Crux document.- Returns:
- CruxDocument.Builder from which to build the document
-
fromDoc
protected void fromDoc()
Translate the provided Crux representation into an Egeria representation.
-
getGuidReference
public static String getGuidReference(CruxOMRSRepositoryConnector cruxConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader ih)
Translate the provided InstanceHeader information into a Crux reference to the GUID of the instance.- Parameters:
cruxConnector- connectivity to the repositoryih- to translate- Returns:
- String for the Crux reference
-
trimGuidFromReference
public static String trimGuidFromReference(String reference)
Retrieve only the GUID portion of a Crux reference.- Parameters:
reference- from which to trim the GUID- Returns:
- String of only the GUID portion of the reference
-
-