public interface OMRSRepositoryHelper extends OMRSRepositoryPropertiesHelper
| Modifier and Type | Method and Description |
|---|---|
EntityDetail |
addClassificationToEntity(String sourceName,
EntityDetail entity,
Classification newClassification,
String methodName)
Add a classification to an existing entity.
|
TypeDef |
applyPatch(String sourceName,
TypeDef originalTypeDef,
TypeDefPatch typeDefPatch)
Returns an updated TypeDef that has had the supplied patch applied.
|
EntityDetail |
deleteClassificationFromEntity(String sourceName,
EntityDetail entity,
String oldClassificationName,
String methodName)
Return a oldClassification with the header and type information filled out.
|
List<EntityDetail> |
formatEntityResults(List<EntityDetail> fullResults,
int fromElement,
String sequencingProperty,
SequencingOrder sequencingOrder,
int pageSize)
Use the paging and sequencing parameters to format the results for a repository call that returns a list of
entity instances.
|
List<Relationship> |
formatRelationshipResults(List<Relationship> fullResults,
int fromElement,
String sequencingProperty,
SequencingOrder sequencingOrder,
int pageSize)
Use the paging and sequencing parameters to format the results for a repository call that returns a list of
relationship instances.
|
List<AttributeTypeDef> |
getActiveAttributeTypeDefs()
Return the list of attributeTypeDefs active in the local repository.
|
TypeDefGallery |
getActiveTypeDefGallery()
Return the list of typeDefs and attributeTypeDefs active in the local repository.
|
List<TypeDef> |
getActiveTypeDefs()
Return the list of typeDefs active in the local repository.
|
List<TypeDefAttribute> |
getAllPropertiesForTypeDef(String sourceName,
TypeDef typeDef,
String methodName)
Return the names of all of the properties in the supplied TypeDef and all of its super-types.
|
AttributeTypeDef |
getAttributeTypeDef(String sourceName,
String attributeTypeDefGUID,
String methodName)
Return the AttributeTypeDef identified by the guid and name supplied by the caller.
|
AttributeTypeDef |
getAttributeTypeDef(String sourceName,
String attributeTypeDefGUID,
String attributeTypeDefName,
String methodName)
Return the AttributeTypeDef identified by the guid and name supplied by the caller.
|
AttributeTypeDef |
getAttributeTypeDefByName(String sourceName,
String attributeTypeDefName)
Return the AttributeTypeDef identified by the name supplied by the caller.
|
Classification |
getClassificationFromEntity(String sourceName,
EntityDetail entity,
String classificationName,
String methodName)
Return the names classification from an existing entity.
|
String |
getContainsRegex(String searchString)
Retrieve an escaped version of the provided string that can be passed to methods that expect regular expressions,
to search for the string with a "contains" semantic.
|
String |
getEnd1EntityGUID(Relationship relationship)
Return the guid of an entity linked to end 1 of the relationship.
|
String |
getEnd2EntityGUID(Relationship relationship)
Return the guid of an entity linked to end 2 of the relationship.
|
String |
getEndsWithRegex(String searchString)
Retrieve an escaped version of the provided string that can be passed to methods that expect regular expressions,
to search for the string with an "endswith" semantic.
|
String |
getExactMatchRegex(String searchString)
Retrieve an escaped version of the provided string that can be passed to methods that expect regular expressions,
without being interpreted as a regular expression (i.e.
|
List<AttributeTypeDef> |
getKnownAttributeTypeDefs()
Return the list of attributeTypeDefs active in the connected cohorts.
|
TypeDefGallery |
getKnownTypeDefGallery()
Return the list of types active in the connected cohorts.
|
List<TypeDef> |
getKnownTypeDefs()
Return the list of typeDefs active in the connected cohorts.
|
String |
getMetadataCollectionName(String metadataCollectionId)
Return the metadata collection name (or null) for a metadata collection id.
|
Classification |
getNewClassification(String sourceName,
String userName,
String typeName,
String entityTypeName,
ClassificationOrigin classificationOrigin,
String classificationOriginGUID,
InstanceProperties properties)
Return a classification with the header and type information filled out.
|
EntityDetail |
getNewEntity(String sourceName,
String metadataCollectionId,
InstanceProvenanceType provenanceType,
String userName,
String typeName,
InstanceProperties properties,
List<Classification> classifications)
Return a filled out entity.
|
EntityProxy |
getNewEntityProxy(String sourceName,
EntityDetail entity)
Generate an entity proxy from an entity and its TypeDef.
|
EntityProxy |
getNewEntityProxy(String sourceName,
String metadataCollectionId,
InstanceProvenanceType provenanceType,
String userName,
String typeName,
InstanceProperties properties,
List<Classification> classifications)
Return a filled out entity proxy.
|
InstanceType |
getNewInstanceType(String sourceName,
TypeDefSummary typeDefSummary)
Return a relationship with the header and type information filled out.
|
Relationship |
getNewRelationship(String sourceName,
String metadataCollectionId,
InstanceProvenanceType provenanceType,
String userName,
String typeName,
InstanceProperties properties)
Return a filled out relationship which just needs the entity proxies added.
|
String |
getOtherEndName(String sourceName,
String anchorEntityGUID,
Relationship relationship)
Return the attribute name for the related entity.
|
Classification |
getSkeletonClassification(String sourceName,
String userName,
String classificationTypeName,
String entityTypeName)
Return a classification with the header and type information filled out.
|
EntityDetail |
getSkeletonEntity(String sourceName,
String metadataCollectionId,
InstanceProvenanceType provenanceType,
String userName,
String typeName)
Return an entity with the header and type information filled out.
|
EntitySummary |
getSkeletonEntitySummary(String sourceName,
String metadataCollectionId,
InstanceProvenanceType provenanceType,
String userName,
String typeName)
Return an entity with the header and type information filled out.
|
Relationship |
getSkeletonRelationship(String sourceName,
String metadataCollectionId,
InstanceProvenanceType provenanceType,
String userName,
String typeName)
Return a relationship with the header and type information filled out.
|
String |
getStartsWithRegex(String searchString)
Retrieve an escaped version of the provided string that can be passed to methods that expect regular expressions,
to search for the string with a "startswith" semantic.
|
TypeDef |
getTypeDef(String sourceName,
String parameterName,
String typeDefGUID,
String methodName)
Return the TypeDef identified by the guid supplied by the caller.
|
TypeDef |
getTypeDef(String sourceName,
String guidParameterName,
String nameParameterName,
String typeDefGUID,
String typeDefName,
String methodName)
Return the TypeDef identified by the guid and name supplied by the caller.
|
TypeDef |
getTypeDefByName(String sourceName,
String typeDefName)
Return the TypeDef identified by the name supplied by the caller.
|
String |
getTypeName(InstanceAuditHeader instance)
Returns the type name from an instance (entity, relationship or classification).
|
String |
getUnqualifiedLiteralString(String searchString)
Retrieve an unescaped version of the provided string that can be treated as a literal (not a regular expression).
|
Classification |
incrementVersion(String userId,
InstanceAuditHeader originalInstance,
Classification updatedInstance)
Changes the control information to reflect an update in an instance.
|
EntityDetail |
incrementVersion(String userId,
InstanceAuditHeader originalInstance,
EntityDetail updatedInstance)
Changes the control information to reflect an update in an instance.
|
Relationship |
incrementVersion(String userId,
InstanceAuditHeader originalInstance,
Relationship updatedInstance)
Changes the control information to reflect an update in an instance.
|
boolean |
isContainsRegex(String searchString)
Indicates whether the provided string should be treated as a simple "contains" regular expression (true) or any
other regular expression (false).
|
boolean |
isEndsWithRegex(String searchString)
Indicates whether the provided string should be treated as a simple "endswith" regular expression (true) or any
other regular expression (false).
|
boolean |
isExactMatchRegex(String searchString)
Indicates whether the provided string should be treated as an exact match (true) or any other regular expression
(false).
|
boolean |
isStartsWithRegex(String searchString)
Indicates whether the provided string should be treated as a simple "startswith" regular expression (true) or any
other regular expression (false).
|
boolean |
isTypeOf(String sourceName,
String actualTypeName,
String expectedTypeName)
Validate that the type of an instance is of the expected/desired type.
|
InstanceProperties |
mergeInstanceProperties(String sourceName,
InstanceProperties existingProperties,
InstanceProperties newProperties)
Merge two sets of instance properties.
|
void |
registerMetadataCollection(String metadataCollectionId,
String metadataCollectionName)
Remember the metadata collection name for this metadata collection Id.
|
boolean |
relatedEntity(String sourceName,
String entityGUID,
Relationship relationship)
Return boolean true if entity is linked by this relationship.
|
EntityDetail |
updateClassificationInEntity(String sourceName,
String userName,
EntityDetail entity,
Classification newClassification,
String methodName)
Replace an existing classification with a new one
|
addBooleanPropertyToInstance, addDatePropertyToInstance, addEnumPropertyToInstance, addFloatPropertyToInstance, addIntPropertyToInstance, addLongPropertyToInstance, addMapPropertyToInstance, addPropertyMapToInstance, addStringArrayPropertyToInstance, addStringMapPropertyToInstance, addStringPropertyMapToInstance, addStringPropertyToInstance, getBooleanProperty, getDateProperty, getInstancePropertiesAsMap, getIntProperty, getMapFromProperty, getMapProperty, getStringArrayProperty, getStringMapFromProperty, getStringProperty, removeBooleanProperty, removeDateProperty, removeIntProperty, removeMapFromProperty, removeStringArrayProperty, removeStringMapFromProperty, removeStringPropertyTypeDefGallery getActiveTypeDefGallery()
List<TypeDef> getActiveTypeDefs()
List<AttributeTypeDef> getActiveAttributeTypeDefs()
TypeDefGallery getKnownTypeDefGallery()
List<TypeDef> getKnownTypeDefs()
List<AttributeTypeDef> getKnownAttributeTypeDefs()
TypeDef getTypeDefByName(String sourceName, String typeDefName)
sourceName - source of the request (used for logging)typeDefName - unique name for the TypeDefString getOtherEndName(String sourceName, String anchorEntityGUID, Relationship relationship)
sourceName - source of the request (used for logging)anchorEntityGUID - unique identifier of the anchor entityrelationship - relationship to another entityAttributeTypeDef getAttributeTypeDefByName(String sourceName, String attributeTypeDefName)
sourceName - source of the request (used for logging)attributeTypeDefName - unique name for the TypeDefTypeDef getTypeDef(String sourceName, String parameterName, String typeDefGUID, String methodName) throws TypeErrorException
sourceName - source of the request (used for logging)parameterName - name of guid parametertypeDefGUID - unique identifier for the TypeDefmethodName - calling methodTypeErrorException - unknown or invalid typeAttributeTypeDef getAttributeTypeDef(String sourceName, String attributeTypeDefGUID, String methodName) throws TypeErrorException
sourceName - source of the request (used for logging)attributeTypeDefGUID - unique identifier for the AttributeTypeDefmethodName - calling methodTypeErrorException - unknown or invalid typeTypeDef getTypeDef(String sourceName, String guidParameterName, String nameParameterName, String typeDefGUID, String typeDefName, String methodName) throws TypeErrorException
sourceName - source of the request (used for logging)guidParameterName - name of guid parameternameParameterName - name of type name parametertypeDefGUID - unique identifier for the TypeDeftypeDefName - unique name for the TypeDefmethodName - calling methodTypeErrorException - unknown or invalid typeAttributeTypeDef getAttributeTypeDef(String sourceName, String attributeTypeDefGUID, String attributeTypeDefName, String methodName) throws TypeErrorException
sourceName - source of the request (used for logging)attributeTypeDefGUID - unique identifier for the AttributeTypeDefattributeTypeDefName - unique name for the AttributeTypeDefmethodName - calling methodTypeErrorException - unknown or invalid typeboolean isTypeOf(String sourceName, String actualTypeName, String expectedTypeName)
sourceName - source of the request (used for logging)actualTypeName - name of the entity typeexpectedTypeName - name of the expected typeList<TypeDefAttribute> getAllPropertiesForTypeDef(String sourceName, TypeDef typeDef, String methodName)
sourceName - name of caller.typeDef - TypeDef to query.methodName - calling method.TypeDef applyPatch(String sourceName, TypeDef originalTypeDef, TypeDefPatch typeDefPatch) throws InvalidParameterException, PatchErrorException
sourceName - source of the TypeDef (used for logging)originalTypeDef - typeDef to updatetypeDefPatch - patch to applyInvalidParameterException - the original typeDef or typeDefPatch is nullPatchErrorException - the patch is either badly formatted, or does not apply to the supplied TypeDefvoid registerMetadataCollection(String metadataCollectionId, String metadataCollectionName)
metadataCollectionId - unique identifier (guid) for the metadata collection.metadataCollectionName - display name for the metadata collection (can be null).String getMetadataCollectionName(String metadataCollectionId)
metadataCollectionId - unique identifier (guid) for the metadata collection.EntityDetail getSkeletonEntity(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException
sourceName - source of the request (used for logging)metadataCollectionId - unique identifier for the home metadata collectionprovenanceType - origin of the entityuserName - name of the creatortypeName - name of the typeTypeErrorException - the type name is not recognized.EntitySummary getSkeletonEntitySummary(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException
sourceName - source of the request (used for logging)metadataCollectionId - unique identifier for the home metadata collectionprovenanceType - origin of the entityuserName - name of the creatortypeName - name of the typeTypeErrorException - the type name is not recognized.Classification getSkeletonClassification(String sourceName, String userName, String classificationTypeName, String entityTypeName) throws TypeErrorException
sourceName - source of the request (used for logging)userName - name of the creatorclassificationTypeName - name of the classification typeentityTypeName - name of the type for the entity that this classification is to be attached to.TypeErrorException - the type name is not recognized as a classification type.Relationship getSkeletonRelationship(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException
sourceName - source of the request (used for logging)metadataCollectionId - unique identifier for the home metadata collectionprovenanceType - origin type of the relationshipuserName - name of the creatortypeName - name of the relationship's typeTypeErrorException - the type name is not recognized as a relationship type.InstanceType getNewInstanceType(String sourceName, TypeDefSummary typeDefSummary) throws TypeErrorException
sourceName - source of the request (used for logging)typeDefSummary - details of the new typeTypeErrorException - the type name is not recognized as a relationship type.EntityDetail getNewEntity(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties, List<Classification> classifications) throws TypeErrorException
sourceName - source of the request (used for logging)metadataCollectionId - unique identifier for the home metadata collectionprovenanceType - origin of the entityuserName - name of the creatortypeName - name of the typeproperties - properties for the entityclassifications - list of classifications for the entityTypeErrorException - the type name is not recognized as an entity typeRelationship getNewRelationship(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties) throws TypeErrorException
sourceName - source of the request (used for logging)metadataCollectionId - unique identifier for the home metadata collectionprovenanceType - origin of the relationshipuserName - name of the creatortypeName - name of the typeproperties - properties for the relationshipTypeErrorException - the type name is not recognized as a relationship typeClassification getNewClassification(String sourceName, String userName, String typeName, String entityTypeName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties properties) throws TypeErrorException
sourceName - source of the request (used for logging)userName - name of the creatortypeName - name of the typeentityTypeName - name of the type for the entity that this classification is to be attached to.classificationOrigin - is this explicitly assigned or propagatedclassificationOriginGUID - if propagated this the GUID of the originproperties - properties for the classificationTypeErrorException - the type name is not recognized as a classification type.EntityDetail addClassificationToEntity(String sourceName, EntityDetail entity, Classification newClassification, String methodName)
sourceName - source of the request (used for logging)entity - entity to updatenewClassification - classification to updatemethodName - calling methodClassification getClassificationFromEntity(String sourceName, EntityDetail entity, String classificationName, String methodName) throws ClassificationErrorException
sourceName - source of the request (used for logging)entity - entity to updateclassificationName - classification to retrievemethodName - calling methodClassificationErrorException - the classification is not attached to the entityEntityDetail updateClassificationInEntity(String sourceName, String userName, EntityDetail entity, Classification newClassification, String methodName)
sourceName - source of the request (used for logging)userName - name of the editorentity - entity to updatenewClassification - classification to updatemethodName - calling methodEntityDetail deleteClassificationFromEntity(String sourceName, EntityDetail entity, String oldClassificationName, String methodName) throws ClassificationErrorException
sourceName - source of the request (used for logging)entity - entity to updateoldClassificationName - classification to removemethodName - calling methodClassificationErrorException - the entity was not classified with this classificationInstanceProperties mergeInstanceProperties(String sourceName, InstanceProperties existingProperties, InstanceProperties newProperties)
sourceName - source of the request (used for logging)existingProperties - current set of propertiesnewProperties - properties to add/updateRelationship incrementVersion(String userId, InstanceAuditHeader originalInstance, Relationship updatedInstance)
userId - user making the change.originalInstance - original instance before the changeupdatedInstance - new version of the instance that needs updatingClassification incrementVersion(String userId, InstanceAuditHeader originalInstance, Classification updatedInstance)
userId - user making the change.originalInstance - original instance before the changeupdatedInstance - new version of the instance that needs updatingEntityDetail incrementVersion(String userId, InstanceAuditHeader originalInstance, EntityDetail updatedInstance)
userId - user making the change.originalInstance - original instance before the changeupdatedInstance - new version of the instance that needs updatingEntityProxy getNewEntityProxy(String sourceName, EntityDetail entity) throws RepositoryErrorException
sourceName - source of the request (used for logging)entity - entity instanceRepositoryErrorException - logic error in the repository corrupted entityEntityProxy getNewEntityProxy(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties, List<Classification> classifications) throws TypeErrorException
sourceName - source of the request (used for logging)metadataCollectionId - unique identifier for the home metadata collectionprovenanceType - origin of the entityuserName - name of the creatortypeName - name of the typeproperties - properties for the entityclassifications - list of classifications for the entityTypeErrorException - the type name is not recognized as an entity typeboolean relatedEntity(String sourceName, String entityGUID, Relationship relationship)
sourceName - name of source requesting helpentityGUID - unique identifier of entityrelationship - relationship to testString getTypeName(InstanceAuditHeader instance) throws RepositoryErrorException, InvalidParameterException
instance - instance to readRepositoryErrorException - unable to locate typeInvalidParameterException - invalid property valueString getEnd1EntityGUID(Relationship relationship)
relationship - relationship to parseString getEnd2EntityGUID(Relationship relationship)
relationship - relationship to parseList<EntityDetail> formatEntityResults(List<EntityDetail> fullResults, int fromElement, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws PagingErrorException, PropertyErrorException
fullResults - - the full list of results in an arbitrary orderfromElement - - the starting element number of the instances to return. This is used when retrieving elements
beyond the first page of results. Zero means start from the first element.sequencingProperty - - String name of the property that is to be used to sequence the results.
Null means do not sequence on a property name (see SequencingOrder).sequencingOrder - - Enum defining how the results should be ordered.pageSize - - the maximum number of result entities that can be returned on this request. Zero means
unrestricted return results size.PropertyErrorException - the sequencing property specified is not valid for any of the requested types of
entity.PagingErrorException - the paging/sequencing parameters are set up incorrectly.List<Relationship> formatRelationshipResults(List<Relationship> fullResults, int fromElement, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws PagingErrorException, PropertyErrorException
fullResults - - the full list of results in an arbitrary order. This is supplied not empty.fromElement - - the starting element number of the instances to return. This is used when retrieving elements
beyond the first page of results. Zero means start from the first element.sequencingProperty - - String name of the property that is to be used to sequence the results.
Null means do not sequence on a property name (see SequencingOrder).sequencingOrder - - Enum defining how the results should be ordered.pageSize - - the maximum number of result entities that can be returned on this request. Zero means
unrestricted return results size.PropertyErrorException - the sequencing property specified is not valid for any of the requested types of
relationship.PagingErrorException - the paging/sequencing parameters are set up incorrectly.String getExactMatchRegex(String searchString)
searchString - - the string to escape to avoid being interpreted as a regular expressionisExactMatchRegex(String),
getUnqualifiedLiteralString(String)boolean isExactMatchRegex(String searchString)
searchString - - the string to check whether it should be interpreted literally or as as a regular expressiongetExactMatchRegex(String),
getUnqualifiedLiteralString(String)String getContainsRegex(String searchString)
searchString - - the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain a "contains" semanticisContainsRegex(String),
getUnqualifiedLiteralString(String)boolean isContainsRegex(String searchString)
searchString - - the string to check whether it should be interpreted as a simple "contains"getContainsRegex(String),
getUnqualifiedLiteralString(String)String getStartsWithRegex(String searchString)
searchString - - the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain a "startswith" semanticisStartsWithRegex(String),
getUnqualifiedLiteralString(String)boolean isStartsWithRegex(String searchString)
searchString - - the string to check whether it should be interpreted as a simple "startswith"getStartsWithRegex(String),
getUnqualifiedLiteralString(String)String getEndsWithRegex(String searchString)
searchString - - the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain an "endswith" semanticisEndsWithRegex(String),
getUnqualifiedLiteralString(String)boolean isEndsWithRegex(String searchString)
searchString - - the string to check whether it should be interpreted as a simple "endswith"getEndsWithRegex(String),
getUnqualifiedLiteralString(String)String getUnqualifiedLiteralString(String searchString)
searchString - - the (potentially) wrapped and escaped string to un-escape and un-wrapgetExactMatchRegex(String),
getContainsRegex(String),
getStartsWithRegex(String),
getEndsWithRegex(String)Copyright © 2018–2020 ODPi. All rights reserved.