Class DynamicArchiveService.ArchiveDestination
java.lang.Object
org.odpi.openmetadata.adapters.connectors.dynamicarchivers.DynamicArchiveService.ArchiveDestination
- All Implemented Interfaces:
org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder,org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveCache
- Enclosing class:
- DynamicArchiveService
protected class DynamicArchiveService.ArchiveDestination
extends Object
implements org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder, org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveCache
Details of one of the archive destination that this archive service is managing. It is able to support an archive that builds in memory and
is written out in one go - or one that stores one element at a time.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedArchiveDestination(org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveStoreConnector store) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassification(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension classification) Add a new classification to the archive.voidaddClassificationDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef classificationDef) Add a new ClassificationDef to the archive.voidaddCollectionDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef collectionDef) Add a new CollectionDef to the archive.voidaddEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity) Add a new entity to the archive.voidaddEntityDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef entityDef) Add a new EntityDef to the archive.voidaddEnumDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef enumDef) Add a new EnumDef to the archive.voidaddPrimitiveDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef primitiveDef) Add a new PrimitiveDef to the archive.voidaddRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship) Add a new relationship to the archive.voidaddRelationshipDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef relationshipDef) Add a new RelationshipDef to the archive.voidaddTypeDefPatch(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch typeDefPatch) Add a new patch to the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchivePropertiesReturn the archive properties as will appear in the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtensiongetClassification(String entityGUID, String classificationName) Retrieve a classification extension from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDefgetClassificationDef(String classificationDef) Retrieve the relationshipDef or null if it is not defined.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDefgetCollectionDef(String collectionDefName) Retrieve a CollectionDef from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailRetrieve an entity from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDefgetEntityDef(String entityDefName) Retrieve the entityDef or null if it is not defined.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDefgetEnumDef(String enumDefName) Get an existing EnumDef from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveOnce the content of the archive has been added to the archive builder, an archive object can be retrieved.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatchgetPatchForType(String typeName) Create a skeleton patch for a TypeDefPatch.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefgetPrimitiveDef(String primitiveDefName) Retrieve a PrimitiveDef from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshipgetRelationship(String guid) Retrieve a relationship from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDefgetRelationshipDef(String relationshipDefName) Retrieve the relationshipDef or null if it is not defined.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefgetTypeDefByName(String typeName) Return the requested type definition if known.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtensionqueryClassification(String entityGUID, String classificationName) Retrieve a classification extension from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailqueryEntity(String guid) Retrieve an entity from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshipqueryRelationship(String guid) Retrieve a relationship from the archive.voidsetArchiveProperties(String archiveGUID, String archiveName, String archiveDescription, org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType archiveType, String archiveVersion, String originatorName, String originatorLicense, Date creationDate, List<org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive> dependsOnArchives) Set up archive header.
-
Constructor Details
-
ArchiveDestination
protected ArchiveDestination(org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveStoreConnector store) Simple constructor.- Parameters:
store- connector to the store
-
-
Method Details
-
getOpenMetadataArchive
public org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive getOpenMetadataArchive()Once the content of the archive has been added to the archive builder, an archive object can be retrieved.- Specified by:
getOpenMetadataArchivein interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveCache- Returns:
- open metadata archive object with all the supplied content in it.
-
setArchiveProperties
public void setArchiveProperties(String archiveGUID, String archiveName, String archiveDescription, org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType archiveType, String archiveVersion, String originatorName, String originatorLicense, Date creationDate, List<org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive> dependsOnArchives) Set up archive header. It passes parameters used to build the open metadata archive's property header including the default license string. This determines the license and copyright for all instances in the archive that do not have their own explicit license string. The default license string will be inserted into each instance with a null license when it is loaded into an open metadata repository.- Specified by:
setArchivePropertiesin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
archiveGUID- unique identifier for this open metadata archive.archiveName- name of the open metadata archive.archiveDescription- description of the open metadata archive.archiveType- enum describing the type of archive this is.archiveVersion- descriptive name for the version of the archive.originatorName- name of the originator (person or organization) of the archive.originatorLicense- default license string for content.creationDate- data that this archive was created.dependsOnArchives- list of archives that this archive depends on (null for no dependencies).
-
getArchiveProperties
public org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveProperties getArchiveProperties()Return the archive properties as will appear in the archive. Null is returned if archive properties not set up.- Specified by:
getArchivePropertiesin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Returns:
- property bean
-
addPrimitiveDef
public void addPrimitiveDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef primitiveDef) Add a new PrimitiveDef to the archive.- Specified by:
addPrimitiveDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
primitiveDef- type to add nulls are ignored
-
getPrimitiveDef
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef getPrimitiveDef(String primitiveDefName) Retrieve a PrimitiveDef from the archive.- Specified by:
getPrimitiveDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
primitiveDefName- primitive to retrieve- Returns:
- PrimitiveDef type
-
addCollectionDef
public void addCollectionDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef collectionDef) Add a new CollectionDef to the archive.- Specified by:
addCollectionDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
collectionDef- type to add
-
getCollectionDef
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef getCollectionDef(String collectionDefName) Retrieve a CollectionDef from the archive.- Specified by:
getCollectionDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
collectionDefName- type to retrieve- Returns:
- CollectionDef type
-
addEnumDef
public void addEnumDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef enumDef) Add a new EnumDef to the archive.- Specified by:
addEnumDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
enumDef- type to add
-
getEnumDef
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef getEnumDef(String enumDefName) Get an existing EnumDef from the archive.- Specified by:
getEnumDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
enumDefName- type to retrieve- Returns:
- EnumDef object
-
addClassificationDef
public void addClassificationDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef classificationDef) Add a new ClassificationDef to the archive.- Specified by:
addClassificationDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
classificationDef- type to add
-
addEntityDef
public void addEntityDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef entityDef) Add a new EntityDef to the archive.- Specified by:
addEntityDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
entityDef- type to add
-
getEntityDef
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef getEntityDef(String entityDefName) Retrieve the entityDef or null if it is not defined.- Specified by:
getEntityDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
entityDefName- name of the entity- Returns:
- the retrieved entity def
-
getRelationshipDef
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef getRelationshipDef(String relationshipDefName) Retrieve the relationshipDef or null if it is not defined.- Specified by:
getRelationshipDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
relationshipDefName- name of the relationship- Returns:
- the retrieved relationship def
-
getClassificationDef
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef getClassificationDef(String classificationDef) Retrieve the relationshipDef or null if it is not defined.- Specified by:
getClassificationDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
classificationDef- name of the classification- Returns:
- the retrieved classification def
-
addRelationshipDef
public void addRelationshipDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef relationshipDef) Add a new RelationshipDef to the archive.- Specified by:
addRelationshipDefin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
relationshipDef- type to add
-
getPatchForType
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch getPatchForType(String typeName) Create a skeleton patch for a TypeDefPatch.- Specified by:
getPatchForTypein interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
typeName- name of type- Returns:
- TypeDefPatch
-
addTypeDefPatch
public void addTypeDefPatch(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch typeDefPatch) Add a new patch to the archive.- Specified by:
addTypeDefPatchin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
typeDefPatch- patch
-
getTypeDefByName
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByName(String typeName) Return the requested type definition if known.- Specified by:
getTypeDefByNamein interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
typeName- name ot type- Returns:
- type definition
-
addEntity
public void addEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity) Add a new entity to the archive.- Specified by:
addEntityin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
entity- instance to add
-
getEntity
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntity(String guid) Retrieve an entity from the archive.- Specified by:
getEntityin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
guid- unique identifier- Returns:
- requested entity
-
queryEntity
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail queryEntity(String guid) Retrieve an entity from the archive.- Specified by:
queryEntityin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
guid- unique identifier- Returns:
- requested entity
-
addRelationship
public void addRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship) Add a new relationship to the archive.- Specified by:
addRelationshipin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
relationship- instance to add
-
getRelationship
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship(String guid) Retrieve a relationship from the archive.- Specified by:
getRelationshipin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
guid- unique identifier- Returns:
- requested relationship
-
queryRelationship
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship queryRelationship(String guid) Retrieve a relationship from the archive.- Specified by:
queryRelationshipin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
guid- unique identifier- Returns:
- requested relationship
-
addClassification
public void addClassification(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension classification) Add a new classification to the archive.- Specified by:
addClassificationin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
classification- instance to add
-
getClassification
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension getClassification(String entityGUID, String classificationName) Retrieve a classification extension from the archive.- Specified by:
getClassificationin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
entityGUID- unique identifier of entityclassificationName- name of the classification- Returns:
- requested classification extension
-
queryClassification
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension queryClassification(String entityGUID, String classificationName) Retrieve a classification extension from the archive.- Specified by:
queryClassificationin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.OpenMetadataArchiveBuilder- Parameters:
entityGUID- unique identifier of entityclassificationName- name of the classification- Returns:
- requested classification extension
-