Class OMRSArchiveBuilder

    • Constructor Summary

      Constructors 
      Constructor Description
      OMRSArchiveBuilder​(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)
      Full constructor.
      OMRSArchiveBuilder​(java.lang.String archiveGUID, java.lang.String archiveName, java.lang.String archiveDescription, OpenMetadataArchiveType archiveType, java.lang.String originatorName, java.lang.String originatorLicense, java.util.Date creationDate, java.util.List<OpenMetadataArchive> dependsOnArchives)
      Constructor for licensed material.
      OMRSArchiveBuilder​(java.lang.String archiveGUID, java.lang.String archiveName, java.lang.String archiveDescription, OpenMetadataArchiveType archiveType, java.lang.String originatorName, java.util.Date creationDate, java.util.List<OpenMetadataArchive> dependsOnArchives)
      Simple constructor.
      OMRSArchiveBuilder​(OpenMetadataArchiveProperties properties)
      Constructor used when content of dependent archives is not needed in the maps.
    • Method Summary

      All Methods Instance Methods Concrete 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.
      OpenMetadataArchive getOpenMetadataArchive()
      Once 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.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.
      void logBadArchiveContent​(java.lang.String methodName)
      Throws an exception if there is a problem retrieving the archive.
      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.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship queryRelationship​(java.lang.String guid)
      Retrieve a relationship from the archive.
      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 and initialize the maps assuming it is building a new archive.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OMRSArchiveBuilder

        public OMRSArchiveBuilder​(java.lang.String archiveGUID,
                                  java.lang.String archiveName,
                                  java.lang.String archiveDescription,
                                  OpenMetadataArchiveType archiveType,
                                  java.lang.String originatorName,
                                  java.util.Date creationDate,
                                  java.util.List<OpenMetadataArchive> dependsOnArchives)
        Simple constructor.
        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.
        originatorName - name of the originator (person or organization) of the archive.
        creationDate - data that this archive was created.
        dependsOnArchives - list of GUIDs for archives that this archive depends on (null for no dependencies).
      • OMRSArchiveBuilder

        public OMRSArchiveBuilder​(java.lang.String archiveGUID,
                                  java.lang.String archiveName,
                                  java.lang.String archiveDescription,
                                  OpenMetadataArchiveType archiveType,
                                  java.lang.String originatorName,
                                  java.lang.String originatorLicense,
                                  java.util.Date creationDate,
                                  java.util.List<OpenMetadataArchive> dependsOnArchives)
        Constructor for licensed material. 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.
        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).
      • OMRSArchiveBuilder

        public OMRSArchiveBuilder​(OpenMetadataArchiveProperties properties)
        Constructor used when content of dependent archives is not needed in the maps.
        Parameters:
        properties - filled out archive properties
      • OMRSArchiveBuilder

        public OMRSArchiveBuilder​(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)
        Full constructor. 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).
    • Method Detail

      • setArchiveProperties

        public 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 and initialize the maps assuming it is building a new archive. 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:
        setArchiveProperties in interface 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).
      • addPrimitiveDef

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

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef getPrimitiveDef​(java.lang.String primitiveDefName)
        Retrieve a PrimitiveDef from the archive.
        Specified by:
        getPrimitiveDef in interface 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:
        addCollectionDef in interface OpenMetadataArchiveBuilder
        Parameters:
        collectionDef - type to add
      • getCollectionDef

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef getCollectionDef​(java.lang.String collectionDefName)
        Retrieve a CollectionDef from the archive.
        Specified by:
        getCollectionDef in interface 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:
        addEnumDef in interface OpenMetadataArchiveBuilder
        Parameters:
        enumDef - type to add
      • getEnumDef

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef getEnumDef​(java.lang.String enumDefName)
        Get an existing EnumDef from the archive.
        Specified by:
        getEnumDef in interface 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:
        addClassificationDef in interface 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:
        addEntityDef in interface OpenMetadataArchiveBuilder
        Parameters:
        entityDef - type to add
      • getEntityDef

        public 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.
        Specified by:
        getEntityDef in interface 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​(java.lang.String relationshipDefName)
        Retrieve the relationshipDef or null if it is not defined.
        Specified by:
        getRelationshipDef in interface 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​(java.lang.String classificationDef)
        Retrieve the relationshipDef or null if it is not defined.
        Specified by:
        getClassificationDef in interface 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:
        addRelationshipDef in interface OpenMetadataArchiveBuilder
        Parameters:
        relationshipDef - type to add
      • getPatchForType

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch getPatchForType​(java.lang.String typeName)
        Create a skeleton patch for a TypeDefPatch.
        Specified by:
        getPatchForType in interface 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:
        addTypeDefPatch in interface OpenMetadataArchiveBuilder
        Parameters:
        typeDefPatch - patch
      • getTypeDefByName

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByName​(java.lang.String typeName)
        Return the requested type definition if known.
        Specified by:
        getTypeDefByName in interface 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:
        addEntity in interface OpenMetadataArchiveBuilder
        Parameters:
        entity - instance to add
      • getEntity

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntity​(java.lang.String guid)
        Retrieve an entity from the archive.
        Specified by:
        getEntity in interface OpenMetadataArchiveBuilder
        Parameters:
        guid - unique identifier
        Returns:
        requested entity
      • queryEntity

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail queryEntity​(java.lang.String guid)
        Retrieve an entity from the archive. Return null if it does not exist
        Specified by:
        queryEntity in interface 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:
        addRelationship in interface OpenMetadataArchiveBuilder
        Parameters:
        relationship - instance to add
      • getRelationship

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship​(java.lang.String guid)
        Retrieve a relationship from the archive.
        Specified by:
        getRelationship in interface OpenMetadataArchiveBuilder
        Parameters:
        guid - unique identifier
        Returns:
        requested relationship
      • queryRelationship

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship queryRelationship​(java.lang.String guid)
        Retrieve a relationship from the archive.
        Specified by:
        queryRelationship in interface 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:
        addClassification in interface OpenMetadataArchiveBuilder
        Parameters:
        classification - instance to add
      • getClassification

        public 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.
        Specified by:
        getClassification in interface OpenMetadataArchiveBuilder
        Parameters:
        entityGUID - unique identifier of entity
        classificationName - name of the classification
        Returns:
        requested classification extension
      • queryClassification

        public 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
        Specified by:
        queryClassification in interface OpenMetadataArchiveBuilder
        Parameters:
        entityGUID - unique identifier of entity
        classificationName - name of the classification
        Returns:
        requested classification extension
      • getOpenMetadataArchive

        public OpenMetadataArchive getOpenMetadataArchive()
        Once the content of the archive has been added to the archive builder, an archive object can be retrieved.
        Specified by:
        getOpenMetadataArchive in interface OpenMetadataArchiveCache
        Returns:
        open metadata archive object with all the supplied content in it.
      • logBadArchiveContent

        public void logBadArchiveContent​(java.lang.String methodName)
        Throws an exception if there is a problem retrieving the archive.
        Parameters:
        methodName - calling method