Interface OpenMetadataArchiveBuilder

  • All Known Implementing Classes:
    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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addClassification​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension classification)
      Add a new classification to the archive.
      void addClassificationDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef classificationDef)
      Add a new ClassificationDef to the archive.
      void addCollectionDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef collectionDef)
      Add a new CollectionDef to the archive.
      void addEntity​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)
      Add a new entity to the archive.
      void addEntityDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef entityDef)
      Add a new EntityDef to the archive.
      void addEnumDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef enumDef)
      Add a new EnumDef to the archive.
      void addPrimitiveDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef primitiveDef)
      Add a new PrimitiveDef to the archive.
      void addRelationship​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
      Add a new relationship to the archive.
      void addRelationshipDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef relationshipDef)
      Add a new RelationshipDef to the archive.
      void addTypeDefPatch​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch typeDefPatch)
      Add a new patch to the archive.
      OpenMetadataArchiveProperties getArchiveProperties()
      Return the archive properties as will appear in the archive.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension getClassification​(java.lang.String entityGUID, java.lang.String classificationName)
      Retrieve a classification extension from the archive.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef getClassificationDef​(java.lang.String classificationDef)
      Retrieve the relationshipDef or null if it is not defined.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef getCollectionDef​(java.lang.String collectionDefName)
      Retrieve a CollectionDef from the archive.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntity​(java.lang.String guid)
      Retrieve an entity from the archive.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef getEntityDef​(java.lang.String entityDefName)
      Retrieve the entityDef or null if it is not defined.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef getEnumDef​(java.lang.String enumDefName)
      Get an existing EnumDef from the archive.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch getPatchForType​(java.lang.String typeName)
      Create a skeleton patch for a TypeDefPatch.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef getPrimitiveDef​(java.lang.String primitiveDefName)
      Retrieve a PrimitiveDef from the archive.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship​(java.lang.String guid)
      Retrieve a relationship from the archive.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef getRelationshipDef​(java.lang.String relationshipDefName)
      Retrieve the relationshipDef or null if it is not defined.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByName​(java.lang.String typeName)
      Return the requested type definition if known.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension queryClassification​(java.lang.String entityGUID, java.lang.String classificationName)
      Retrieve a classification extension from the archive if it exists.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail queryEntity​(java.lang.String guid)
      Retrieve an entity from the archive if available.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship queryRelationship​(java.lang.String guid)
      Retrieve a relationship from the archive if it exists.
      void setArchiveProperties​(java.lang.String archiveGUID, java.lang.String archiveName, java.lang.String archiveDescription, OpenMetadataArchiveType archiveType, java.lang.String archiveVersion, java.lang.String originatorName, java.lang.String originatorLicense, java.util.Date creationDate, java.util.List<OpenMetadataArchive> dependsOnArchives)
      Set up archive header.
    • Method Detail

      • setArchiveProperties

        void setArchiveProperties​(java.lang.String archiveGUID,
                                  java.lang.String archiveName,
                                  java.lang.String archiveDescription,
                                  OpenMetadataArchiveType archiveType,
                                  java.lang.String archiveVersion,
                                  java.lang.String originatorName,
                                  java.lang.String originatorLicense,
                                  java.util.Date creationDate,
                                  java.util.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​(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

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

        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

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

        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

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

        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

        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef getClassificationDef​(java.lang.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​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef entityDef)
        Add a new EntityDef to the archive.
        Parameters:
        entityDef - type to add
      • getEntityDef

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

        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef getRelationshipDef​(java.lang.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​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef relationshipDef)
        Add a new RelationshipDef to the archive.
        Parameters:
        relationshipDef - type to add
      • getPatchForType

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

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

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

        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

        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntity​(java.lang.String guid)
        Retrieve an entity from the archive. Throw an exception if not present.
        Parameters:
        guid - unique identifier
        Returns:
        requested entity
      • queryEntity

        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail queryEntity​(java.lang.String guid)
        Retrieve an entity from the archive if available.
        Parameters:
        guid - unique identifier
        Returns:
        requested entity
      • addRelationship

        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

        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship​(java.lang.String guid)
        Retrieve a relationship from the archive. Throw an exception if not present.
        Parameters:
        guid - unique identifier
        Returns:
        requested relationship
      • queryRelationship

        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship queryRelationship​(java.lang.String guid)
        Retrieve a relationship from the archive if it exists.
        Parameters:
        guid - unique identifier
        Returns:
        requested relationship
      • addClassification

        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

        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension getClassification​(java.lang.String entityGUID,
                                                                                                                                                                java.lang.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

        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension queryClassification​(java.lang.String entityGUID,
                                                                                                                                                                  java.lang.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