Interface OpenMetadataArchiveBuilder

All Known Implementing Classes:
DirectoryBasedOpenMetadataArchiveStoreConnector, DynamicArchiveService.ArchiveDestination, OMRSArchiveBuilder

public interface OpenMetadataArchiveBuilder
OpenMetadataArchiveBuilder defines the interface for an open metadata archive store connector that is able to manage individual elements of the open metadata archive. It is an optional interface for an open metadata archive store connector. For connectors where this interface is not implemented, the OMRS provides the OMRSArchiveBuilder utility that manages the content of an archive in memory, so it can be passed to the open metadata archive store connector as a single structure
  • Method Details

    • setArchiveProperties

      void setArchiveProperties(String archiveGUID, String archiveName, String archiveDescription, OpenMetadataArchiveType archiveType, String archiveVersion, String originatorName, String originatorLicense, Date creationDate, List<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

      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

      void addPrimitiveDef(PrimitiveDef primitiveDef)
      Add a new PrimitiveDef to the archive.
      Parameters:
      primitiveDef - type to add nulls are ignored
    • getPrimitiveDef

      PrimitiveDef getPrimitiveDef(String primitiveDefName)
      Retrieve a PrimitiveDef from the archive.
      Parameters:
      primitiveDefName - primitive to retrieve
      Returns:
      PrimitiveDef type
    • addCollectionDef

      void addCollectionDef(CollectionDef collectionDef)
      Add a new CollectionDef to the archive.
      Parameters:
      collectionDef - type to add
    • getCollectionDef

      CollectionDef getCollectionDef(String collectionDefName)
      Retrieve a CollectionDef from the archive.
      Parameters:
      collectionDefName - type to retrieve
      Returns:
      CollectionDef type
    • addEnumDef

      void addEnumDef(EnumDef enumDef)
      Add a new EnumDef to the archive.
      Parameters:
      enumDef - type to add
    • getEnumDef

      EnumDef getEnumDef(String enumDefName)
      Get an existing EnumDef from the archive.
      Parameters:
      enumDefName - type to retrieve
      Returns:
      EnumDef object
    • addClassificationDef

      void addClassificationDef(ClassificationDef classificationDef)
      Add a new ClassificationDef to the archive.
      Parameters:
      classificationDef - type to add
    • getClassificationDef

      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

      void addEntityDef(EntityDef entityDef)
      Add a new EntityDef to the archive.
      Parameters:
      entityDef - type to add
    • getEntityDef

      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

      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

      void addRelationshipDef(RelationshipDef relationshipDef)
      Add a new RelationshipDef to the archive.
      Parameters:
      relationshipDef - type to add
    • getPatchForType

      TypeDefPatch getPatchForType(String typeName)
      Create a skeleton patch for a TypeDefPatch.
      Parameters:
      typeName - name of type
      Returns:
      TypeDefPatch
    • addTypeDefPatch

      void addTypeDefPatch(TypeDefPatch typeDefPatch)
      Add a new patch to the archive.
      Parameters:
      typeDefPatch - patch
    • getTypeDefByName

      TypeDef getTypeDefByName(String typeName)
      Return the requested type definition if known.
      Parameters:
      typeName - name ot type
      Returns:
      type definition
    • addEntity

      void addEntity(EntityDetail entity)
      Add a new entity to the archive.
      Parameters:
      entity - instance to add
    • getEntity

      EntityDetail getEntity(String guid)
      Retrieve an entity from the archive. Throw an exception if not present.
      Parameters:
      guid - unique identifier
      Returns:
      requested entity
    • queryEntity

      EntityDetail queryEntity(String guid)
      Retrieve an entity from the archive if available.
      Parameters:
      guid - unique identifier
      Returns:
      requested entity
    • addRelationship

      void addRelationship(Relationship relationship)
      Add a new relationship to the archive.
      Parameters:
      relationship - instance to add
    • getRelationship

      Relationship getRelationship(String guid)
      Retrieve a relationship from the archive. Throw an exception if not present.
      Parameters:
      guid - unique identifier
      Returns:
      requested relationship
    • queryRelationship

      Relationship queryRelationship(String guid)
      Retrieve a relationship from the archive if it exists.
      Parameters:
      guid - unique identifier
      Returns:
      requested relationship
    • addClassification

      void addClassification(ClassificationEntityExtension classification)
      Add a new classification to the archive.
      Parameters:
      classification - instance to add
    • getClassification

      ClassificationEntityExtension getClassification(String entityGUID, String classificationName)
      Retrieve a classification extension from the archive. Throw an exception if not present.
      Parameters:
      entityGUID - unique identifier of entity
      classificationName - name of the classification
      Returns:
      requested classification extension
    • queryClassification

      ClassificationEntityExtension queryClassification(String entityGUID, String classificationName)
      Retrieve a classification extension from the archive if it exists.
      Parameters:
      entityGUID - unique identifier of entity
      classificationName - name of the classification
      Returns:
      requested classification extension