Class OMRSMetadataCollection

  • All Implemented Interfaces:
    AuditLoggingComponent
    Direct Known Subclasses:
    OMRSMetadataCollectionBase, OMRSRESTMetadataCollection

    public abstract class OMRSMetadataCollection
    extends java.lang.Object
    implements AuditLoggingComponent

    OMRSMetadataInstanceStore is the common interface for working with the contents of a metadata repository. Within a metadata collection are the type definitions (TypeDefs) and metadata instances (Entities and Relationships). The methods on OMRSMetadataInstanceStore are in the following major groups:

    • Methods to retrieve information about the metadata repository - Used to retrieve or confirm the identity of the metadata repository
    • Methods for working with typedefs - Typedefs are used to define the type model for open metadata. The open metadata support had a comprehensive set of typedefs implemented, and these can be augmented by different vendors or applications. The typedefs can be queried, created, updated and deleted though the metadata collection.
    • Methods for querying Entities and Relationships - The metadata repository stores instances of the typedefs as metadata instances. Principally these are entities (nodes in the graph) and relationships (links between nodes). Both the entities and relationships can have properties. The entity may also have structured properties called classifications attached. This second group of methods supports a range of queries to retrieve these instances.
    • Methods for maintaining the instances - The fourth group of methods supports the maintenance of the metadata instances. Each instance as a status (see InstanceStatus) that allows an instance to be proposed, drafted and approved before it becomes active. The instances can also be soft-deleted and restored or purged from the metadata collection.
    • Methods for repairing the metadata collections of the cohort - The fifth group of methods are for editing the control information of entities and relationships to manage changes in the cohort. These methods are advanced methods and are rarely used.
    • Methods for local maintenance of a metadata collection The final group of methods are for removing reference copies of the metadata instances. These updates are not broadcast to the rest of the Cohort as events.
    OMRSMetadataCollection supports asynchronous message processing. To ensure that messages are not recorded as processed until all asynchronous message processing has completed, call OMRSEventProcessingContext.addAsyncProcessingResult(java.util.concurrent.Future) with a Future that can be used to monitor the status of the processing.
    See Also:
    for more details.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      abstract void addAttributeTypeDef​(java.lang.String userId, AttributeTypeDef newAttributeTypeDef)
      Create a definition of a new AttributeTypeDef.
      abstract EntityDetail addEntity​(java.lang.String userId, java.lang.String entityTypeGUID, InstanceProperties initialProperties, java.util.List<Classification> initialClassifications, InstanceStatus initialStatus)
      Create a new entity and put it in the requested state.
      abstract void addEntityProxy​(java.lang.String userId, EntityProxy entityProxy)
      Create an entity proxy in the metadata collection.
      EntityDetail addExternalEntity​(java.lang.String userId, java.lang.String entityTypeGUID, java.lang.String externalSourceGUID, java.lang.String externalSourceName, InstanceProperties initialProperties, java.util.List<Classification> initialClassifications, InstanceStatus initialStatus)
      Save a new entity that is sourced from an external technology.
      Relationship addExternalRelationship​(java.lang.String userId, java.lang.String relationshipTypeGUID, java.lang.String externalSourceGUID, java.lang.String externalSourceName, InstanceProperties initialProperties, java.lang.String entityOneGUID, java.lang.String entityTwoGUID, InstanceStatus initialStatus)
      Save a new relationship that is sourced from an external technology.
      abstract Relationship addRelationship​(java.lang.String userId, java.lang.String relationshipTypeGUID, InstanceProperties initialProperties, java.lang.String entityOneGUID, java.lang.String entityTwoGUID, InstanceStatus initialStatus)
      Add a new relationship between two entities to the metadata collection.
      abstract void addTypeDef​(java.lang.String userId, TypeDef newTypeDef)
      Create a definition of a new TypeDef.
      abstract void addTypeDefGallery​(java.lang.String userId, TypeDefGallery newTypes)
      Create a collection of related types.
      protected void basicRequestValidation​(java.lang.String userId, java.lang.String methodName)
      Verify that the repository is valid, active and there is a userId present.
      EntityDetail classifyEntity​(java.lang.String userId, java.lang.String entityGUID, java.lang.String classificationName, java.lang.String externalSourceGUID, java.lang.String externalSourceName, ClassificationOrigin classificationOrigin, java.lang.String classificationOriginGUID, InstanceProperties classificationProperties)
      Add the requested classification to a specific entity.
      abstract EntityDetail classifyEntity​(java.lang.String userId, java.lang.String entityGUID, java.lang.String classificationName, InstanceProperties classificationProperties)
      Add the requested classification to a specific entity.
      Classification classifyEntity​(java.lang.String userId, EntityProxy entityProxy, java.lang.String classificationName, java.lang.String externalSourceGUID, java.lang.String externalSourceName, ClassificationOrigin classificationOrigin, java.lang.String classificationOriginGUID, InstanceProperties classificationProperties)
      Add the requested classification to a specific entity.
      Classification classifyEntity​(java.lang.String userId, EntityProxy entityProxy, java.lang.String classificationName, InstanceProperties classificationProperties)
      Add the requested classification to a specific entity.
      abstract EntityDetail declassifyEntity​(java.lang.String userId, java.lang.String entityGUID, java.lang.String classificationName)
      Remove a specific classification from an entity.
      Classification declassifyEntity​(java.lang.String userId, EntityProxy entityProxy, java.lang.String classificationName)
      Remove a specific classification from an entity.
      abstract void deleteAttributeTypeDef​(java.lang.String userId, java.lang.String obsoleteTypeDefGUID, java.lang.String obsoleteTypeDefName)
      Delete an AttributeTypeDef.
      abstract EntityDetail deleteEntity​(java.lang.String userId, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String obsoleteEntityGUID)
      Delete an entity.
      void deleteEntityReferenceCopy​(java.lang.String userId, EntityDetail entity)
      Remove a reference copy of the entity from the local repository.
      abstract Relationship deleteRelationship​(java.lang.String userId, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String obsoleteRelationshipGUID)
      Delete a specific relationship.
      void deleteRelationshipReferenceCopy​(java.lang.String userId, Relationship relationship)
      Remove the reference copy of the relationship from the local repository.
      abstract void deleteTypeDef​(java.lang.String userId, java.lang.String obsoleteTypeDefGUID, java.lang.String obsoleteTypeDefName)
      Delete the TypeDef.
      abstract java.util.List<AttributeTypeDef> findAttributeTypeDefsByCategory​(java.lang.String userId, AttributeTypeDefCategory category)
      Returns all the AttributeTypeDefs for a specific category.
      abstract java.util.List<EntityDetail> findEntities​(java.lang.String userId, java.lang.String entityTypeGUID, java.util.List<java.lang.String> entitySubtypeGUIDs, SearchProperties matchProperties, int fromEntityElement, java.util.List<InstanceStatus> limitResultsByStatus, SearchClassifications matchClassifications, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return a list of entities that match the supplied criteria.
      abstract java.util.List<EntityDetail> findEntitiesByClassification​(java.lang.String userId, java.lang.String entityTypeGUID, java.lang.String classificationName, InstanceProperties matchClassificationProperties, MatchCriteria matchCriteria, int fromEntityElement, java.util.List<InstanceStatus> limitResultsByStatus, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return a list of entities that have the requested type of classifications attached.
      abstract java.util.List<EntityDetail> findEntitiesByProperty​(java.lang.String userId, java.lang.String entityTypeGUID, InstanceProperties matchProperties, MatchCriteria matchCriteria, int fromEntityElement, java.util.List<InstanceStatus> limitResultsByStatus, java.util.List<java.lang.String> limitResultsByClassification, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return a list of entities that match the supplied properties according to the match criteria.
      abstract java.util.List<EntityDetail> findEntitiesByPropertyValue​(java.lang.String userId, java.lang.String entityTypeGUID, java.lang.String searchCriteria, int fromEntityElement, java.util.List<InstanceStatus> limitResultsByStatus, java.util.List<java.lang.String> limitResultsByClassification, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return a list of entities whose string based property values match the search criteria.
      abstract java.util.List<Relationship> findRelationships​(java.lang.String userId, java.lang.String relationshipTypeGUID, java.util.List<java.lang.String> relationshipSubtypeGUIDs, SearchProperties matchProperties, int fromRelationshipElement, java.util.List<InstanceStatus> limitResultsByStatus, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return a list of relationships that match the requested conditions.
      abstract java.util.List<Relationship> findRelationshipsByProperty​(java.lang.String userId, java.lang.String relationshipTypeGUID, InstanceProperties matchProperties, MatchCriteria matchCriteria, int fromRelationshipElement, java.util.List<InstanceStatus> limitResultsByStatus, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return a list of relationships that match the requested properties by the matching criteria.
      abstract java.util.List<Relationship> findRelationshipsByPropertyValue​(java.lang.String userId, java.lang.String relationshipTypeGUID, java.lang.String searchCriteria, int fromRelationshipElement, java.util.List<InstanceStatus> limitResultsByStatus, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return a list of relationships whose string based property values match the search criteria.
      abstract java.util.List<TypeDef> findTypeDefsByCategory​(java.lang.String userId, TypeDefCategory category)
      Returns all the TypeDefs for a specific category.
      abstract java.util.List<TypeDef> findTypeDefsByProperty​(java.lang.String userId, TypeDefProperties matchCriteria)
      Return the TypeDefs that have the properties matching the supplied match criteria.
      abstract java.util.List<TypeDef> findTypesByExternalID​(java.lang.String userId, java.lang.String standard, java.lang.String organization, java.lang.String identifier)
      Return the types that are linked to the elements from the specified standard.
      abstract TypeDefGallery findTypesByName​(java.lang.String userId, java.lang.String name)
      Returns a list of type definitions that have the specified name.
      abstract TypeDefGallery getAllTypes​(java.lang.String userId)
      Returns the list of different types of metadata organized into two groups.
      abstract AttributeTypeDef getAttributeTypeDefByGUID​(java.lang.String userId, java.lang.String guid)
      Return the AttributeTypeDef identified by the GUID.
      abstract AttributeTypeDef getAttributeTypeDefByName​(java.lang.String userId, java.lang.String name)
      Return the AttributeTypeDef identified by the unique name.
      ComponentDescription getConnectorComponentDescription()
      Return the component description that is used by this connector in the audit log.
      abstract EntityDetail getEntityDetail​(java.lang.String userId, java.lang.String guid)
      Return the header, classifications and properties of a specific entity.
      abstract EntityDetail getEntityDetail​(java.lang.String userId, java.lang.String guid, java.util.Date asOfTime)
      Return a historical version of an entity.
      abstract java.util.List<EntityDetail> getEntityDetailHistory​(java.lang.String userId, java.lang.String guid, java.util.Date fromTime, java.util.Date toTime, int startFromElement, int pageSize, HistorySequencingOrder sequencingOrder)
      Return all historical versions of an entity within the bounds of the provided timestamps.
      abstract InstanceGraph getEntityNeighborhood​(java.lang.String userId, java.lang.String entityGUID, java.util.List<java.lang.String> entityTypeGUIDs, java.util.List<java.lang.String> relationshipTypeGUIDs, java.util.List<InstanceStatus> limitResultsByStatus, java.util.List<java.lang.String> limitResultsByClassification, java.util.Date asOfTime, int level)
      Return the entities and relationships that radiate out from the supplied entity GUID.
      abstract EntitySummary getEntitySummary​(java.lang.String userId, java.lang.String guid)
      Return the header and classifications for a specific entity.
      java.util.List<Classification> getHomeClassifications​(java.lang.String userId, java.lang.String entityGUID)
      Retrieve any locally homed classifications assigned to the requested entity.
      java.util.List<Classification> getHomeClassifications​(java.lang.String userId, java.lang.String entityGUID, java.util.Date asOfTime)
      Retrieve any locally homed classifications assigned to the requested entity.
      abstract InstanceGraph getLinkingEntities​(java.lang.String userId, java.lang.String startEntityGUID, java.lang.String endEntityGUID, java.util.List<InstanceStatus> limitResultsByStatus, java.util.Date asOfTime)
      Return all the relationships and intermediate entities that connect the startEntity with the endEntity.
      java.lang.String getMetadataCollectionId()
      Deprecated.
      java.lang.String getMetadataCollectionId​(java.lang.String userId)
      Returns the identifier of the metadata repository.
      abstract java.util.List<EntityDetail> getRelatedEntities​(java.lang.String userId, java.lang.String startEntityGUID, java.util.List<java.lang.String> entityTypeGUIDs, int fromEntityElement, java.util.List<InstanceStatus> limitResultsByStatus, java.util.List<java.lang.String> limitResultsByClassification, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return the list of entities that are of the types listed in entityTypeGUIDs and are connected, either directly or indirectly to the entity identified by startEntityGUID.
      abstract Relationship getRelationship​(java.lang.String userId, java.lang.String guid)
      Return the current version of a requested relationship.
      abstract Relationship getRelationship​(java.lang.String userId, java.lang.String guid, java.util.Date asOfTime)
      Return a historical version of a relationship.
      abstract java.util.List<Relationship> getRelationshipHistory​(java.lang.String userId, java.lang.String guid, java.util.Date fromTime, java.util.Date toTime, int startFromElement, int pageSize, HistorySequencingOrder sequencingOrder)
      Return all historical versions of a relationship within the bounds of the provided timestamps.
      abstract java.util.List<Relationship> getRelationshipsForEntity​(java.lang.String userId, java.lang.String entityGUID, java.lang.String relationshipTypeGUID, int fromRelationshipElement, java.util.List<InstanceStatus> limitResultsByStatus, java.util.Date asOfTime, java.lang.String sequencingProperty, SequencingOrder sequencingOrder, int pageSize)
      Return the relationships for a specific entity.
      abstract TypeDef getTypeDefByGUID​(java.lang.String userId, java.lang.String guid)
      Return the TypeDef identified by the GUID.
      abstract TypeDef getTypeDefByName​(java.lang.String userId, java.lang.String name)
      Return the TypeDef identified by the unique name.
      abstract EntityDetail isEntityKnown​(java.lang.String userId, java.lang.String guid)
      Returns the entity if the entity is stored in the metadata collection, otherwise null.
      abstract Relationship isRelationshipKnown​(java.lang.String userId, java.lang.String guid)
      Returns a relationship indicating if the relationship is stored in the metadata collection.
      void purgeClassificationReferenceCopy​(java.lang.String userId, EntityDetail entity, Classification classification)
      Remove the reference copy of the classification from the local repository.
      void purgeClassificationReferenceCopy​(java.lang.String userId, EntityProxy entity, Classification classification)
      Remove the reference copy of the classification from the local repository.
      abstract void purgeEntity​(java.lang.String userId, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String deletedEntityGUID)
      Permanently removes a deleted entity from the metadata collection.
      abstract void purgeEntityReferenceCopy​(java.lang.String userId, java.lang.String entityGUID, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String homeMetadataCollectionId)
      Remove a reference copy of the entity from the local repository.
      void purgeEntityReferenceCopy​(java.lang.String userId, EntityDetail entity)
      Remove a reference copy of the entity from the local repository.
      abstract void purgeRelationship​(java.lang.String userId, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String deletedRelationshipGUID)
      Permanently delete the relationship from the repository.
      abstract void purgeRelationshipReferenceCopy​(java.lang.String userId, java.lang.String relationshipGUID, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String homeMetadataCollectionId)
      Typically this method is called when a remote repository calls Remove the reference copy of the relationship from the local repository.
      void purgeRelationshipReferenceCopy​(java.lang.String userId, Relationship relationship)
      This method is called when a remote repository calls the variant of purgeRelationship that passes the relationship object.
      abstract void refreshEntityReferenceCopy​(java.lang.String userId, java.lang.String entityGUID, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String homeMetadataCollectionId)
      The local repository has requested that the repository that hosts the home metadata collection for the specified entity sends out the details of this entity so the local repository can create a reference copy.
      abstract void refreshRelationshipReferenceCopy​(java.lang.String userId, java.lang.String relationshipGUID, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String homeMetadataCollectionId)
      The local server has requested that the repository that hosts the home metadata collection for the specified relationship sends out the details of this relationship so the local repository can create a reference copy.
      EntityDetail reHomeEntity​(java.lang.String userId, java.lang.String entityGUID, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String homeMetadataCollectionId, java.lang.String newHomeMetadataCollectionId)
      Deprecated.
      EntityDetail reHomeEntity​(java.lang.String userId, java.lang.String entityGUID, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String homeMetadataCollectionId, java.lang.String newHomeMetadataCollectionId, java.lang.String newHomeMetadataCollectionName)
      Change the home of an existing entity.
      Relationship reHomeRelationship​(java.lang.String userId, java.lang.String relationshipGUID, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String homeMetadataCollectionId, java.lang.String newHomeMetadataCollectionId)
      Deprecated.
      Relationship reHomeRelationship​(java.lang.String userId, java.lang.String relationshipGUID, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String homeMetadataCollectionId, java.lang.String newHomeMetadataCollectionId, java.lang.String newHomeMetadataCollectionName)
      Change the home of an existing relationship.
      abstract AttributeTypeDef reIdentifyAttributeTypeDef​(java.lang.String userId, java.lang.String originalAttributeTypeDefGUID, java.lang.String originalAttributeTypeDefName, java.lang.String newAttributeTypeDefGUID, java.lang.String newAttributeTypeDefName)
      Change the guid or name of an existing TypeDef to a new value.
      abstract EntityDetail reIdentifyEntity​(java.lang.String userId, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String entityGUID, java.lang.String newEntityGUID)
      Change the guid of an existing entity to a new value.
      abstract Relationship reIdentifyRelationship​(java.lang.String userId, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String relationshipGUID, java.lang.String newRelationshipGUID)
      Change the guid of an existing relationship.
      abstract TypeDef reIdentifyTypeDef​(java.lang.String userId, java.lang.String originalTypeDefGUID, java.lang.String originalTypeDefName, java.lang.String newTypeDefGUID, java.lang.String newTypeDefName)
      Change the guid or name of an existing TypeDef to a new value.
      protected void reportUnsupportedOptionalFunction​(java.lang.String methodName)
      Return an exception to indicate that the method is unsupported but this is ok because it is optional.
      abstract EntityDetail restoreEntity​(java.lang.String userId, java.lang.String deletedEntityGUID)
      Restore the requested entity to the state it was before it was deleted.
      abstract Relationship restoreRelationship​(java.lang.String userId, java.lang.String deletedRelationshipGUID)
      Restore a deleted relationship into the metadata collection.
      abstract EntityDetail reTypeEntity​(java.lang.String userId, java.lang.String entityGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary)
      Change the existing entity's type.
      abstract Relationship reTypeRelationship​(java.lang.String userId, java.lang.String relationshipGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary)
      Change the existing relationship's type.
      void saveClassificationReferenceCopy​(java.lang.String userId, EntityDetail entity, Classification classification)
      Save the classification as a reference copy.
      void saveClassificationReferenceCopy​(java.lang.String userId, EntityProxy entity, Classification classification)
      Save the classification as a reference copy.
      abstract void saveEntityReferenceCopy​(java.lang.String userId, EntityDetail entity)
      Save the entity as a reference copy.
      void saveInstanceReferenceCopies​(java.lang.String userId, InstanceGraph instances)
      Save the entities and relationships supplied in the instance graph as a reference copies.
      abstract void saveRelationshipReferenceCopy​(java.lang.String userId, Relationship relationship)
      Save the relationship as a reference copy.
      abstract java.util.List<TypeDef> searchForTypeDefs​(java.lang.String userId, java.lang.String searchCriteria)
      Return the TypeDefs that match the search criteria.
      void setAuditLog​(AuditLog auditLog)
      Receive an audit log object that can be used to record audit log messages.
      abstract EntityDetail undoEntityUpdate​(java.lang.String userId, java.lang.String entityGUID)
      Undo the last update to an entity and return the previous content.
      abstract Relationship undoRelationshipUpdate​(java.lang.String userId, java.lang.String relationshipGUID)
      Undo the latest change to a relationship (either a change of properties or status).
      abstract EntityDetail updateEntityClassification​(java.lang.String userId, java.lang.String entityGUID, java.lang.String classificationName, InstanceProperties properties)
      Update one or more properties in one of an entity's classifications.
      Classification updateEntityClassification​(java.lang.String userId, EntityProxy entityProxy, java.lang.String classificationName, InstanceProperties properties)
      Update one or more properties in one of an entity's classifications.
      abstract EntityDetail updateEntityProperties​(java.lang.String userId, java.lang.String entityGUID, InstanceProperties properties)
      Update selected properties in an entity.
      abstract EntityDetail updateEntityStatus​(java.lang.String userId, java.lang.String entityGUID, InstanceStatus newStatus)
      Update the status for a specific entity.
      abstract Relationship updateRelationshipProperties​(java.lang.String userId, java.lang.String relationshipGUID, InstanceProperties properties)
      Update the properties of a specific relationship.
      abstract Relationship updateRelationshipStatus​(java.lang.String userId, java.lang.String relationshipGUID, InstanceStatus newStatus)
      Update the status of a specific relationship.
      abstract TypeDef updateTypeDef​(java.lang.String userId, TypeDefPatch typeDefPatch)
      Update one or more properties of the TypeDef.
      void validateRepositoryConnector​(java.lang.String methodName)
      Verify that a metadata collection is operating with a parent connector.
      abstract boolean verifyAttributeTypeDef​(java.lang.String userId, AttributeTypeDef attributeTypeDef)
      Verify that a definition of an AttributeTypeDef is either new or matches the definition already stored.
      abstract boolean verifyTypeDef​(java.lang.String userId, TypeDef typeDef)
      Verify that a definition of a TypeDef is either new or matches the definition already stored.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait