@RestController
@RequestMapping(value="/servers/{serverName}/open-metadata/access-services/subject-area")
public class SubjectAreaCategoryRESTResource
extends Object
| Constructor and Description |
|---|
SubjectAreaCategoryRESTResource()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
SubjectAreaOMASAPIResponse<Category> |
createCategory(String serverName,
String userId,
Category suppliedCategory)
Create a Category.
|
SubjectAreaOMASAPIResponse<Category> |
deleteCategory(String serverName,
String userId,
String guid,
Boolean isPurge)
Delete a Category or SubjectAreaDefinition instance
|
SubjectAreaOMASAPIResponse<Category> |
findCategory(String serverName,
String userId,
String searchCriteria,
Boolean exactValue,
Boolean ignoreCase,
Date asOfTime,
Integer startingFrom,
Integer pageSize,
String sequencingOrder,
String sequencingProperty)
Find Category
|
SubjectAreaOMASAPIResponse<Term> |
getCategorizedTerms(String serverName,
String userId,
String guid,
String searchCriteria,
Boolean exactValue,
Boolean ignoreCase,
Integer startingFrom,
Integer pageSize)
Get the terms that are categorized by this Category
|
SubjectAreaOMASAPIResponse<Category> |
getCategoryByGuid(String serverName,
String userId,
String guid)
Get a Category
|
SubjectAreaOMASAPIResponse<Category> |
getCategoryChildren(String serverName,
String userId,
String guid,
String searchCriteria,
Boolean exactValue,
Boolean ignoreCase,
Integer startingFrom,
Integer pageSize)
Get this Category's child Categories.
|
SubjectAreaOMASAPIResponse<Relationship> |
getCategoryRelationships(String serverName,
String userId,
String guid,
Date asOfTime,
Integer startingFrom,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty)
Get Category relationships
|
SubjectAreaOMASAPIResponse<Category> |
restoreCategory(String serverName,
String userId,
String guid)
Restore a Category
|
SubjectAreaOMASAPIResponse<Category> |
updateCategory(String serverName,
String userId,
String guid,
Category suppliedCategory,
Boolean isReplace)
Update a Category
|
public SubjectAreaCategoryRESTResource()
@PostMapping(path="/users/{userId}/categories")
public SubjectAreaOMASAPIResponse<Category> createCategory(@PathVariable
String serverName,
@PathVariable
String userId,
@RequestBody
Category suppliedCategory)
Valid nodeTypes for this request are:
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 GlossaryCategory concatinated with the the guid.
Failure to create the Categories classifications, link to its glossary or its icon, results in the create failing and the category being deleted
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedsuppliedCategory - category to create@GetMapping(path="/users/{userId}/categories/{guid}")
public SubjectAreaOMASAPIResponse<Category> getCategoryByGuid(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid)
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedguid - guid of the category to get@GetMapping(path="/users/{userId}/categories")
public SubjectAreaOMASAPIResponse<Category> findCategory(@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)
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedsearchCriteria - String expression matching Category property values (this does not include the GlossarySummary content).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 respectedasOfTime - 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
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.@GetMapping(path="/users/{userId}/categories/{guid}/relationships")
public SubjectAreaOMASAPIResponse<Relationship> getCategoryRelationships(@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)
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedguid - guid of the category to getasOfTime - 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.@PutMapping(path="/users/{userId}/categories/{guid}")
public SubjectAreaOMASAPIResponse<Category> updateCategory(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid,
@RequestBody
Category suppliedCategory,
@RequestParam(value="isReplace",required=false,defaultValue="false")
Boolean isReplace)
Status is not updated using this call.
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - userId under which the request is performedguid - guid of the category to updatesuppliedCategory - category to be updatedisReplace - flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.@DeleteMapping(path="/users/{userId}/categories/{guid}")
public SubjectAreaOMASAPIResponse<Category> deleteCategory(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid,
@RequestParam(value="isPurge",required=false,defaultValue="false")
Boolean isPurge)
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 category 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 category will not exist after the operation. when not successful the following Exception responses can occur
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - userId under which the request is performedguid - guid of the category to be deleted.isPurge - true indicates a hard delete, false is a soft delete.@PostMapping(path="/users/{userId}/categories/{guid}")
public SubjectAreaOMASAPIResponse<Category> restoreCategory(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid)
Restore allows the deleted Category to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored.
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedguid - guid of the category to restore@GetMapping(path="/users/{userId}/categories/{guid}/terms")
public SubjectAreaOMASAPIResponse<Term> getCategorizedTerms(@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="startingFrom",required=false,defaultValue="0")
Integer startingFrom,
@RequestParam(value="pageSize",required=false)
Integer pageSize)
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedguid - guid of the category to get termssearchCriteria - String expression to match the categorized 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 respectedstartingFrom - the starting element number for this set of results. This is used when retrieving elementspageSize - the maximum number of elements that can be returned on this request.@GetMapping(path="/users/{userId}/categories/{guid}/categories")
public SubjectAreaOMASAPIResponse<Category> getCategoryChildren(@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="startingFrom",required=false,defaultValue="0")
Integer startingFrom,
@RequestParam(value="pageSize",required=false)
Integer pageSize)
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedguid - guid of the parent categorysearchCriteria - 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 respectedstartingFrom - the starting element number for this set of results. This is used when retrieving elementspageSize - the maximum number of elements that can be returned on this request.Copyright © 2018–2021 LF AI & Data Foundation. All rights reserved.