Class SubjectAreaGlossaryRESTResource

java.lang.Object
org.odpi.openmetadata.accessservices.subjectarea.server.spring.SubjectAreaGlossaryRESTResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area") public class SubjectAreaGlossaryRESTResource extends Object
The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata Access Service (OMAS). This interface provides glossary authoring interfaces for subject area experts.
  • Constructor Details

    • SubjectAreaGlossaryRESTResource

      public SubjectAreaGlossaryRESTResource()
      Default constructor
  • Method Details

    • createGlossary

      @PostMapping(path="/users/{userId}/glossaries") public SubjectAreaOMASAPIResponse<Glossary> createGlossary(@PathVariable String serverName, @PathVariable String userId, @RequestBody Glossary suppliedGlossary)
      Create a Glossary. There are specializations of glossaries that can also be created using this operation. To create a specialization, you should specify a nodeType other than Glossary in the supplied glossary.

      Valid nodeTypes for this request are:

      • Taxonomy to create a Taxonomy
      • CanonicalGlossary to create a canonical glossary
      • TaxonomyAndCanonicalGlossary to create a glossary that is both a taxonomy and a canonical glosary
      • Glossary to create a glossary that is not a taxonomy or a canonical glossary
      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
      suppliedGlossary - Glossary to create
      Returns:
      response, when successful contains the created glossary. 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.
    • getGlossary

      @GetMapping(path="/users/{userId}/glossaries/{guid}") public SubjectAreaOMASAPIResponse<Glossary> getGlossary(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid)
      Get a glossary.
      Parameters:
      serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
      userId - userId under which the request is performed
      guid - guid of the glossary to get
      Returns:
      response which when successful contains the glossary 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.
    • findGlossary

      @GetMapping(path="/users/{userId}/glossaries") public SubjectAreaOMASAPIResponse<Glossary> findGlossary(@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,defaultValue="0") Integer startingFrom, @RequestParam(value="pageSize",required=false) Integer pageSize, @RequestParam(value="sequencingOrder",required=false) String sequencingOrder, @RequestParam(value="sequencingProperty",required=false) String sequencingProperty)
      Find Glossary
      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
      searchCriteria - String expression matching Glossary property values. If not specified then all glossaries are returned.
      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 glossaries 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
      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 glossaries 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.
    • getGlossaryRelationships

      @GetMapping(path="/users/{userId}/glossaries/{guid}/relationships") public SubjectAreaOMASAPIResponse<Relationship> getGlossaryRelationships(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid, @RequestParam(value="asOfTime",required=false) Date asOfTime, @RequestParam(value="startingFrom",required=false,defaultValue="0") Integer startingFrom, @RequestParam(value="pageSize",required=false) Integer pageSize, @RequestParam(value="sequencingOrder",required=false) SequencingOrder sequencingOrder, @RequestParam(value="sequencingProperty",required=false) String sequencingProperty)
      Get Glossary relationships
      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 glossary 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 glossary 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.
    • updateGlossary

      @PutMapping(path="/users/{userId}/glossaries/{guid}") public SubjectAreaOMASAPIResponse<Glossary> updateGlossary(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid, @RequestBody Glossary glossary, @RequestParam(value="isReplace",required=false,defaultValue="false") Boolean isReplace)
      Update a Glossary

      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.

      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 glossary to update
      glossary - glossary 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 glossary 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.
    • deleteGlossary

      @DeleteMapping(path="/users/{userId}/glossaries/{guid}") public SubjectAreaOMASAPIResponse<Glossary> deleteGlossary(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid)
      Delete a Glossary instance

      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.

      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

      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 glossary 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.
      • EntityNotDeletedException a soft delete was issued but the glossary was not deleted.
    • restoreGlossary

      @PostMapping(path="/users/{userId}/glossaries/{guid}") public SubjectAreaOMASAPIResponse<Glossary> restoreGlossary(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid)
      Restore a Glossary

      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.

      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 glossary to restore
      Returns:
      response which when successful contains the restored glossary 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.
    • getGlossaryTerms

      @GetMapping(path="/users/{userId}/glossaries/{guid}/terms") public SubjectAreaOMASAPIResponse<Term> getGlossaryTerms(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid, @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,defaultValue="0") Integer startingFrom, @RequestParam(value="pageSize",required=false) Integer pageSize, @RequestParam(value="sequencingOrder",required=false) String sequencingOrder, @RequestParam(value="sequencingProperty",required=false) String sequencingProperty)
      Get terms that are owned by this glossary. The server has a maximum page size defined, the number of terms 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
      asOfTime - the terms returned as they were at this time. null indicates at the current time.
      searchCriteria - String expression matching child 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
      startingFrom - the starting element number for this set of results. This is used when retrieving elements
      pageSize - Return the maximum number of elements that can be returned on this request.
      Returns:
      A list of terms owned by the glossary 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.
    • getGlossaryCategories

      @GetMapping(path="/users/{userId}/glossaries/{guid}/categories") public SubjectAreaOMASAPIResponse<Category> getGlossaryCategories(@PathVariable String serverName, @PathVariable String userId, @PathVariable String guid, @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="onlyTop",required=false,defaultValue="true") Boolean onlyTop, @RequestParam(value="startingFrom",required=false,defaultValue="0") Integer startingFrom, @RequestParam(value="pageSize",required=false) Integer pageSize, @RequestParam(value="sequencingOrder",required=false) String sequencingOrder, @RequestParam(value="sequencingProperty",required=false) String sequencingProperty)
      Get the Categories owned by this glossary. 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 glossary to get terms
      searchCriteria - String expression matching child Category 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 categories 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
      pageSize - the maximum number of elements that can be returned on this request.
      onlyTop - when only the top categories (those categories without parents) are returned.
      Returns:
      A list of categories owned by the glossary 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.