Class DynamicArchiveService

java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
org.odpi.openmetadata.adapters.connectors.dynamicarchivers.DynamicArchiveService
All Implemented Interfaces:
org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceService, org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent, org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
Direct Known Subclasses:
GlossaryDynamicArchiverConnector

public abstract class DynamicArchiveService extends org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
DynamicArchiveService describes a specific type of connector that is responsible for managing the content of a specific open metadata archive. Information about the available metadata is passed in the archive context. The returned archive context also contains the status of this service.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Details of one of the archive destination that this archive service is managing.

    Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase

    org.odpi.openmetadata.frameworks.connectors.ConnectorBase.ProtectedConnection
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType
     
    protected static final Date
     
    protected static final String
     
    protected static final String
     
    protected static final long
     

    Fields inherited from class org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector

    auditLog, embeddedConnectors, repositoryGovernanceContext, repositoryGovernanceServiceName

    Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase

    connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, securedProperties
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addClassification(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension classification)
    Add a new classification to the archive.
    protected void
    addClassificationDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef classificationDef)
    Add a new ClassificationDef to the archive.
    protected void
    addCollectionDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef collectionDef)
    Add a new CollectionDef to the archive.
    protected void
    addEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)
    Add a new entity to the archive.
    protected void
    addEntityDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef entityDef)
    Add a new EntityDef to the archive.
    protected void
    addEnumDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef enumDef)
    Add a new EnumDef to the archive.
    protected void
    addPrimitiveDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef primitiveDef)
    Add a new PrimitiveDef to the archive.
    protected void
    addRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
    Add a new relationship to the archive.
    protected void
    addRelationshipDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef relationshipDef)
    Add a new RelationshipDef to the archive.
    protected void
    addTypeDefPatch(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch typeDefPatch)
    Add a new patch to the archive.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveProperties
    Return the archive properties as will appear in the archive.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension
    getClassification(String entityGUID, String classificationName)
    Retrieve a classification extension from the archive.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef
    getClassificationDef(String classificationDef)
    Retrieve the relationshipDef or null if it is not defined.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef
    getCollectionDef(String collectionDefName)
    Retrieve a CollectionDef from the archive.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail
    Retrieve an entity from the archive.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef
    getEntityDef(String entityDefName)
    Retrieve the entityDef or null if it is not defined.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef
    getEnumDef(String enumDefName)
    Get an existing EnumDef from the archive.
    org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive
    Once the content of the archive has been added to the archive builder, an archive object can be retrieved.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch
    Create a skeleton patch for a TypeDefPatch.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef
    getPrimitiveDef(String primitiveDefName)
    Retrieve a PrimitiveDef from the archive.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship
    Retrieve a relationship from the archive.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef
    getRelationshipDef(String relationshipDefName)
    Retrieve the relationshipDef or null if it is not defined.
    protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef
    Return the requested type definition if known.
    protected void
    Provide a common exception for unexpected errors.
    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.
    void
    Indicates that the archive service is completely configured and can begin processing.
    protected void
    validateContext(org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceContext governanceContext)
    Verify that the context has been set up for the subclass

    Methods inherited from class org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector

    disconnect, getConnectorComponentDescription, getRepositoryGovernanceContext, initializeEmbeddedConnectors, setAuditLog, setRepositoryGovernanceContext, setRepositoryGovernanceServiceName

    Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase

    equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, isActive, toString

    Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector

    clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • DynamicArchiveService

      public DynamicArchiveService()
  • Method Details

    • start

      public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Indicates that the archive service is completely configured and can begin processing. Any embedded connectors are started. This is the method where the function of the archive service is implemented in the subclass. This is a standard method from the Open Connector Framework (OCF) so be sure to call super.start() in your version.
      Overrides:
      start in class org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem within the archive service.
    • handleUnexpectedException

      protected void handleUnexpectedException(String methodName, Exception error) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Provide a common exception for unexpected errors.
      Overrides:
      handleUnexpectedException in class org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
      Parameters:
      methodName - calling method
      error - caught exception
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - wrapped exception
    • validateContext

      protected void validateContext(org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceContext governanceContext) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Verify that the context has been set up for the subclass
      Overrides:
      validateContext in class org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
      Parameters:
      governanceContext - context from the subclass
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - error to say that the connector (governance action service) is not able to proceed because it has not been set up correctly.
    • 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.
      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.
      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

      protected 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.
      Returns:
      property bean
    • addPrimitiveDef

      protected void addPrimitiveDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef primitiveDef)
      Add a new PrimitiveDef to the archive.
      Parameters:
      primitiveDef - type to add nulls are ignored
    • getPrimitiveDef

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef getPrimitiveDef(String primitiveDefName)
      Retrieve a PrimitiveDef from the archive.
      Parameters:
      primitiveDefName - primitive to retrieve
      Returns:
      PrimitiveDef type
    • addCollectionDef

      protected void addCollectionDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef collectionDef)
      Add a new CollectionDef to the archive.
      Parameters:
      collectionDef - type to add
    • getCollectionDef

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef getCollectionDef(String collectionDefName)
      Retrieve a CollectionDef from the archive.
      Parameters:
      collectionDefName - type to retrieve
      Returns:
      CollectionDef type
    • addEnumDef

      protected void addEnumDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef enumDef)
      Add a new EnumDef to the archive.
      Parameters:
      enumDef - type to add
    • getEnumDef

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef getEnumDef(String enumDefName)
      Get an existing EnumDef from the archive.
      Parameters:
      enumDefName - type to retrieve
      Returns:
      EnumDef object
    • addClassificationDef

      protected void addClassificationDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef classificationDef)
      Add a new ClassificationDef to the archive.
      Parameters:
      classificationDef - type to add
    • getClassificationDef

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef getClassificationDef(String classificationDef)
      Retrieve the relationshipDef or null if it is not defined.
      Parameters:
      classificationDef - name of the classification
      Returns:
      the retrieved classification def
    • addEntityDef

      protected void addEntityDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef entityDef)
      Add a new EntityDef to the archive.
      Parameters:
      entityDef - type to add
    • getEntityDef

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef getEntityDef(String entityDefName)
      Retrieve the entityDef or null if it is not defined.
      Parameters:
      entityDefName - name of the entity
      Returns:
      the retrieved entity def
    • getRelationshipDef

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef getRelationshipDef(String relationshipDefName)
      Retrieve the relationshipDef or null if it is not defined.
      Parameters:
      relationshipDefName - name of the relationship
      Returns:
      the retrieved relationship def
    • addRelationshipDef

      protected void addRelationshipDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef relationshipDef)
      Add a new RelationshipDef to the archive.
      Parameters:
      relationshipDef - type to add
    • getPatchForType

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch getPatchForType(String typeName)
      Create a skeleton patch for a TypeDefPatch.
      Parameters:
      typeName - name of type
      Returns:
      TypeDefPatch
    • addTypeDefPatch

      protected void addTypeDefPatch(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch typeDefPatch)
      Add a new patch to the archive.
      Parameters:
      typeDefPatch - patch
    • getTypeDefByName

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByName(String typeName)
      Return the requested type definition if known.
      Parameters:
      typeName - name ot type
      Returns:
      type definition
    • addEntity

      protected void addEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)
      Add a new entity to the archive.
      Parameters:
      entity - instance to add
    • getEntity

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntity(String guid)
      Retrieve an entity from the archive.
      Parameters:
      guid - unique identifier
      Returns:
      requested entity
    • addRelationship

      protected void addRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
      Add a new relationship to the archive.
      Parameters:
      relationship - instance to add
    • getRelationship

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship(String guid)
      Retrieve a relationship from the archive.
      Parameters:
      guid - unique identifier
      Returns:
      requested relationship
    • addClassification

      protected void addClassification(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension classification)
      Add a new classification to the archive.
      Parameters:
      classification - instance to add
    • getClassification

      protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension getClassification(String entityGUID, String classificationName)
      Retrieve a classification extension from the archive.
      Parameters:
      entityGUID - unique identifier of entity
      classificationName - name of the classification
      Returns:
      requested classification extension