Class GlossaryAuthorViewTermRESTResource

java.lang.Object
org.odpi.openmetadata.viewservices.glossaryauthor.server.GlossaryAuthorViewTermRESTResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/view-services/glossary-author/users/{userId}/terms") public class GlossaryAuthorViewTermRESTResource extends Object
The GlossaryAuthorRESTServicesInstance provides the server implementation of the Glossary Author Open Metadata View Service (OMVS) for terms. This interface provides term authoring interfaces for subject area experts.
  • Constructor Details

    • GlossaryAuthorViewTermRESTResource

      public GlossaryAuthorViewTermRESTResource()
      Default constructor
  • Method Details

    • createTerm

      @PostMapping public SubjectAreaOMASAPIResponse<Term> createTerm(@PathVariable String serverName, @PathVariable String userId, @RequestBody Term suppliedTerm)
      Create a Term.

      Terms with the same name can be confusing. Best practise is to create terms 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.

      Parameters:
      serverName - name of the local server.
      userId - userid
      suppliedTerm - Term to create.
      Returns:
      response, when successful contains the created term. when not successful the following Exception responses can occur
      • UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • InvalidParameterException one of the parameters is null or invalid.
      • PropertyServerException Property server exception.
    • getTerm

      @GetMapping(path="/{guid}") public SubjectAreaOMASAPIResponse<Term> getTerm(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid)
      Get a term. The server has a maximum page size defined, the number of categories (a field of Term) returned is limited by that maximum page size.
      Parameters:
      serverName - local UI server name
      userId - userid
      guid - guid of the term to get
      Returns:
      response which when successful contains the term with the requested guid when not successful the following Exception responses can occur
      • UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • InvalidParameterException one of the parameters is null or invalid.
      • PropertyServerException Property server exception.
    • findTerm

      @GetMapping public SubjectAreaOMASAPIResponse<Term> findTerm(@PathVariable String serverName, @PathVariable String userId, @RequestParam(value="searchCriteria",required=false) String searchCriteria, @RequestParam(value="exactValue",required=false,defaultValue="false") Boolean exactValue, @RequestParam(value="ignoreCase",required=false,defaultValue="true") Boolean ignoreCase, @RequestParam(value="asOfTime",required=false) Date asOfTime, @RequestParam(value="startingFrom",required=false) Integer startingFrom, @RequestParam(value="pageSize",required=false) Integer pageSize, @RequestParam(value="sequencingOrder",required=false) SequencingOrder sequencingOrder, @RequestParam(value="sequencingProperty",required=false) String sequencingProperty)
      Find Term
      Parameters:
      serverName - local UI server name
      userId - userid
      searchCriteria - String expression matching Term property values.
      exactValue - 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 respected
      asOfTime - the terms returned as they were at this time. null indicates at the current time.
      startingFrom - 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.
      sequencingOrder - the sequencing order for the results.
      sequencingProperty - the name of the property that should be used to sequence the results.
      Returns:
      A list of terms meeting the search Criteria
      • UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • InvalidParameterException one of the parameters is null or invalid.
      • PropertyServerException Property server exception.
    • getTermRelationships

      @GetMapping(path="/{guid}/relationships") public SubjectAreaOMASAPIResponse<Relationship> getTermRelationships(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid, @RequestParam(value="asOfTime",required=false) Date asOfTime, @RequestParam(value="startingFrom",required=false) Integer startingFrom, @RequestParam(value="pageSize",required=false) Integer pageSize, @RequestParam(value="sequencingOrder",required=false) SequencingOrder sequencingOrder, @RequestParam(value="sequencingProperty",required=false) String sequencingProperty)
      Get Term relationships. The server has a maximum page size defined, the number of relationships returned is limited by that maximum page size.
      Parameters:
      serverName - local UI server name
      userId - userid
      guid - guid of the term to get
      asOfTime - the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00.
      startingFrom - 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.
      sequencingOrder - the sequencing order for the results.
      sequencingProperty - the name of the property that should be used to sequence the results.
      Returns:
      a response which when successful contains the term relationships when not successful the following Exception responses can occur
      • UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • InvalidParameterException one of the parameters is null or invalid.
      • PropertyServerException Property server exception.
    • updateTerm

      @PutMapping(path="/{guid}") public SubjectAreaOMASAPIResponse<Term> updateTerm(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid, @RequestBody Term suppliedTerm, @RequestParam(value="isReplace",required=false,defaultValue="false") Boolean isReplace)
      Update a Term

      Status is not updated using this call. The Categories categorising this Term can be amended using this call. For an update (rather than a replace) with no categories supplied, no changes are made to the categories; otherwise the supplied categories will replace the existing ones. The server has a maximum page size defined, the number of categories returned is limited by that maximum page size.

      Parameters:
      serverName - local UI server name
      userId - userid
      guid - guid of the term to update
      suppliedTerm - term to update
      isReplace - flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.
      Returns:
      a response which when successful contains the updated term when not successful the following Exception responses can occur
      • UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • InvalidParameterException one of the parameters is null or invalid.
      • PropertyServerException Property server exception.
    • deleteTerm

      @DeleteMapping(path="/{guid}") public SubjectAreaOMASAPIResponse<Term> deleteTerm(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid)
      Delete a Term instance

      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.

      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

      Parameters:
      serverName - local UI server name
      userId - userid
      guid - guid of the term to be deleted.
      Returns:
      a void response when not successful the following Exception responses can occur
      • UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • InvalidParameterException one of the parameters is null or invalid.
      • PropertyServerException Property server exception.
    • restoreTerm

      @PostMapping(path="/{guid}") public SubjectAreaOMASAPIResponse<Term> restoreTerm(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid)
      Restore a Term

      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.

      Parameters:
      serverName - local UI server name
      userId - userid
      guid - guid of the term to restore
      Returns:
      response which when successful contains the restored term when not successful the following Exception responses can occur
      • UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • InvalidParameterException one of the parameters is null or invalid.
      • PropertyServerException Property server exception.
    • getTermCategories

      @GetMapping(path="{guid}/categories") public SubjectAreaOMASAPIResponse<Category> getTermCategories(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid, @RequestParam(value="startingFrom",required=false,defaultValue="0") Integer startingFrom, @RequestParam(value="pageSize",required=false) Integer pageSize)
      Get the Categories categorizing this Term. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size.
      Parameters:
      serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
      userId - unique identifier for requesting user, under which the request is performed
      guid - guid of the category to get terms
      startingFrom - the starting element number for this set of results. This is used when retrieving elements
      pageSize - the maximum number of elements that can be returned on this request.
      Returns:
      A list of categories categorizing this Term when not successful the following Exception responses can occur
      • UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • InvalidParameterException one of the parameters is null or invalid.
      • PropertyServerException Property server exception.