Interface OMRSRepositoryHelper
- All Superinterfaces:
OMRSRepositoryPropertiesHelper
- All Known Implementing Classes:
OMRSRepositoryContentHelper
OMRSRepositoryHelper provides methods to repository connectors and repository event mappers to help
them build valid type definitions (TypeDefs), entities and relationships. It is a facade to the
repository content manager which holds an in memory cache of all the active TypeDefs in the local server.
OMRSRepositoryHelper's purpose is to create an object that the repository connectors and event mappers can
create, use and discard without needing to know how to connect to the repository content manager.
-
Method Summary
Modifier and TypeMethodDescriptionaddClassificationToEntity
(String sourceName, EntityDetail entity, Classification newClassification, String methodName) Add a classification to an existing entity.addClassificationToEntity
(String sourceName, EntityProxy entity, Classification newClassification, String methodName) Add a classification to an existing entity.addClassificationToList
(String sourceName, List<Classification> classificationList, Classification newClassification, String methodName) Add a classification to an existing entity.addEnumPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, String enumTypeGUID, String enumTypeName, int ordinal, String methodName) Add the supplied property to an instance properties object.applyPatch
(String sourceName, TypeDef originalTypeDef, TypeDefPatch typeDefPatch) Returns an updated TypeDef that has had the supplied patch applied.void
checkEntityNotClassifiedEntity
(String sourceName, EntitySummary entity, String classificationName, String methodName) Deprecated.checkEntityNotClassifiedEntity
(String sourceName, EntitySummary entity, String classificationName, InstanceProperties classificationProperties, AuditLog auditLog, String methodName) Throws an exception if an entity is classified with the supplied classification name and the requested properties are different from the existing properties.deleteClassificationFromEntity
(String sourceName, EntityDetail entity, String oldClassificationName, String methodName) Return a oldClassification with the header and type information filled out.deleteClassificationFromEntity
(String sourceName, EntityProxy entityProxy, String oldClassificationName, String methodName) Return a oldClassification with the header and type information filled out.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.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.Return the list of attributeTypeDefs active in the local repository.Return the list of typeDefs and attributeTypeDefs active in the local repository.Return the list of typeDefs active in the local repository.getAllPropertiesForTypeDef
(String sourceName, TypeDef typeDef, String methodName) Return the names of all the properties in the supplied TypeDef and all of its super-types.getAllTypeDefsForProperty
(String sourceName, String propertyName, String methodName) Return the names of all the type definitions that define the supplied property name.getAttributeTypeDef
(String sourceName, String attributeTypeDefGUID, String methodName) Return the AttributeTypeDef identified by the guid and name supplied by the caller.getAttributeTypeDef
(String sourceName, String attributeTypeDefGUID, String attributeTypeDefName, String methodName) Return the AttributeTypeDef identified by the guid and name supplied by the caller.getAttributeTypeDefByName
(String sourceName, String attributeTypeDefName) Return the AttributeTypeDef identified by the name supplied by the caller.getClassificationFromEntity
(String sourceName, EntitySummary entity, String classificationName, String methodName) Return the named classification from an existing entity and throws an exception if it is not.getClassificationProperties
(String sourceName, List<Classification> classifications, String classificationName, String methodName) Return the properties from a named classification or null if classification not present or without properties.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.getContainsRegex
(String searchString, boolean insensitive) 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.getEnd1EntityGUID
(Relationship relationship) Return the guid of an entity linked to end 1 of the relationship.getEnd2EntityGUID
(Relationship relationship) Return the guid of an entity linked to end 2 of the relationship.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.getEndsWithRegex
(String searchString, boolean insensitive) 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.getEntityDetailDifferences
(EntityDetail left, EntityDetail right, boolean ignoreModificationStamps) Calculate the differences between the two provided EntityDetail objects.getEntityProxyDifferences
(EntityProxy left, EntityProxy right, boolean ignoreModificationStamps) Calculate the differences between the two provided EntityProxy objects.getEntitySummaryDifferences
(EntitySummary left, EntitySummary right, boolean ignoreModificationStamps) Calculate the differences between the two provided EntitySummary objects.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.getExactMatchRegex
(String searchString, boolean insensitive) 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.getHomeClassificationsFromEntity
(String sourceName, EntityDetail entity, String metadataCollectionId, String methodName) Return the classifications from the requested metadata collection.Return the list of attributeTypeDefs active in the connected cohorts.Return the list of types active in the connected cohorts.Return the list of typeDefs active in the connected cohorts.getMetadataCollectionName
(String metadataCollectionId) Return the metadata collection name (or null) for a metadata collection id.getNewClassification
(String sourceName, String userName, String typeName, String entityTypeName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties properties) Deprecated.getNewClassification
(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName, String entityTypeName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties properties) Return a classification with the header and type information filled out.getNewClassification
(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, String entityTypeName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties properties) Return a classification with the header and type information filled out.getNewEntity
(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties, List<Classification> classifications) Return a filled out entity.getNewEntity
(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties, List<Classification> classifications) Return a filled out entity.getNewEntityProxy
(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties, List<Classification> classifications) Return a filled out entity proxy.getNewEntityProxy
(String sourceName, EntityDetail entity) Generate an entity proxy from an entity and its TypeDef.getNewInstanceType
(String sourceName, TypeDefSummary typeDefSummary) Return a relationship with the header and type information filled out.getNewRelationship
(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties) Return a filled out relationship which just needs the entity proxies added.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.getOtherEnd
(String sourceName, String anchorEntityGUID, Relationship relationship) Return the entity proxy for the related entity.getOtherEndName
(String sourceName, String anchorEntityGUID, Relationship relationship) Return the attribute name for the related entity.getRelationshipDifferences
(Relationship left, Relationship right, boolean ignoreModificationStamps) Calculate the differences between the two provided Relationship objects.getSearchClassificationsFromList
(List<String> classificationNames) Convert the provided list of classification names into an equivalent SearchClassifications object.getSkeletonClassification
(String sourceName, String userName, String classificationTypeName, String entityTypeName) Return a classification with the header and type information filled out.getSkeletonClassification
(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String classificationTypeName, String entityTypeName) Return a classification with the header and type information filled out.getSkeletonClassification
(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String classificationTypeName, String entityTypeName) Return a classification with the header and type information filled out.getSkeletonEntity
(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName) Return an entity with the header and type information filled out.getSkeletonEntity
(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) Deprecated.getSkeletonEntitySummary
(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName) Return an entity with the header and type information filled out.getSkeletonEntitySummary
(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) Deprecated.getSkeletonRelationship
(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName) Return a relationship with the header and type information filled out.getSkeletonRelationship
(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) Return a relationship with the header and type information filled out.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.getStartsWithRegex
(String searchString, boolean insensitive) 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.getSubTypesOf
(String sourceName, String superTypeName) Return the list of type names for all the subtypes of an entity type.getSuperTypes
(String sourceName, String typeDefName) Gets super types for given type name.getTypeDef
(String sourceName, String parameterName, String typeDefGUID, String methodName) Return the TypeDef identified by the guid supplied by the caller.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.getTypeDefByName
(String sourceName, String typeDefName) Return the TypeDef identified by the name supplied by the caller.getTypeName
(InstanceAuditHeader instance) Returns the type name from an instance (entity, relationship or classification).getUniqueProperties
(String sourceName, String typeName, InstanceProperties allProperties) Return an instance properties that only contains the properties that uniquely identify the entity.getUnqualifiedLiteralString
(String searchString) Retrieve an unescaped version of the provided string that can be treated as a literal (not a regular expression).incrementVersion
(String userId, InstanceAuditHeader originalInstance, Classification updatedInstance) Changes the control information to reflect an update in an instance.incrementVersion
(String userId, InstanceAuditHeader originalInstance, EntityDetail updatedInstance) Changes the control information to reflect an update in an instance.incrementVersion
(String userId, InstanceAuditHeader originalInstance, Relationship updatedInstance) Changes the control information to reflect an update in an instance.boolean
isCaseInsensitiveRegex
(String searchString) Indicates whether the provided string should be treated as a case-insensitive regular expression (true) or as a case-sensitive regular expression (false).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
isContainsRegex
(String searchString, boolean insensitive) 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
isEndsWithRegex
(String searchString, boolean insensitive) 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
isExactMatchRegex
(String searchString, boolean insensitive) 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
isStartsWithRegex
(String searchString, boolean insensitive) Indicates whether the provided string should be treated as a simple "startswith" regular expression (true) or any other regular expression (false).boolean
Validate that the type of an instance is of the expected/desired type.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.updateClassificationInEntity
(String sourceName, String userName, EntityDetail entity, Classification newClassification, String methodName) Replace an existing classification with a new oneupdateClassificationInEntity
(String sourceName, String userName, EntityProxy entity, Classification newClassification, String methodName) Replace an existing classification with a new oneMethods inherited from interface org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.utilities.OMRSRepositoryPropertiesHelper
addBooleanMapPropertyToInstance, addBooleanPropertyMapToInstance, addBooleanPropertyToInstance, addDatePropertyToInstance, addEnumPropertyToInstance, addFloatPropertyToInstance, addIntMapPropertyToInstance, addIntPropertyMapToInstance, addIntPropertyToInstance, addLongMapPropertyToInstance, addLongPropertyMapToInstance, addLongPropertyToInstance, addMapPropertyToInstance, addPropertyMapToInstance, addStringArrayPropertyToInstance, addStringMapPropertyToInstance, addStringPropertyMapToInstance, addStringPropertyToInstance, getBooleanMapFromProperty, getBooleanProperty, getDateProperty, getEnumPropertyOrdinal, getInstancePropertiesAsMap, getIntegerMapFromProperty, getIntProperty, getLongMapFromProperty, getLongProperty, getMapFromProperty, getMapProperty, getSearchPropertiesFromInstanceProperties, getStringArrayProperty, getStringMapFromProperty, getStringProperty, removeBooleanMapFromProperty, removeBooleanProperty, removeDateProperty, removeEnumPropertyOrdinal, removeIntegerMapFromProperty, removeIntProperty, removeLongMapFromProperty, removeLongProperty, removeMapFromProperty, removeStringArrayProperty, removeStringMapFromProperty, removeStringProperty
-
Method Details
-
getActiveTypeDefGallery
TypeDefGallery getActiveTypeDefGallery()Return the list of typeDefs and attributeTypeDefs active in the local repository.- Returns:
- TypeDef gallery
-
getActiveTypeDefs
Return the list of typeDefs active in the local repository.- Returns:
- TypeDef list
-
getActiveAttributeTypeDefs
List<AttributeTypeDef> getActiveAttributeTypeDefs()Return the list of attributeTypeDefs active in the local repository.- Returns:
- AttributeTypeDef list
-
getKnownTypeDefGallery
TypeDefGallery getKnownTypeDefGallery()Return the list of types active in the connected cohorts.- Returns:
- TypeDef gallery
-
getKnownTypeDefs
Return the list of typeDefs active in the connected cohorts.- Returns:
- TypeDef list
-
getKnownAttributeTypeDefs
List<AttributeTypeDef> getKnownAttributeTypeDefs()Return the list of attributeTypeDefs active in the connected cohorts.- Returns:
- AttributeTypeDef list
-
getTypeDefByName
Return the TypeDef identified by the name supplied by the caller. This is used in the connectors when validating the actual types of the repository with the known open metadata types looking specifically for types of the same name but with different content.- Parameters:
sourceName
- source of the request (used for logging)typeDefName
- unique name for the TypeDef- Returns:
- TypeDef object or null if TypeDef is not known.
-
getSuperTypes
Gets super types for given type name.- Parameters:
sourceName
- the source of the request (used for logging)typeDefName
- unique name for the TypeDef- Returns:
- the super types
-
getUniqueProperties
InstanceProperties getUniqueProperties(String sourceName, String typeName, InstanceProperties allProperties) Return an instance properties that only contains the properties that uniquely identify the entity. This is used when creating entity proxies.- Parameters:
sourceName
- callertypeName
- name of instance's typeallProperties
- all the instance's properties- Returns:
- just the unique properties
-
getOtherEndName
Return the attribute name for the related entity.- Parameters:
sourceName
- source of the request (used for logging)anchorEntityGUID
- unique identifier of the anchor entityrelationship
- relationship to another entity- Returns:
- proxy to the other entity.
-
getOtherEnd
Return the entity proxy for the related entity.- Parameters:
sourceName
- source of the request (used for logging)anchorEntityGUID
- unique identifier of the anchor entityrelationship
- relationship to another entity- Returns:
- proxy to the other entity.
-
getAttributeTypeDefByName
Return the AttributeTypeDef identified by the name supplied by the caller. This is used in the connectors when validating the actual types of the repository with the known open metadata types looking specifically for types of the same name but with different content.- Parameters:
sourceName
- source of the request (used for logging)attributeTypeDefName
- unique name for the TypeDef- Returns:
- AttributeTypeDef object or null if AttributeTypeDef is not known.
-
getTypeDef
TypeDef getTypeDef(String sourceName, String parameterName, String typeDefGUID, String methodName) throws TypeErrorException Return the TypeDef identified by the guid supplied by the caller. This call is used when retrieving a type that only the guid is known.- Parameters:
sourceName
- source of the request (used for logging)parameterName
- name of guid parametertypeDefGUID
- unique identifier for the TypeDefmethodName
- calling method- Returns:
- TypeDef object
- Throws:
TypeErrorException
- unknown or invalid type
-
getAttributeTypeDef
AttributeTypeDef getAttributeTypeDef(String sourceName, String attributeTypeDefGUID, String methodName) throws TypeErrorException Return the AttributeTypeDef identified by the guid and name supplied by the caller. This call is used when retrieving a type that only the guid is known.- Parameters:
sourceName
- source of the request (used for logging)attributeTypeDefGUID
- unique identifier for the AttributeTypeDefmethodName
- calling method- Returns:
- TypeDef object
- Throws:
TypeErrorException
- unknown or invalid type
-
getTypeDef
TypeDef getTypeDef(String sourceName, String guidParameterName, String nameParameterName, String typeDefGUID, String typeDefName, String methodName) throws TypeErrorException Return the TypeDef identified by the guid and name supplied by the caller. This call is used when retrieving a type that should exist. For example, retrieving the type of a metadata instance.- Parameters:
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 method- Returns:
- TypeDef object
- Throws:
TypeErrorException
- unknown or invalid type
-
getAttributeTypeDef
AttributeTypeDef getAttributeTypeDef(String sourceName, String attributeTypeDefGUID, String attributeTypeDefName, String methodName) throws TypeErrorException Return the AttributeTypeDef identified by the guid and name supplied by the caller. This call is used when retrieving a type that should exist. For example, retrieving the type definition of a metadata instance's property.- Parameters:
sourceName
- source of the request (used for logging)attributeTypeDefGUID
- unique identifier for the AttributeTypeDefattributeTypeDefName
- unique name for the AttributeTypeDefmethodName
- calling method- Returns:
- TypeDef object
- Throws:
TypeErrorException
- unknown or invalid type
-
addEnumPropertyToInstance
InstanceProperties addEnumPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, String enumTypeGUID, String enumTypeName, int ordinal, String methodName) throws TypeErrorException Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertyenumTypeGUID
- unique Id of Enum requestedenumTypeName
- unique name of enum requestedordinal
- numeric value of propertymethodName
- calling method name- Returns:
- instance properties object.
- Throws:
TypeErrorException
- the enum type is not recognized
-
isTypeOf
Validate that the type of an instance is of the expected/desired type. The actual instance may be a subtype of the expected type of course.- Parameters:
sourceName
- source of the request (used for logging)actualTypeName
- name of the entity typeexpectedTypeName
- name of the expected type- Returns:
- boolean if they match (a null in either results in false)
-
getSubTypesOf
Return the list of type names for all the subtypes of an entity type.- Parameters:
sourceName
- source of the request (used for logging)superTypeName
- name of the super type - this value is not included in the result.- Returns:
- list of type names (a null means the type is not know or it has no sub types)
-
getAllPropertiesForTypeDef
List<TypeDefAttribute> getAllPropertiesForTypeDef(String sourceName, TypeDef typeDef, String methodName) Return the names of all the properties in the supplied TypeDef and all of its super-types.- Parameters:
sourceName
- name of caller.typeDef
- TypeDef to query.methodName
- calling method.- Returns:
- list of property names.
-
getAllTypeDefsForProperty
Return the names of all the type definitions that define the supplied property name.- Parameters:
sourceName
- name of the caller.propertyName
- property name to query.methodName
- calling method.- Returns:
- set of names of the TypeDefs that define a property with this name
-
applyPatch
TypeDef applyPatch(String sourceName, TypeDef originalTypeDef, TypeDefPatch typeDefPatch) throws InvalidParameterException, PatchErrorException Returns an updated TypeDef that has had the supplied patch applied. It throws an exception if any part of the patch is incompatible with the original TypeDef. For example, if there is a mismatch between the type or version that either represents.- Parameters:
sourceName
- source of the TypeDef (used for logging)originalTypeDef
- typeDef to updatetypeDefPatch
- patch to apply- Returns:
- updated TypeDef
- Throws:
InvalidParameterException
- the original typeDef or typeDefPatch is nullPatchErrorException
- the patch is either badly formatted, or does not apply to the supplied TypeDef
-
registerMetadataCollection
Remember the metadata collection name for this metadata collection Id. If the metadata collection id is null, it is ignored.- Parameters:
metadataCollectionId
- unique identifier (guid) for the metadata collection.metadataCollectionName
- display name for the metadata collection (can be null).
-
getMetadataCollectionName
Return the metadata collection name (or null) for a metadata collection id.- Parameters:
metadataCollectionId
- unique identifier (guid) for the metadata collection.- Returns:
- display name
-
getSkeletonEntity
@Deprecated EntityDetail getSkeletonEntity(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException Deprecated.Return an entity with the header and type information filled out. The caller only needs to add properties and classifications to complete the set up of the entity.- Parameters:
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 type- Returns:
- partially filled out entity needs classifications and properties
- Throws:
TypeErrorException
- the type name is not recognized.
-
getSkeletonEntity
EntityDetail getSkeletonEntity(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException Return an entity with the header and type information filled out. The caller only needs to add properties and classifications to complete the set up of the entity.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionId
- unique identifier for the home metadata collectionmetadataCollectionName
- unique name for the home metadata collectionprovenanceType
- origin of the entityuserName
- name of the creatortypeName
- name of the type- Returns:
- partially filled out entity needs classifications and properties
- Throws:
TypeErrorException
- the type name is not recognized.
-
getSkeletonEntitySummary
@Deprecated EntitySummary getSkeletonEntitySummary(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException Deprecated.Return an entity with the header and type information filled out. The caller only needs to classifications to complete the set up of the entity.- Parameters:
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 type- Returns:
- partially filled out entity needs classifications
- Throws:
TypeErrorException
- the type name is not recognized.
-
getSkeletonEntitySummary
EntitySummary getSkeletonEntitySummary(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException Return an entity with the header and type information filled out. The caller only needs to classifications to complete the set up of the entity.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionId
- unique identifier for the home metadata collectionmetadataCollectionName
- unique name for the home metadata collectionprovenanceType
- origin of the entityuserName
- name of the creatortypeName
- name of the type- Returns:
- partially filled out entity needs classifications
- Throws:
TypeErrorException
- the type name is not recognized.
-
getSkeletonClassification
Classification getSkeletonClassification(String sourceName, String userName, String classificationTypeName, String entityTypeName) throws TypeErrorException Return a classification with the header and type information filled out. The caller only needs to add properties and possibility origin information if it is propagated to complete the set up of the classification.- Parameters:
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.- Returns:
- partially filled out classification needs properties and possibly origin information
- Throws:
TypeErrorException
- the type name is not recognized as a classification type.
-
getSkeletonClassification
Classification getSkeletonClassification(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String classificationTypeName, String entityTypeName) throws TypeErrorException Return a classification with the header and type information filled out. The caller only needs to add properties and possibility origin information if it is propagated to complete the set up of the classification.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionId
- unique identifier for the home metadata collectionprovenanceType
- type of home for the new classificationuserName
- name of the creatorclassificationTypeName
- name of the classification typeentityTypeName
- name of the type for the entity that this classification is to be attached to.- Returns:
- partially filled out classification needs properties and possibly origin information
- Throws:
TypeErrorException
- the type name is not recognized as a classification type.
-
getSkeletonClassification
Classification getSkeletonClassification(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String classificationTypeName, String entityTypeName) throws TypeErrorException Return a classification with the header and type information filled out. The caller only needs to add properties and possibility origin information if it is propagated to complete the set up of the classification.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionId
- unique identifier for the home metadata collectionmetadataCollectionName
- unique name for the home metadata collectionprovenanceType
- type of home for the new classificationuserName
- name of the creatorclassificationTypeName
- name of the classification typeentityTypeName
- name of the type for the entity that this classification is to be attached to.- Returns:
- partially filled out classification needs properties and possibly origin information
- Throws:
TypeErrorException
- the type name is not recognized as a classification type.
-
getSkeletonRelationship
Relationship getSkeletonRelationship(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException Return a relationship with the header and type information filled out. The caller only needs to add properties to complete the set up of the relationship.- Parameters:
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 type- Returns:
- partially filled out relationship needs properties
- Throws:
TypeErrorException
- the type name is not recognized as a relationship type.
-
getSkeletonRelationship
Relationship getSkeletonRelationship(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName) throws TypeErrorException Return a relationship with the header and type information filled out. The caller only needs to add properties to complete the set up of the relationship.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionId
- unique identifier for the home metadata collectionmetadataCollectionName
- unique name for the home metadata collectionprovenanceType
- origin type of the relationshipuserName
- name of the creatortypeName
- name of the relationship's type- Returns:
- partially filled out relationship needs properties
- Throws:
TypeErrorException
- the type name is not recognized as a relationship type.
-
getNewInstanceType
InstanceType getNewInstanceType(String sourceName, TypeDefSummary typeDefSummary) throws TypeErrorException Return a relationship with the header and type information filled out. The caller only needs to add properties to complete the set up of the relationship.- Parameters:
sourceName
- source of the request (used for logging)typeDefSummary
- details of the new type- Returns:
- instance type
- Throws:
TypeErrorException
- the type name is not recognized as a relationship type.
-
getNewEntity
EntityDetail getNewEntity(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties, List<Classification> classifications) throws TypeErrorException Return a filled out entity. It just needs to add the classifications.- Parameters:
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 entity- Returns:
- an entity that is filled out
- Throws:
TypeErrorException
- the type name is not recognized as an entity type
-
getNewEntity
EntityDetail getNewEntity(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties, List<Classification> classifications) throws TypeErrorException Return a filled out entity. It just needs to add the classifications.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionName
- unique name for the home metadata collectionmetadataCollectionId
- 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 entity- Returns:
- an entity that is filled out
- Throws:
TypeErrorException
- the type name is not recognized as an entity type
-
getNewRelationship
Relationship getNewRelationship(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties) throws TypeErrorException Return a filled out relationship which just needs the entity proxies added.- Parameters:
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 relationship- Returns:
- a relationship that is filled out
- Throws:
TypeErrorException
- the type name is not recognized as a relationship type
-
getNewRelationship
Relationship getNewRelationship(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties) throws TypeErrorException Return a filled out relationship which just needs the entity proxies added.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionId
- unique identifier for the home metadata collectionmetadataCollectionName
- unique name for the home metadata collectionprovenanceType
- origin of the relationshipuserName
- name of the creatortypeName
- name of the typeproperties
- properties for the relationship- Returns:
- a relationship that is filled out
- Throws:
TypeErrorException
- the type name is not recognized as a relationship type
-
getNewClassification
Classification getNewClassification(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, String entityTypeName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties properties) throws TypeErrorException Return a classification with the header and type information filled out. The caller only needs to add properties to complete the set up of the classification.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionId
- unique identifier for the home metadata collectionprovenanceType
- origin of the classificationuserName
- 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 classification- Returns:
- partially filled out classification needs properties and possibly origin information
- Throws:
TypeErrorException
- the type name is not recognized as a classification type.
-
getNewClassification
Classification getNewClassification(String sourceName, String metadataCollectionId, String metadataCollectionName, InstanceProvenanceType provenanceType, String userName, String typeName, String entityTypeName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties properties) throws TypeErrorException Return a classification with the header and type information filled out. The caller only needs to add properties to complete the set up of the classification.- Parameters:
sourceName
- source of the request (used for logging)metadataCollectionId
- unique identifier for the home metadata collectionmetadataCollectionName
- unique name for the home metadata collectionprovenanceType
- origin of the classificationuserName
- 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 classification- Returns:
- partially filled out classification needs properties and possibly origin information
- Throws:
TypeErrorException
- the type name is not recognized as a classification type.
-
getNewClassification
@Deprecated Classification getNewClassification(String sourceName, String userName, String typeName, String entityTypeName, ClassificationOrigin classificationOrigin, String classificationOriginGUID, InstanceProperties properties) throws TypeErrorException Deprecated.Return a classification with the header and type information filled out. The caller only needs to add properties to complete the set up of the classification. This method is deprecated because it does not take the provenance information. The implementation of this method sets the provenance information to "LOCAL_COHORT".- Parameters:
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 toclassificationOrigin
- source of the classification (assigned or propagated)classificationOriginGUID
- unique identifier of element that originated the classification if propagatedproperties
- properties for the classification- Returns:
- partially filled out classification needs properties and possibly origin information
- Throws:
TypeErrorException
- the type name is not recognized as a classification type.
-
checkEntityNotClassifiedEntity
@Deprecated void checkEntityNotClassifiedEntity(String sourceName, EntitySummary entity, String classificationName, String methodName) throws ClassificationErrorException Deprecated.Throws an exception if an entity is classified with the supplied classification name. It is typically used when adding new classifications to entities.- Parameters:
sourceName
- source of the request (used for logging)entity
- entity to updateclassificationName
- classification to retrievemethodName
- calling method- Throws:
ClassificationErrorException
- the classification is not attached to the entity
-
checkEntityNotClassifiedEntity
Classification checkEntityNotClassifiedEntity(String sourceName, EntitySummary entity, String classificationName, InstanceProperties classificationProperties, AuditLog auditLog, String methodName) throws ClassificationErrorException Throws an exception if an entity is classified with the supplied classification name and the requested properties are different from the existing properties. It is typically used when adding new classifications to entities and there is a possibility of a race condition with multiple threads attempting to add the same classification.- Parameters:
sourceName
- source of the request (used for logging)entity
- entity to updateclassificationName
- classification to retrieveclassificationProperties
- list of properties to set in the classificationauditLog
- optional logging destinationmethodName
- calling method- Returns:
- duplicate classification
- Throws:
ClassificationErrorException
- the classification is not attached to the entity
-
addClassificationToList
List<Classification> addClassificationToList(String sourceName, List<Classification> classificationList, Classification newClassification, String methodName) Add a classification to an existing entity.- Parameters:
sourceName
- source of the request (used for logging)classificationList
- entity classifications to updatenewClassification
- classification to addmethodName
- calling method- Returns:
- updated entity
-
addClassificationToEntity
EntityDetail addClassificationToEntity(String sourceName, EntityDetail entity, Classification newClassification, String methodName) Add a classification to an existing entity.- Parameters:
sourceName
- source of the request (used for logging)entity
- entity to updatenewClassification
- classification to updatemethodName
- calling method- Returns:
- updated entity
-
addClassificationToEntity
EntityProxy addClassificationToEntity(String sourceName, EntityProxy entity, Classification newClassification, String methodName) Add a classification to an existing entity.- Parameters:
sourceName
- source of the request (used for logging)entity
- entity to updatenewClassification
- classification to updatemethodName
- calling method- Returns:
- updated entity
-
getClassificationProperties
InstanceProperties getClassificationProperties(String sourceName, List<Classification> classifications, String classificationName, String methodName) Return the properties from a named classification or null if classification not present or without properties.- Parameters:
sourceName
- source of the request (used for logging)classifications
- list of classifications for an entityclassificationName
- classification to retrievemethodName
- calling method- Returns:
- located properties - or null if none
-
getClassificationFromEntity
Classification getClassificationFromEntity(String sourceName, EntitySummary entity, String classificationName, String methodName) throws ClassificationErrorException Return the named classification from an existing entity and throws an exception if it is not.- Parameters:
sourceName
- source of the request (used for logging)entity
- entity to updateclassificationName
- classification to retrievemethodName
- calling method- Returns:
- located classification
- Throws:
ClassificationErrorException
- the classification is not attached to the entity
-
getHomeClassificationsFromEntity
List<Classification> getHomeClassificationsFromEntity(String sourceName, EntityDetail entity, String metadataCollectionId, String methodName) Return the classifications from the requested metadata collection. Not, this method does not cope with metadata collection ids of null.- Parameters:
sourceName
- source of the request (used for logging)entity
- entity to updatemetadataCollectionId
- metadata collection to retrievemethodName
- calling method- Returns:
- located classification
-
updateClassificationInEntity
EntityDetail updateClassificationInEntity(String sourceName, String userName, EntityDetail entity, Classification newClassification, String methodName) Replace an existing classification with a new one- Parameters:
sourceName
- source of the request (used for logging)userName
- name of the editorentity
- entity to updatenewClassification
- classification to updatemethodName
- calling method- Returns:
- updated entity
-
updateClassificationInEntity
EntityProxy updateClassificationInEntity(String sourceName, String userName, EntityProxy entity, Classification newClassification, String methodName) Replace an existing classification with a new one- Parameters:
sourceName
- source of the request (used for logging)userName
- name of the editorentity
- entity to updatenewClassification
- classification to updatemethodName
- calling method- Returns:
- updated entity
-
deleteClassificationFromEntity
EntityDetail deleteClassificationFromEntity(String sourceName, EntityDetail entity, String oldClassificationName, String methodName) throws ClassificationErrorException Return a oldClassification with the header and type information filled out. The caller only needs to add properties to complete the set up of the oldClassification.- Parameters:
sourceName
- source of the request (used for logging)entity
- entity to updateoldClassificationName
- classification to removemethodName
- calling method- Returns:
- updated entity
- Throws:
ClassificationErrorException
- the entity was not classified with this classification
-
deleteClassificationFromEntity
EntityProxy deleteClassificationFromEntity(String sourceName, EntityProxy entityProxy, String oldClassificationName, String methodName) throws ClassificationErrorException Return a oldClassification with the header and type information filled out. The caller only needs to add properties to complete the set up of the oldClassification.- Parameters:
sourceName
- source of the request (used for logging)entityProxy
- entity to updateoldClassificationName
- classification to removemethodName
- calling method- Returns:
- updated entity
- Throws:
ClassificationErrorException
- the entity was not classified with this classification
-
mergeInstanceProperties
InstanceProperties mergeInstanceProperties(String sourceName, InstanceProperties existingProperties, InstanceProperties newProperties) Merge two sets of instance properties.- Parameters:
sourceName
- source of the request (used for logging)existingProperties
- current set of propertiesnewProperties
- properties to add/update- Returns:
- merged properties
-
incrementVersion
Relationship incrementVersion(String userId, InstanceAuditHeader originalInstance, Relationship updatedInstance) Changes the control information to reflect an update in an instance.- Parameters:
userId
- user making the change.originalInstance
- original instance before the changeupdatedInstance
- new version of the instance that needs updating- Returns:
- updated instance
-
incrementVersion
Classification incrementVersion(String userId, InstanceAuditHeader originalInstance, Classification updatedInstance) Changes the control information to reflect an update in an instance.- Parameters:
userId
- user making the change.originalInstance
- original instance before the changeupdatedInstance
- new version of the instance that needs updating- Returns:
- updated instance
-
incrementVersion
EntityDetail incrementVersion(String userId, InstanceAuditHeader originalInstance, EntityDetail updatedInstance) Changes the control information to reflect an update in an instance.- Parameters:
userId
- user making the change.originalInstance
- original instance before the changeupdatedInstance
- new version of the instance that needs updating- Returns:
- updated instance
-
getNewEntityProxy
EntityProxy getNewEntityProxy(String sourceName, EntityDetail entity) throws RepositoryErrorException Generate an entity proxy from an entity and its TypeDef.- Parameters:
sourceName
- source of the request (used for logging)entity
- entity instance- Returns:
- new entity proxy
- Throws:
RepositoryErrorException
- logic error in the repository corrupted entity
-
getNewEntityProxy
EntityProxy getNewEntityProxy(String sourceName, String metadataCollectionId, InstanceProvenanceType provenanceType, String userName, String typeName, InstanceProperties properties, List<Classification> classifications) throws TypeErrorException Return a filled out entity proxy.- Parameters:
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 entity- Returns:
- an entity proxy that is filled out
- Throws:
TypeErrorException
- the type name is not recognized as an entity type
-
getTypeName
String getTypeName(InstanceAuditHeader instance) throws RepositoryErrorException, InvalidParameterException Returns the type name from an instance (entity, relationship or classification).- Parameters:
instance
- instance to read- Returns:
- String type name
- Throws:
RepositoryErrorException
- unable to locate typeInvalidParameterException
- invalid property value
-
getEnd1EntityGUID
Return the guid of an entity linked to end 1 of the relationship.- Parameters:
relationship
- relationship to parse- Returns:
- String unique identifier
-
getEnd2EntityGUID
Return the guid of an entity linked to end 2 of the relationship.- Parameters:
relationship
- relationship to parse- Returns:
- String unique identifier
-
formatEntityResults
List<EntityDetail> formatEntityResults(List<EntityDetail> fullResults, int fromElement, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws PagingErrorException, PropertyErrorException Use the paging and sequencing parameters to format the results for a repository call that returns a list of entity instances.- Parameters:
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.- Returns:
- results array as requested
- Throws:
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.
-
formatRelationshipResults
List<Relationship> formatRelationshipResults(List<Relationship> fullResults, int fromElement, String sequencingProperty, SequencingOrder sequencingOrder, int pageSize) throws PagingErrorException, PropertyErrorException Use the paging and sequencing parameters to format the results for a repository call that returns a list of relationship instances.- Parameters:
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.- Returns:
- results array as requested
- Throws:
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.
-
getExactMatchRegex
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. the returned string will be interpreted as a literal -- used to find an exact match of the string, irrespective of whether it contains characters that may have special meanings to regular expressions). Note that usage of the string by methods that cannot handle regular expressions should first un-escape the string using the getUnqualifiedLiteralString helper method. Finally, note that this enforces a case-sensitive search.- Parameters:
searchString
- the string to escape to avoid being interpreted as a regular expression- Returns:
- string that is interpreted literally rather than as a regular expression
- See Also:
-
getExactMatchRegex
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. the returned string will be interpreted as a literal -- used to find an exact match of the string, irrespective of whether it contains characters that may have special meanings to regular expressions). Note that usage of the string by methods that cannot handle regular expressions should first un-escape the string using the getUnqualifiedLiteralString helper method.- Parameters:
searchString
- the string to escape to avoid being interpreted as a regular expressioninsensitive
- set to true to have a case-insensitive exact match regular expression- Returns:
- string that is interpreted literally rather than as a regular expression
- See Also:
-
isExactMatchRegex
Indicates whether the provided string should be treated as an exact match (true) or any other regular expression (false). Note that this method relies on the use of the getExactMatchRegex helper method having been used to qualify a string when it should be treated as a literal. That is, this method relies on the presence of the escape sequences used by Java's Pattern.quote() method. The method is not intended to work on all strings in general to arbitrarily detect whether they might be a regular expression or not. Primarily a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- the string to check whether it should be interpreted literally or as as a regular expression- Returns:
- true if the provided string should be interpreted literally, false if it should be interpreted as a regex
- See Also:
-
isExactMatchRegex
Indicates whether the provided string should be treated as an exact match (true) or any other regular expression (false). Note that this method relies on the use of the getExactMatchRegex helper method having been used to qualify a string when it should be treated as a literal. That is, this method relies on the presence of the escape sequences used by Java's Pattern.quote() method. The method is not intended to work on all strings in general to arbitrarily detect whether they might be a regular expression or not. Primarily a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- the string to check whether it should be interpreted literally or as as a regular expressioninsensitive
- when true, only return true if the string is a case-insensitive exact match regex; when false, only return true if the string is a case-sensitive exact match regex- Returns:
- true if the provided string should be interpreted literally, false if it should be interpreted as a regex
- See Also:
-
getContainsRegex
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. The passed string will NOT be treated as a regular expression; if you intend to use both a "contains" semantic and a regular expression within the string, simply construct your own regular expression directly (not with this helper method). Note that usage of the returned string by methods that cannot handle regular expressions should first un-escape the returned string using the getUnqualifiedLiteralString helper method. Finally, note that this enforces a case-sensitive search.- Parameters:
searchString
- the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain a "contains" semantic- Returns:
- string that is interpreted literally, wrapped for a "contains" semantic
- See Also:
-
getContainsRegex
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. The passed string will NOT be treated as a regular expression; if you intend to use both a "contains" semantic and a regular expression within the string, simply construct your own regular expression directly (not with this helper method). Note that usage of the returned string by methods that cannot handle regular expressions should first un-escape the returned string using the getUnqualifiedLiteralString helper method.- Parameters:
searchString
- the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain a "contains" semanticinsensitive
- set to true to have a case-insensitive contains regular expression- Returns:
- string that is interpreted literally, wrapped for a "contains" semantic
- See Also:
-
isContainsRegex
Indicates whether the provided string should be treated as a simple "contains" regular expression (true) or any other regular expression (false). Note that this method relies on the use of the getContainsRegex helper method having been used to qualify a string when it should be treated primarily as a literal with only very basic "contains" wrapping. Primarily a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- - the string to check whether it should be interpreted as a simple "contains"- Returns:
- true if the provided string should be interpreted as a simple "contains", false if it should be interpreted as a full regex
- See Also:
-
isContainsRegex
Indicates whether the provided string should be treated as a simple "contains" regular expression (true) or any other regular expression (false). Note that this method relies on the use of the getContainsRegex helper method having been used to qualify a string when it should be treated primarily as a literal with only very basic "contains" wrapping. Primarily a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- the string to check whether it should be interpreted as a simple "contains"insensitive
- when true, only return true if the string is a case-insensitive "contains" regex; when false, only return true if the string is a case-sensitive "contains" regex- Returns:
- true if the provided string should be interpreted as a simple "contains", false if it should be interpreted as a full regex
- See Also:
-
getStartsWithRegex
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. The passed string will NOT be treated as a regular expression; if you intend to use both a "startswith" semantic and a regular expression within the string, simply construct your own regular expression directly (not with this helper method). Note that usage of the returned string by methods that cannot handle regular expressions should first un-escape the returned string using the getUnqualifiedLiteralString helper method. Finally, note that this enforces a case-sensitive search.- Parameters:
searchString
- the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain a "startswith" semantic- Returns:
- string that is interpreted literally, wrapped for a "startswith" semantic
- See Also:
-
getStartsWithRegex
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. The passed string will NOT be treated as a regular expression; if you intend to use both a "startswith" semantic and a regular expression within the string, simply construct your own regular expression directly (not with this helper method). Note that usage of the returned string by methods that cannot handle regular expressions should first un-escape the returned string using the getUnqualifiedLiteralString helper method.- Parameters:
searchString
- the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain a "startswith" semanticinsensitive
- set to true to have a case-insensitive "startswith" regular expression- Returns:
- string that is interpreted literally, wrapped for a "startswith" semantic
- See Also:
-
isStartsWithRegex
Indicates whether the provided string should be treated as a simple "startswith" regular expression (true) or any other regular expression (false). Note that this method relies on the use of the getStartsWithRegex helper method having been used to qualify a string when it should be treated primarily as a literal with only very basic "startswith" wrapping. Primarily a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- the string to check whether it should be interpreted as a simple "startswith"- Returns:
- true if the provided string should be interpreted as a simple "startswith", false if it should be interpreted as a full regex
- See Also:
-
isStartsWithRegex
Indicates whether the provided string should be treated as a simple "startswith" regular expression (true) or any other regular expression (false). Note that this method relies on the use of the getStartsWithRegex helper method having been used to qualify a string when it should be treated primarily as a literal with only very basic "startswith" wrapping. Primarily a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- the string to check whether it should be interpreted as a simple "startswith"insensitive
- when true, only return true if the string is a case-insensitive "startswith" regex; when false, only return true if the string is a case-sensitive "startswith" regex- Returns:
- true if the provided string should be interpreted as a simple "startswith", false if it should be interpreted as a full regex
- See Also:
-
getEndsWithRegex
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. The passed string will NOT be treated as a regular expression; if you intend to use both a "endswith" semantic and a regular expression within the string, simply construct your own regular expression directly (not with this helper method). Note that usage of the returned string by methods that cannot handle regular expressions should first un-escape the returned string using the getUnqualifiedLiteralString helper method. Finally, note that this enforces a case-sensitive search.- Parameters:
searchString
- the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain an "endswith" semantic- Returns:
- string that is interpreted literally, wrapped for an "endswith" semantic
- See Also:
-
getEndsWithRegex
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. The passed string will NOT be treated as a regular expression; if you intend to use both a "endswith" semantic and a regular expression within the string, simply construct your own regular expression directly (not with this helper method). Note that usage of the returned string by methods that cannot handle regular expressions should first un-escape the returned string using the getUnqualifiedLiteralString helper method.- Parameters:
searchString
- the string to escape to avoid being interpreted as a regular expression, but also wrap to obtain an "endswith" semanticinsensitive
- set to true to have a case-insensitive "endswith" regular expression- Returns:
- string that is interpreted literally, wrapped for an "endswith" semantic
- See Also:
-
isEndsWithRegex
Indicates whether the provided string should be treated as a simple "endswith" regular expression (true) or any other regular expression (false). Note that this method relies on the use of the getEndsWithRegex helper method having been used to qualify a string when it should be treated primarily as a literal with only very basic "endswith" wrapping. Primarily a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- the string to check whether it should be interpreted as a simple "endswith"- Returns:
- true if the provided string should be interpreted as a simple "endswith", false if it should be interpreted as a full regex
- See Also:
-
isEndsWithRegex
Indicates whether the provided string should be treated as a simple "endswith" regular expression (true) or any other regular expression (false). Note that this method relies on the use of the getEndsWithRegex helper method having been used to qualify a string when it should be treated primarily as a literal with only very basic "endswith" wrapping. Primarily a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- the string to check whether it should be interpreted as a simple "endswith"insensitive
- when true, only return true if the string is a case-insensitive "endswith" regex; when false, only return true if the string is a case-sensitive "endswith" regex- Returns:
- true if the provided string should be interpreted as a simple "endswith", false if it should be interpreted as a full regex
- See Also:
-
getUnqualifiedLiteralString
Retrieve an unescaped version of the provided string that can be treated as a literal (not a regular expression). Primarily a helper method for methods that do not directly leverage regular expressions: so that they have a string they can treat as a literal without needing to un-escape the regex-meaningful characters injected by the various getXYZRegex helper methods. For example, this will translate the input of '.*\Qmy-search-string\E.*' into a return value of 'my-search-string'.- Parameters:
searchString
- - the (potentially) wrapped and escaped string to un-escape and un-wrap- Returns:
- the un-escaped, un-wrapped literal string
- See Also:
-
isCaseInsensitiveRegex
Indicates whether the provided string should be treated as a case-insensitive regular expression (true) or as a case-sensitive regular expression (false). Note that this method relies on the use of the getXYZRegex helper methods having been used to qualify a string with case-insensitivity. Primarily this is a helper method for methods that do not directly handle regular expressions (for those it should be possible to just directly use the string as-is and it will be correctly interpreted).- Parameters:
searchString
- the string to check whether it should be interpreted as case-insensitive- Returns:
- true if provided string should be interpreted as case-insensitive, false if it should be case-sensitive
- See Also:
-
getRelationshipDifferences
RelationshipDifferences getRelationshipDifferences(Relationship left, Relationship right, boolean ignoreModificationStamps) Calculate the differences between the two provided Relationship objects.- Parameters:
left
- one of the Relationship objects to compareright
- the other Relationship object to compareignoreModificationStamps
- true if we should ignore modification details (Version, UpdateTime, UpdatedBy) as differences, or false if we should include differences on these- Returns:
- RelationshipDifferences
-
getEntityDetailDifferences
EntityDetailDifferences getEntityDetailDifferences(EntityDetail left, EntityDetail right, boolean ignoreModificationStamps) Calculate the differences between the two provided EntityDetail objects.- Parameters:
left
- one of the EntityDetail objects to compareright
- the other EntityDetail object to compareignoreModificationStamps
- true if we should ignore modification details (Version, UpdateTime, UpdatedBy) as differences, or false if we should include differences on these- Returns:
- EntityDetailDifferences
-
getEntityProxyDifferences
EntityProxyDifferences getEntityProxyDifferences(EntityProxy left, EntityProxy right, boolean ignoreModificationStamps) Calculate the differences between the two provided EntityProxy objects.- Parameters:
left
- one of the EntityProxy objects to compareright
- the other EntityProxy object to compareignoreModificationStamps
- true if we should ignore modification details (Version, UpdateTime, UpdatedBy) as differences, or false if we should include differences on these- Returns:
- EntityProxyDifferences
-
getEntitySummaryDifferences
EntitySummaryDifferences getEntitySummaryDifferences(EntitySummary left, EntitySummary right, boolean ignoreModificationStamps) Calculate the differences between the two provided EntitySummary objects.- Parameters:
left
- one of the EntitySummary objects to compareright
- the other EntitySummary object to compareignoreModificationStamps
- true if we should ignore modification details (Version, UpdateTime, UpdatedBy) as differences, or false if we should include differences on these- Returns:
- EntitySummaryDifferences
-
getSearchClassificationsFromList
Convert the provided list of classification names into an equivalent SearchClassifications object.- Parameters:
classificationNames
- list of classification names- Returns:
- SearchClassifications
-