Class ReadOnlyOMRSMetadataCollection
java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollectionBase
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSDynamicTypeMetadataCollectionBase
org.odpi.openmetadata.adapters.repositoryservices.inmemory.repositoryconnector.InMemoryOMRSMetadataCollection
org.odpi.openmetadata.adapters.repositoryservices.readonly.repositoryconnector.ReadOnlyOMRSMetadataCollection
- All Implemented Interfaces:
AuditLoggingComponent
The ReadOnlyOMRSMetadataCollection represents a metadata repository that supports an in-memory repository whose content
is read-only. It is typically populated by open metadata archives.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection
auditLog, metadataCollectionId, metadataCollectionName, parentConnector, repositoryHelper, repositoryName, repositoryValidator
-
Method Summary
Modifier and TypeMethodDescriptionaddEntity
(String userId, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) Create a new entity and put it in the requested state.void
addEntityProxy
(String userId, EntityProxy entityProxy) Create an entity proxy in the metadata collection.addExternalEntity
(String userId, String entityTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) Save a new entity that is sourced from an external technology.addExternalRelationship
(String userId, String relationshipTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, String entityOneGUID, String entityTwoGUID, InstanceStatus initialStatus) Save a new relationship that is sourced from an external technology.addRelationship
(String userId, String relationshipTypeGUID, InstanceProperties initialProperties, String entityOneGUID, String entityTwoGUID, InstanceStatus initialStatus) Add a new relationship between two entities to the metadata collection.classifyEntity
(String userId, String entityGUID, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties) Add the requested classification to a specific entity.classifyEntity
(String userId, String entityGUID, String classificationName, InstanceProperties classificationProperties) Add the requested classification to a specific entity.classifyEntity
(String userId, EntityProxy entityProxy, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties) Add the requested classification to a specific entity.classifyEntity
(String userId, EntityProxy entityProxy, String classificationName, InstanceProperties classificationProperties) Add the requested classification to a specific entity.declassifyEntity
(String userId, String entityGUID, String classificationName) Remove a specific classification from an entity.declassifyEntity
(String userId, EntityProxy entityProxy, String classificationName) Remove a specific classification from an entity.deleteEntity
(String userId, String typeDefGUID, String typeDefName, String obsoleteEntityGUID) Delete an entity.deleteRelationship
(String userId, String typeDefGUID, String typeDefName, String obsoleteRelationshipGUID) Delete a specific relationship.void
purgeEntity
(String userId, String typeDefGUID, String typeDefName, String deletedEntityGUID) Permanently removes a deleted entity from the metadata collection.void
purgeRelationship
(String userId, String typeDefGUID, String typeDefName, String deletedRelationshipGUID) Permanently delete the relationship from the repository.reHomeEntity
(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Change the home of an existing entity.reHomeRelationship
(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Change the home of an existing relationship.reIdentifyEntity
(String userId, String typeDefGUID, String typeDefName, String entityGUID, String newEntityGUID) Change the guid of an existing entity to a new value.reIdentifyRelationship
(String userId, String typeDefGUID, String typeDefName, String relationshipGUID, String newRelationshipGUID) Change the guid of an existing relationship.restoreEntity
(String userId, String deletedEntityGUID) Restore the requested entity to the state it was before it was deleted.restoreRelationship
(String userId, String deletedRelationshipGUID) Restore a deleted relationship into the metadata collection.reTypeEntity
(String userId, String entityGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary) Change the type for an existing entity.reTypeRelationship
(String userId, String relationshipGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary) Change the type for an existing relationship.void
saveClassificationReferenceCopy
(String userId, EntityDetail entity, Classification classification) Save the classification as a reference copy.void
saveClassificationReferenceCopy
(String userId, EntityProxy entityProxy, Classification classification) Save the classification as a reference copy.void
saveEntityReferenceCopy
(String userId, EntityDetail entity) Save the entity as a reference copy.void
saveRelationshipReferenceCopy
(String userId, Relationship relationship) Save the relationship as a reference copy.undoEntityUpdate
(String userId, String entityGUID) Undo the last update to an entity and return the previous content.undoRelationshipUpdate
(String userId, String relationshipGUID) Undo the latest change to a relationship (either a change of properties or status).updateEntityClassification
(String userId, String entityGUID, String classificationName, InstanceProperties properties) Update one or more properties in one of an entity's classifications.updateEntityClassification
(String userId, EntityProxy entityProxy, String classificationName, InstanceProperties properties) Update one or more properties in one of an entity's classifications.updateEntityProperties
(String userId, String entityGUID, InstanceProperties properties) Update selected properties in an entity.updateEntityStatus
(String userId, String entityGUID, InstanceStatus newStatus) Update the status for a specific entity.updateRelationshipProperties
(String userId, String relationshipGUID, InstanceProperties properties) Update the properties of a specific relationship.updateRelationshipStatus
(String userId, String relationshipGUID, InstanceStatus newStatus) Update the status of a specific relationship.Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.inmemory.repositoryconnector.InMemoryOMRSMetadataCollection
findEntities, findEntitiesByClassification, findEntitiesByProperty, findEntitiesByPropertyValue, findRelationships, findRelationshipsByProperty, findRelationshipsByPropertyValue, getEntityDetail, getEntityDetail, getEntityDetailHistory, getEntityNeighborhood, getEntitySummary, getHomeClassifications, getRelationship, getRelationship, getRelationshipHistory, getRelationshipsForEntity, isEntityKnown, isRelationshipKnown, purgeClassificationReferenceCopy, purgeClassificationReferenceCopy, purgeEntityReferenceCopy, purgeRelationshipReferenceCopy
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSDynamicTypeMetadataCollectionBase
addAttributeTypeDef, addTypeDef, deleteAttributeTypeDef, deleteTypeDef, getHomeClassifications, reIdentifyAttributeTypeDef, reIdentifyTypeDef, updateTypeDef, verifyAttributeTypeDef, verifyTypeDef
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollectionBase
addEntityParameterValidation, addEntityParameterValidation, addEntityProxyParameterValidation, addExternalEntityParameterValidation, addExternalRelationshipParameterValidation, addRelationshipParameterValidation, addRelationshipParameterValidation, addTypeDefGallery, attributeTypeDefCategoryParameterValidation, attributeTypeDefParameterValidation, classifyEntityParameterValidation, classifyEntityParameterValidation, classifyEntityParameterValidation, declassifyEntityParameterValidation, declassifyEntityParameterValidation, declassifyEntityParameterValidation, deleteEntityReferenceCopy, deleteRelationshipReferenceCopy, filterAttributeTypeDefsByCategory, filterAttributeTypeDefsByGUID, filterAttributeTypeDefsByName, filterTypeDefsByCategory, filterTypeDefsByGUID, filterTypeDefsByName, filterTypeDefsByProperty, filterTypeDefsBySearchCriteria, filterTypesByExternalID, filterTypesByWildCardName, findAttributeTypeDefsByCategory, findEntitiesByClassificationParameterValidation, findEntitiesByPropertyParameterValidation, findEntitiesByPropertyValueParameterValidation, findEntitiesParameterValidation, findRelationshipsByPropertyParameterValidation, findRelationshipsByPropertyValueParameterValidation, findRelationshipsParameterValidation, findTypeDefsByCategory, findTypeDefsByProperty, findTypesByExternalID, findTypesByName, getAllTypes, getAttributeTypeDefByGUID, getAttributeTypeDefByName, getEntityNeighborhoodParameterValidation, getEntityProxy, getInstanceHistoryParameterValidation, getInstanceParameterValidation, getInstanceParameterValidation, getLinkingEntities, getLinkingEntitiesParameterValidation, getMetadataCollectionId, getRelatedEntities, getRelatedEntitiesParameterValidation, getRelationshipsForEntityParameterValidation, getTypeDefByGUID, getTypeDefByName, getTypeDefForInstance, manageAttributeTypeDefParameterValidation, manageInstanceParameterValidation, manageInstanceParameterValidation, manageInstanceParameterValidation, manageReferenceInstanceParameterValidation, manageTypeDefParameterValidation, newAttributeTypeDefParameterValidation, newTypeDefParameterValidation, purgeEntityReferenceCopy, purgeRelationshipReferenceCopy, referenceInstanceParameterValidation, refreshEntityReferenceCopy, refreshRelationshipReferenceCopy, reHomeInstanceParameterValidation, reIdentifyInstanceParameterValidation, removeInstanceParameterValidation, reportEntityNotKnown, reportEntityNotKnown, reportEntityProxyOnly, reportRelationshipNotKnown, reportTypeDefAlreadyDefined, reportTypeDefConflict, reportTypeDefInUse, reportTypeDefNotSupported, reportUnknownTypeGUID, reportUnknownTypeName, reportUnsupportedAsOfTimeFunction, reTypeInstanceParameterValidation, searchForTypeDefs, typeDefCategoryParameterValidation, typeDefExternalIDParameterValidation, typeDefParameterValidation, typeDefPropertyParameterValidation, typeDefSearchParameterValidation, typeGUIDParameterValidation, typeNameParameterValidation, updateEntityClassificationParameterValidation, updateEntityClassificationParameterValidation, updateInstancePropertiesPropertyValidation, updateInstanceStatusParameterValidation, updateTypeDefParameterValidation
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection
basicRequestValidation, getConnectorComponentDescription, getMetadataCollectionId, reHomeEntity, reHomeRelationship, reportUnsupportedOptionalFunction, saveInstanceReferenceCopies, setAuditLog, validateRepositoryConnector
-
Method Details
-
addEntity
public EntityDetail addEntity(String userId, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) throws FunctionNotSupportedException Create a new entity and put it in the requested state. The new entity is returned.- Overrides:
addEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityTypeGUID
- unique identifier (guid) for the new entity's type.initialProperties
- initial list of properties for the new entity - null means no properties.initialClassifications
- initial list of classifications for the new entity - null means no classifications.initialStatus
- initial status - typically DRAFT, PREPARED or ACTIVE.- Returns:
- EntityDetail showing the new header plus the requested properties and classifications. The entity will not have any relationships at this stage.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
addExternalEntity
public EntityDetail addExternalEntity(String userId, String entityTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) throws FunctionNotSupportedException Save a new entity that is sourced from an external technology. The external technology is identified by a GUID and a name. These can be recorded in a Software Server Capability (guid and qualifiedName respectively). The new entity is assigned a new GUID and put in the requested state. The new entity is returned.- Overrides:
addExternalEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityTypeGUID
- unique identifier (guid) for the new entity's type.externalSourceGUID
- unique identifier (guid) for the external source.externalSourceName
- unique name for the external source.initialProperties
- initial list of properties for the new entity; null means no properties.initialClassifications
- initial list of classifications for the new entity null means no classifications.initialStatus
- initial status typically DRAFT, PREPARED or ACTIVE.- Returns:
- EntityDetail showing the new header plus the requested properties and classifications. The entity will not have any relationships at this stage.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
addEntityProxy
public void addEntityProxy(String userId, EntityProxy entityProxy) throws FunctionNotSupportedException Create an entity proxy in the metadata collection. This is used to store relationships that span metadata repositories.- Overrides:
addEntityProxy
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityProxy
- details of entity to add.- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateEntityStatus
public EntityDetail updateEntityStatus(String userId, String entityGUID, InstanceStatus newStatus) throws FunctionNotSupportedException Update the status for a specific entity.- Overrides:
updateEntityStatus
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- unique identifier (guid) for the requested entity.newStatus
- new InstanceStatus for the entity.- Returns:
- EntityDetail showing the current entity header, properties and classifications.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateEntityProperties
public EntityDetail updateEntityProperties(String userId, String entityGUID, InstanceProperties properties) throws FunctionNotSupportedException Update selected properties in an entity.- Overrides:
updateEntityProperties
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.properties
- a list of properties to change.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
undoEntityUpdate
public EntityDetail undoEntityUpdate(String userId, String entityGUID) throws FunctionNotSupportedException Undo the last update to an entity and return the previous content.- Overrides:
undoEntityUpdate
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
deleteEntity
public EntityDetail deleteEntity(String userId, String typeDefGUID, String typeDefName, String obsoleteEntityGUID) throws FunctionNotSupportedException Delete an entity. The entity is soft-deleted. This means it is still in the graph, but it is no longer returned on queries. All homed relationships to the entity are also soft-deleted and will no longer be usable, while any reference copy relationships to the entity will be purged (and will no longer be accessible in this repository). To completely eliminate the entity from the graph requires a call to the purgeEntity() method after the delete() call. The restoreEntity() method will switch an entity back to Active status to restore the entity to normal use; however, this will not restore any of the relationships that were soft-deleted as part of the original deleteEntity() call.- Overrides:
deleteEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- unique identifier of the type of the entity to delete.typeDefName
- unique name of the type of the entity to delete.obsoleteEntityGUID
- String unique identifier (guid) for the entity.- Returns:
- deleted entity
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
purgeEntity
public void purgeEntity(String userId, String typeDefGUID, String typeDefName, String deletedEntityGUID) throws FunctionNotSupportedException Permanently removes a deleted entity from the metadata collection. All relationships to the entity -- both homed and reference copies -- will also be purged to maintain referential integrity within the repository. This request can not be undone.- Overrides:
purgeEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- unique identifier of the type of the entity to purge.typeDefName
- unique name of the type of the entity to purge.deletedEntityGUID
- String unique identifier (guid) for the entity.- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
restoreEntity
public EntityDetail restoreEntity(String userId, String deletedEntityGUID) throws FunctionNotSupportedException Restore the requested entity to the state it was before it was deleted.- Overrides:
restoreEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.deletedEntityGUID
- String unique identifier (guid) for the entity.- Returns:
- EntityDetail showing the restored entity header, properties and classifications.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
classifyEntity
public EntityDetail classifyEntity(String userId, String entityGUID, String classificationName, InstanceProperties classificationProperties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Add the requested classification to a specific entity.- Overrides:
classifyEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.classificationName
- String name for the classification.classificationProperties
- list of properties to set in the classification.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is either not known or not valid for the entity.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeFunctionNotSupportedException
- the repository does not support maintenance of metadata.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
classifyEntity
public Classification classifyEntity(String userId, EntityProxy entityProxy, String classificationName, InstanceProperties classificationProperties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Add the requested classification to a specific entity.- Overrides:
classifyEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityProxy
- identifier (proxy) for the entity.classificationName
- String name for the classification.classificationProperties
- list of properties to set in the classification.- Returns:
- Classification showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is either not known or not valid for the entity.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeFunctionNotSupportedException
- the repository does not support maintenance of metadata.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
classifyEntity
public EntityDetail classifyEntity(String userId, String entityGUID, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Add the requested classification to a specific entity.- Overrides:
classifyEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.classificationName
- String name for the classification.externalSourceGUID
- unique identifier (guid) for the external source.externalSourceName
- unique name for the external source.classificationOrigin
- source of the classificationclassificationOriginGUID
- if the classification is propagated, this is the unique identifier of the entity whereclassificationProperties
- list of properties to set in the classification.- Returns:
- EntitySummary showing the resulting entity header and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is either not known or not valid for the entity.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
classifyEntity
public Classification classifyEntity(String userId, EntityProxy entityProxy, String classificationName, String externalSourceGUID, String externalSourceName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties classificationProperties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Add the requested classification to a specific entity.- Overrides:
classifyEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityProxy
- identifier (proxy) for the entity.classificationName
- String name for the classification.externalSourceGUID
- unique identifier (guid) for the external source.externalSourceName
- unique name for the external source.classificationOrigin
- source of the classificationclassificationOriginGUID
- if the classification is propagated, this is the unique identifier of the entity whereclassificationProperties
- list of properties to set in the classification.- Returns:
- Classification showing the resulting entity header and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is either not known or not valid for the entity.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeUserNotAuthorizedException
- the userId is not permitted to perform this operation.FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
declassifyEntity
public EntityDetail declassifyEntity(String userId, String entityGUID, String classificationName) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, UserNotAuthorizedException, FunctionNotSupportedException Remove a specific classification from an entity.- Overrides:
declassifyEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.classificationName
- String name for the classification.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is not set on the entity.FunctionNotSupportedException
- the repository does not support maintenance of metadata.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
declassifyEntity
public Classification declassifyEntity(String userId, EntityProxy entityProxy, String classificationName) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, UserNotAuthorizedException, FunctionNotSupportedException Remove a specific classification from an entity.- Overrides:
declassifyEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityProxy
- identifier (proxy) for the entity.classificationName
- String name for the classification.- Returns:
- Classification showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is not set on the entity.FunctionNotSupportedException
- the repository does not support maintenance of metadata.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
updateEntityClassification
public EntityDetail updateEntityClassification(String userId, String entityGUID, String classificationName, InstanceProperties properties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Update one or more properties in one of an entity's classifications.- Overrides:
updateEntityClassification
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- String unique identifier (guid) for the entity.classificationName
- String name for the classification.properties
- list of properties for the classification.- Returns:
- EntityDetail showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is not attached to the classification.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeFunctionNotSupportedException
- the repository does not support maintenance of metadata.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
updateEntityClassification
public Classification updateEntityClassification(String userId, EntityProxy entityProxy, String classificationName, InstanceProperties properties) throws InvalidParameterException, RepositoryErrorException, EntityNotKnownException, ClassificationErrorException, PropertyErrorException, UserNotAuthorizedException, FunctionNotSupportedException Update one or more properties in one of an entity's classifications.- Overrides:
updateEntityClassification
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityProxy
- identifier (proxy) for the entity.classificationName
- String name for the classification.properties
- list of properties for the classification.- Returns:
- Classification showing the resulting entity header, properties and classifications.
- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.EntityNotKnownException
- the entity identified by the guid is not found in the metadata collectionClassificationErrorException
- the requested classification is not attached to the classification.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification typeFunctionNotSupportedException
- the repository does not support maintenance of metadata.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
addRelationship
public Relationship addRelationship(String userId, String relationshipTypeGUID, InstanceProperties initialProperties, String entityOneGUID, String entityTwoGUID, InstanceStatus initialStatus) throws FunctionNotSupportedException Add a new relationship between two entities to the metadata collection.- Overrides:
addRelationship
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.relationshipTypeGUID
- unique identifier (guid) for the new relationship's type.initialProperties
- initial list of properties for the new entity - null means no properties.entityOneGUID
- the unique identifier of one of the entities that the relationship is connecting together.entityTwoGUID
- the unique identifier of the other entity that the relationship is connecting together.initialStatus
- initial status - typically DRAFT, PREPARED or ACTIVE.- Returns:
- Relationship structure with the new header, requested entities and properties.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
addExternalRelationship
public Relationship addExternalRelationship(String userId, String relationshipTypeGUID, String externalSourceGUID, String externalSourceName, InstanceProperties initialProperties, String entityOneGUID, String entityTwoGUID, InstanceStatus initialStatus) throws FunctionNotSupportedException Save a new relationship that is sourced from an external technology. The external technology is identified by a GUID and a name. These can be recorded in a Software Server Capability (guid and qualifiedName respectively). The new relationship is assigned a new GUID and put in the requested state. The new relationship is returned.- Overrides:
addExternalRelationship
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.relationshipTypeGUID
- unique identifier (guid) for the new relationship's type.externalSourceGUID
- unique identifier (guid) for the external source.externalSourceName
- unique name for the external source.initialProperties
- initial list of properties for the new entity; null means no properties.entityOneGUID
- the unique identifier of one of the entities that the relationship is connecting together.entityTwoGUID
- the unique identifier of the other entity that the relationship is connecting together.initialStatus
- initial status; typically DRAFT, PREPARED or ACTIVE.- Returns:
- Relationship structure with the new header, requested entities and properties.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateRelationshipStatus
public Relationship updateRelationshipStatus(String userId, String relationshipGUID, InstanceStatus newStatus) throws FunctionNotSupportedException Update the status of a specific relationship.- Overrides:
updateRelationshipStatus
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- String unique identifier (guid) for the relationship.newStatus
- new InstanceStatus for the relationship.- Returns:
- Resulting relationship structure with the new status set.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
updateRelationshipProperties
public Relationship updateRelationshipProperties(String userId, String relationshipGUID, InstanceProperties properties) throws FunctionNotSupportedException Update the properties of a specific relationship.- Overrides:
updateRelationshipProperties
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- String unique identifier (guid) for the relationship.properties
- list of the properties to update.- Returns:
- Resulting relationship structure with the new properties set.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
undoRelationshipUpdate
public Relationship undoRelationshipUpdate(String userId, String relationshipGUID) throws FunctionNotSupportedException Undo the latest change to a relationship (either a change of properties or status).- Overrides:
undoRelationshipUpdate
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- String unique identifier (guid) for the relationship.- Returns:
- Relationship structure with the new current header, requested entities and properties.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
deleteRelationship
public Relationship deleteRelationship(String userId, String typeDefGUID, String typeDefName, String obsoleteRelationshipGUID) throws FunctionNotSupportedException Delete a specific relationship. This is a soft-delete which means the relationship's status is updated to DELETED, and it is no longer available for queries. To remove the relationship permanently from the metadata collection, use purgeRelationship().- Overrides:
deleteRelationship
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- unique identifier of the type of the relationship to delete.typeDefName
- unique name of the type of the relationship to delete.obsoleteRelationshipGUID
- String unique identifier (guid) for the relationship.- Returns:
- deleted relationship
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
purgeRelationship
public void purgeRelationship(String userId, String typeDefGUID, String typeDefName, String deletedRelationshipGUID) throws FunctionNotSupportedException Permanently delete the relationship from the repository. There is no means to undo this request.- Overrides:
purgeRelationship
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- unique identifier of the type of the relationship to purge.typeDefName
- unique name of the type of the relationship to purge.deletedRelationshipGUID
- String unique identifier (guid) for the relationship.- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
restoreRelationship
public Relationship restoreRelationship(String userId, String deletedRelationshipGUID) throws FunctionNotSupportedException Restore a deleted relationship into the metadata collection. The new status will be ACTIVE and the restored details of the relationship are returned to the caller.- Overrides:
restoreRelationship
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.deletedRelationshipGUID
- String unique identifier (guid) for the relationship.- Returns:
- Relationship structure with the restored header, requested entities and properties.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
reIdentifyEntity
public EntityDetail reIdentifyEntity(String userId, String typeDefGUID, String typeDefName, String entityGUID, String newEntityGUID) throws FunctionNotSupportedException Change the guid of an existing entity to a new value. This is used if two different entities are discovered to have the same guid. This is extremely unlikely but not impossible so the open metadata protocol has provision for this.- Overrides:
reIdentifyEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- the guid of the TypeDef for the entity - used to verify the entity identity.typeDefName
- the name of the TypeDef for the entity - used to verify the entity identity.entityGUID
- the existing identifier for the entity.newEntityGUID
- new unique identifier for the entity.- Returns:
- entity - new values for this entity, including the new guid.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
reTypeEntity
public EntityDetail reTypeEntity(String userId, String entityGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary) throws FunctionNotSupportedException Change the type for an existing entity. Typically, this action is taken to move an entity's type to either a super type (so the subtype can be deleted) or a new subtype (so additional properties can be added.) However, the type can be changed to any compatible type and the properties adjusted.- Overrides:
reTypeEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- the unique identifier for the entity to change.currentTypeDefSummary
- the current details of the TypeDef for the entity - used to verify the entity identitynewTypeDefSummary
- details of this entity's new TypeDef.- Returns:
- entity - new values for this entity, including the new type information.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
reHomeEntity
public EntityDetail reHomeEntity(String userId, String entityGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) throws FunctionNotSupportedException Change the home of an existing entity. This action is taken for example, if the original home repository becomes permanently unavailable, or if the user community updating this entity move to working from a different repository in the open metadata repository cohort.- Overrides:
reHomeEntity
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityGUID
- the unique identifier for the entity to change.typeDefGUID
- the guid of the TypeDef for the entity - used to verify the entity identity.typeDefName
- the name of the TypeDef for the entity - used to verify the entity identity.homeMetadataCollectionId
- the existing identifier for this entity's home.newHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.newHomeMetadataCollectionName
- display name for the new home metadata collection/repository.- Returns:
- entity - new values for this entity, including the new home information.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
reIdentifyRelationship
public Relationship reIdentifyRelationship(String userId, String typeDefGUID, String typeDefName, String relationshipGUID, String newRelationshipGUID) throws FunctionNotSupportedException Change the guid of an existing relationship. This is used if two different relationships are discovered to have the same guid. This is extremely unlikely but not impossible so the open metadata protocol has provision for this.- Overrides:
reIdentifyRelationship
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.typeDefGUID
- the guid of the TypeDef for the relationship - used to verify the relationship identity.typeDefName
- the name of the TypeDef for the relationship - used to verify the relationship identity.relationshipGUID
- the existing identifier for the relationship.newRelationshipGUID
- the new unique identifier for the relationship.- Returns:
- relationship - new values for this relationship, including the new guid.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
reTypeRelationship
public Relationship reTypeRelationship(String userId, String relationshipGUID, TypeDefSummary currentTypeDefSummary, TypeDefSummary newTypeDefSummary) throws FunctionNotSupportedException Change the type for an existing relationship. Typically, this action is taken to move a relationship's type to either a super type (so the subtype can be deleted) or a new subtype (so additional properties can be added.) However, the type can be changed to any compatible type.- Overrides:
reTypeRelationship
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- the unique identifier for the relationship.currentTypeDefSummary
- the details of the TypeDef for the relationship - used to verify the relationship identity.newTypeDefSummary
- details of this relationship's new TypeDef.- Returns:
- relationship - new values for this relationship, including the new type information.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
reHomeRelationship
public Relationship reHomeRelationship(String userId, String relationshipGUID, String typeDefGUID, String typeDefName, String homeMetadataCollectionId, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) throws FunctionNotSupportedException Change the home of an existing relationship. This action is taken for example, if the original home repository becomes permanently unavailable, or if the user community updating this relationship move to working from a different repository in the open metadata repository cohort.- Overrides:
reHomeRelationship
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- the unique identifier for the relationship.typeDefGUID
- the guid of the TypeDef for the relationship - used to verify the relationship identity.typeDefName
- the name of the TypeDef for the relationship - used to verify the relationship identity.homeMetadataCollectionId
- the existing identifier for this relationship's home.newHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.newHomeMetadataCollectionName
- display name for the new home metadata collection/repository.- Returns:
- relationship - new values for this relationship, including the new home information.
- Throws:
FunctionNotSupportedException
- the repository does not support maintenance of metadata.
-
saveEntityReferenceCopy
public void saveEntityReferenceCopy(String userId, EntityDetail entity) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException, HomeEntityException, EntityConflictException, InvalidEntityException, UserNotAuthorizedException Save the entity as a reference copy. The id of the home metadata collection is already set up in the entity.- Overrides:
saveEntityReferenceCopy
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting server.entity
- details of the entity to save.- Throws:
InvalidParameterException
- the entity is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this entity's type.HomeEntityException
- the entity belongs to the local repository so creating a reference copy would be invalid.EntityConflictException
- the new entity conflicts with an existing entity.InvalidEntityException
- the new entity has invalid contents.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
saveClassificationReferenceCopy
public void saveClassificationReferenceCopy(String userId, EntityDetail entity, Classification classification) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException Save the classification as a reference copy. The id of the home metadata collection is already set up in the classification. The entity may be either a locally homed entity or a reference copy.- Overrides:
saveClassificationReferenceCopy
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entity
- entity that the classification is attached to.classification
- classification to save.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification type.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.
-
saveClassificationReferenceCopy
public void saveClassificationReferenceCopy(String userId, EntityProxy entityProxy, Classification classification) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, PropertyErrorException Save the classification as a reference copy. The id of the home metadata collection is already set up in the classification. The entity may be either a locally homed entity or a reference copy.- Overrides:
saveClassificationReferenceCopy
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting user.entityProxy
- entity that the classification is attached to.classification
- classification to save.- Throws:
InvalidParameterException
- one of the parameters is invalid or null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this classification type.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.
-
saveRelationshipReferenceCopy
public void saveRelationshipReferenceCopy(String userId, Relationship relationship) throws InvalidParameterException, RepositoryErrorException, TypeErrorException, EntityNotKnownException, PropertyErrorException, HomeRelationshipException, RelationshipConflictException, InvalidRelationshipException, UserNotAuthorizedException Save the relationship as a reference copy. The id of the home metadata collection is already set up in the relationship.- Overrides:
saveRelationshipReferenceCopy
in classInMemoryOMRSMetadataCollection
- Parameters:
userId
- unique identifier for requesting server.relationship
- relationship to save.- Throws:
InvalidParameterException
- the relationship is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeErrorException
- the requested type is not known, or not supported in the metadata repository hosting the metadata collection.EntityNotKnownException
- one of the entities identified by the relationship is not found in the metadata collection.PropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this relationship's type.HomeRelationshipException
- the relationship belongs to the local repository so creating a reference copy would be invalid.RelationshipConflictException
- the new relationship conflicts with an existing relationship.InvalidRelationshipException
- the new relationship has invalid contents.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-