public class SubjectAreaTermHandler extends SubjectAreaHandler
CATEGORY_ANCHOR_RELATIONSHIP_NAME, CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME, CATEGORY_TYPE_NAME, GLOSSARY_TYPE_NAME, mappersFactory, oMRSAPIHelper, PROJECT_SCOPE_RELATIONSHIP_NAME, PROJECT_TYPE_NAME, TERM_ANCHOR_RELATIONSHIP_NAME, TERM_TYPE_NAME| Constructor and Description |
|---|
SubjectAreaTermHandler(OMRSAPIHelper oMRSAPIHelper)
Construct the Subject Area Term Handler
needed to operate within a single server instance.
|
| Modifier and Type | Method and Description |
|---|---|
SubjectAreaOMASAPIResponse<Term> |
createTerm(String userId,
Term suppliedTerm)
Create a Term.
|
SubjectAreaOMASAPIResponse<Term> |
deleteTerm(String userId,
String guid,
Boolean isPurge)
Delete a Term instance
|
SubjectAreaOMASAPIResponse<Term> |
findTerm(String userId,
FindRequest findRequest)
Find Term
|
SubjectAreaOMASAPIResponse<Term> |
getTermByGuid(String userId,
String guid)
Get a term by guid.
|
SubjectAreaOMASAPIResponse<Line> |
getTermRelationships(String userId,
String guid,
FindRequest findRequest)
Get Term relationships
|
SubjectAreaOMASAPIResponse<Term> |
restoreTerm(String userId,
String guid)
Restore a Term
|
SubjectAreaOMASAPIResponse<Term> |
updateTerm(String userId,
String guid,
Term suppliedTerm,
boolean isReplace)
Update a Term
|
convertOmrsToOmas, findEntities, getAllLineForEntity, getAllRelationshipsForEntity, getLinesFromRelationships, getNodesFromEntityDetails, validateGlossarySummaryDuringCreationpublic SubjectAreaTermHandler(OMRSAPIHelper oMRSAPIHelper)
oMRSAPIHelper - omrs API helperpublic SubjectAreaOMASAPIResponse<Term> createTerm(String userId, Term suppliedTerm)
Terms with the same name can be confusing. Best practise is to createTerms that have unique names. This Create call does not police that term names are unique. So it is possible to create Terms with the same name as each other.
Valid nodeTypes for this request are:
userId - unique identifier for requesting user, under which the request is performedsuppliedTerm - Term to createpublic SubjectAreaOMASAPIResponse<Term> getTermByGuid(String userId, String guid)
userId - unique identifier for requesting user, under which the request is performedguid - guid of the term to getpublic SubjectAreaOMASAPIResponse<Term> findTerm(String userId, FindRequest findRequest)
userId - unique identifier for requesting user, under which the request is performedfindRequest - FindRequestpublic SubjectAreaOMASAPIResponse<Line> getTermRelationships(String userId, String guid, FindRequest findRequest)
userId - unique identifier for requesting user, under which the request is performedguid - guidfindRequest - FindRequestpublic SubjectAreaOMASAPIResponse<Term> updateTerm(String userId, String guid, Term suppliedTerm, boolean isReplace)
If the caller has chosen to incorporate the term name in their Term Terms or Categories qualified name, renaming the term will cause those qualified names to mismatch the Term name. If the caller has chosen to incorporate the term qualifiedName in their Term Terms or Categories qualified name, changing the qualified name of the term will cause those qualified names to mismatch the Term name. Status is not updated using this call.
userId - unique identifier for requesting user, under which the request is performedguid - guid of the term to updatesuppliedTerm - term 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<Term> deleteTerm(String userId, String guid, Boolean isPurge)
The deletion of a term is only allowed if there is no term 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 term 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 term 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 term to be deleted.isPurge - true indicates a hard delete, false is a soft delete.public SubjectAreaOMASAPIResponse<Term> restoreTerm(String userId, String guid)
Restore allows the deleted Term 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 term to restoreCopyright © 2018–2020 ODPi. All rights reserved.