public class SubjectAreaGlossaryHandler extends SubjectAreaHandler
CATEGORY_ANCHOR_RELATIONSHIP_NAME, CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME, CATEGORY_TYPE_NAME, GLOSSARY_TYPE_NAME, invalidParameterHandler, mappersFactory, maxPageSize, oMRSAPIHelper, PROJECT_SCOPE_RELATIONSHIP_NAME, PROJECT_TYPE_NAME, TERM_ANCHOR_RELATIONSHIP_NAME, TERM_CATEGORIZATION_RELATIONSHIP_NAME, TERM_TYPE_NAME| Constructor and Description |
|---|
SubjectAreaGlossaryHandler(OMRSAPIHelper oMRSAPIHelper,
int maxPageSize)
Construct the Subject Area Glossary Handler
needed to operate within a single server instance.
|
| Modifier and Type | Method and Description |
|---|---|
SubjectAreaOMASAPIResponse<Glossary> |
createGlossary(String userId,
Glossary suppliedGlossary)
Create a Glossary.
|
SubjectAreaOMASAPIResponse<Glossary> |
deleteGlossary(String userId,
String guid,
Boolean isPurge)
Delete a Glossary instance
|
SubjectAreaOMASAPIResponse<Glossary> |
findGlossary(String userId,
FindRequest findRequest,
boolean exactValue,
boolean ignoreCase)
Find Glossary
|
SubjectAreaOMASAPIResponse<Category> |
getCategories(String userId,
String guid,
FindRequest findRequest,
boolean exactValue,
boolean ignoreCase,
Boolean onlyTop,
SubjectAreaCategoryHandler categoryHandler)
Get the Categories owned by this glossary.
|
SubjectAreaOMASAPIResponse<Glossary> |
getGlossaryByGuid(String userId,
String guid)
Get a glossary by guid.
|
SubjectAreaOMASAPIResponse<Relationship> |
getGlossaryRelationships(String userId,
String guid,
FindRequest findRequest)
Get Glossary relationships
|
SubjectAreaOMASAPIResponse<Term> |
getTerms(String userId,
String guid,
FindRequest findRequest,
boolean exactValue,
boolean ignoreCase)
Get terms that are owned by this glossary.
|
SubjectAreaOMASAPIResponse<Glossary> |
restoreGlossary(String userId,
String guid)
Restore a Glossary
|
SubjectAreaOMASAPIResponse<Glossary> |
updateGlossary(String userId,
String guid,
Glossary suppliedGlossary,
boolean isReplace)
Update a Glossary
|
categoryMatchSearchCriteria, checkReadOnly, checkRelationshipReadOnly, convertOmrsToOmas, findNodes, getAllRelationshipForEntity, getAllRelationshipsForEntity, getMaxPageSize, getNodesFromEntityDetails, getRelatedNodesForEnd1, getRelatedNodesForEnd2, getRelationshipsFromRelationships, sanitiseFindRequest, sanitiseFindRequest, setUniqueQualifiedNameIfBlank, termMatchSearchCriteria, validateGlossarySummaryDuringCreationpublic SubjectAreaGlossaryHandler(OMRSAPIHelper oMRSAPIHelper, int maxPageSize)
oMRSAPIHelper - omrs API helpermaxPageSize - maximum page sizepublic SubjectAreaOMASAPIResponse<Glossary> createGlossary(String userId, Glossary suppliedGlossary)
Glossaries with the same name can be confusing. Best practise is to createGlossaries that have unique names. This Create call does not police that glossary names are unique. So it is possible to create Glossaries with the same name as each other.
Valid nodeTypes for this request are:
userId - unique identifier for requesting user, under which the request is performedsuppliedGlossary - Glossary to createpublic SubjectAreaOMASAPIResponse<Glossary> getGlossaryByGuid(String userId, String guid)
userId - unique identifier for requesting user, under which the request is performedguid - guid of the glossary to getpublic SubjectAreaOMASAPIResponse<Glossary> findGlossary(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase)
userId - unique identifier for requesting user, under which the request is performedfindRequest - FindRequestexactValue - a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned.ignoreCase - a boolean, which when set means that case will be ignored, if not set that case will be respectedpublic SubjectAreaOMASAPIResponse<Relationship> getGlossaryRelationships(String userId, String guid, FindRequest findRequest)
userId - unique identifier for requesting user, under which the request is performedguid - guidfindRequest - FindRequestwhen not successful the following Exception responses can occur
public SubjectAreaOMASAPIResponse<Glossary> updateGlossary(String userId, String guid, Glossary suppliedGlossary, boolean isReplace)
If the caller has chosen to incorporate the glossary name in their Glossary Terms or Categories qualified name, renaming the glossary will cause those qualified names to mismatch the Glossary name. If the caller has chosen to incorporate the glossary qualifiedName in their Glossary Terms or Categories qualified name, changing the qualified name of the glossary will cause those qualified names to mismatch the Glossary name. Status is not updated using this call.
userId - unique identifier for requesting user, under which the request is performedguid - guid of the glossary to updatesuppliedGlossary - glossary to be updatedisReplace - flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.public SubjectAreaOMASAPIResponse<Glossary> deleteGlossary(String userId, String guid, Boolean isPurge)
The deletion of a glossary is only allowed if there is no glossary content (i.e. no terms or categories).
There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support is optional. Soft delete is the default.
A soft delete means that the glossary instance will exist in a deleted state in the repository after the delete operation. This means that it is possible to undo the delete. A hard delete means that the glossary will not exist after the operation. when not successful the following Exceptions can occur
userId - unique identifier for requesting user, under which the request is performedguid - guid of the glossary to be deleted.isPurge - true indicates a hard delete, false is a soft delete.public SubjectAreaOMASAPIResponse<Glossary> restoreGlossary(String userId, String guid)
Restore allows the deleted Glossary to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored.
userId - unique identifier for requesting user, under which the request is performedguid - guid of the glossary to restorepublic SubjectAreaOMASAPIResponse<Term> getTerms(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase)
userId - unique identifier for requesting user, under which the request is performedguid - guid of the category to get termsfindRequest - FindRequestexactValue - a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned.ignoreCase - a boolean, which when set means that case will be ignored, if not set that case will be respectedpublic SubjectAreaOMASAPIResponse<Category> getCategories(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Boolean onlyTop, SubjectAreaCategoryHandler categoryHandler)
userId - unique identifier for requesting user, under which the request is performedguid - guid of the category to get termsfindRequest - FindRequestexactValue - a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned.ignoreCase - a boolean, which when set means that case will be ignored, if not set that case will be respectedonlyTop - when only the top categories (those categories without parents) are returned.categoryHandler - category handler is supplied, so that we can obtain categories containing the parentCategory field,
which we need to test as part of the onlyTop processingCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.