@RestController @RequestMapping(value="/api/subject-area/terms") public class SubjectAreaTermController extends SecureController
| Constructor and Description |
|---|
SubjectAreaTermController(SubjectArea subjectArea)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
SubjectAreaOMASAPIResponse |
createTerm(Term suppliedTerm,
javax.servlet.http.HttpServletRequest request)
/**
Create a Term
|
SubjectAreaOMASAPIResponse |
deleteTerm(String guid,
Boolean isPurge,
javax.servlet.http.HttpServletRequest request)
Delete a Term instance
|
SubjectAreaOMASAPIResponse |
findTerm(String searchCriteria,
Date asOfTime,
Integer offset,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty,
javax.servlet.http.HttpServletRequest request)
Find Term
|
SubjectAreaOMASAPIResponse |
getTerm(String guid,
javax.servlet.http.HttpServletRequest request)
Get a term.
|
SubjectAreaOMASAPIResponse |
getTermRelationships(String guid,
Date asOfTime,
Integer offset,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty,
javax.servlet.http.HttpServletRequest request) |
SubjectAreaOMASAPIResponse |
restoreTerm(String guid,
javax.servlet.http.HttpServletRequest request)
Restore a Term
Restore allows the deleted Term to be made active again.
|
SubjectAreaOMASAPIResponse |
updateTerm(String guid,
Term term,
Boolean isReplace,
javax.servlet.http.HttpServletRequest request)
Update a Term
|
getUserpublic SubjectAreaTermController(SubjectArea subjectArea)
subjectArea - main client object for the Subject Area OMAS@PostMapping public SubjectAreaOMASAPIResponse createTerm(@RequestBody Term suppliedTerm, javax.servlet.http.HttpServletRequest request)
The name needs to be specified - as this is the main identifier for the term. The name should be unique for canonical glossaries. This API does not police the uniqueness in this case.
The qualifiedName can be specified and will be honoured. If it is specified then the caller may wish to ensure that it is unique. If this qualifiedName is not specified then one will be generated as GlossaryTerm concatinated with the the guid.
Failure to create the Terms classifications, link to its glossary or its icon, results in the create failing and the term being deleted
suppliedTerm - Term to createrequest - Servlet request@GetMapping(path="/{guid}")
public SubjectAreaOMASAPIResponse getTerm(@PathVariable
String guid,
javax.servlet.http.HttpServletRequest request)
guid - guid of the term to getrequest - Servlet request@GetMapping(path="/") public SubjectAreaOMASAPIResponse findTerm(@RequestParam(value="searchCriteria",required=false) String searchCriteria, @RequestParam(value="asOfTime",required=false) Date asOfTime, @RequestParam(value="offset",required=false) Integer offset, @RequestParam(value="pageSize",required=false) Integer pageSize, @RequestParam(value="sequencingOrder",required=false) SequencingOrder sequencingOrder, @RequestParam(value="SequencingProperty",required=false) String sequencingProperty, javax.servlet.http.HttpServletRequest request)
searchCriteria - String expression matching Term property values.asOfTime - the terms returned as they were at this time. null indicates at the current time.offset - the starting element number for this set of results. This is used when retrieving elements
beyond the first page of results. Zero means the results start from the first element.pageSize - the maximum number of elements that can be returned on this request.
0 means there is no limit to the page sizesequencingOrder - the sequencing order for the results.sequencingProperty - the name of the property that should be used to sequence the results.request - Servlet request@GetMapping(path="/{guid}/relationships")
public SubjectAreaOMASAPIResponse getTermRelationships(@PathVariable
String guid,
@RequestParam(value="asOfTime",required=false)
Date asOfTime,
@RequestParam(value="offset",required=false)
Integer offset,
@RequestParam(value="pageSize",required=false)
Integer pageSize,
@RequestParam(value="sequencingOrder",required=false)
SequencingOrder sequencingOrder,
@RequestParam(value="SequencingProperty",required=false)
String sequencingProperty,
javax.servlet.http.HttpServletRequest request)
@PutMapping(path="/{guid}")
public SubjectAreaOMASAPIResponse updateTerm(@PathVariable
String guid,
@RequestBody
Term term,
@RequestParam(value="isReplace",required=false)
Boolean isReplace,
javax.servlet.http.HttpServletRequest request)
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.
guid - guid of the term to updateterm - term to updateisReplace - flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.request - Servlet request@DeleteMapping(path="/{guid}")
public SubjectAreaOMASAPIResponse deleteTerm(@PathVariable
String guid,
@RequestParam(value="isPurge",required=false)
Boolean isPurge,
javax.servlet.http.HttpServletRequest request)
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
guid - guid of the term to be deleted.isPurge - true indicates a hard delete, false is a soft delete.request - Servlet request@PostMapping(path="/{guid}")
public SubjectAreaOMASAPIResponse restoreTerm(@PathVariable
String guid,
javax.servlet.http.HttpServletRequest request)
guid - guid of the term to restorerequest - Servlet requestCopyright © 2018–2020 ODPi. All rights reserved.