Class SubjectAreaGlossaryRESTServices
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateGlossary
(String serverName, String userId, Glossary suppliedGlossary) Create a Glossary.deleteGlossary
(String serverName, String userId, String guid) Delete a Glossary instancefindGlossary
(String serverName, String userId, String searchCriteria, boolean exactValue, boolean ignoreCase, Date asOfTime, Integer startingFrom, Integer pageSize, String sequencingOrder, String sequencingProperty) Find GlossarygetGlossaryByGuid
(String serverName, String userId, String guid) Get a glossary by guid.getGlossaryCategories
(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Date asOfTime, Boolean onlyTop, Integer startingFrom, Integer pageSize, String sequencingOrder, String sequencingProperty) Get the Categories owned by this glossary.getGlossaryRelationships
(String serverName, String userId, String guid, Date asOfTime, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty) Get Glossary relationshipsgetGlossaryTerms
(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Date asOfTime, Integer startingFrom, Integer pageSize, String sequencingOrder, String sequencingProperty) Get terms that are owned by this glossaryrestoreGlossary
(String serverName, String userId, String guid) Restore a GlossaryupdateGlossary
(String serverName, String userId, String guid, Glossary suppliedGlossary, boolean isReplace) Update a GlossaryMethods inherited from class org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaRESTServicesInstance
createRelationship, deleteRelationship, getFindRequest, getRelationship, getResponseForException, restoreRelationship, updateRelationship
-
Constructor Details
-
SubjectAreaGlossaryRESTServices
public SubjectAreaGlossaryRESTServices()Default constructor
-
-
Method Details
-
createGlossary
public SubjectAreaOMASAPIResponse<Glossary> createGlossary(String serverName, String userId, 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.Glossaries with the same name can be confusing. Best practise is to createGlossaries that have unique names. This Create call does not police that glossary names are unique. So it is possible to create Glossaries with the same name as each other.
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 glossary
- 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 tenantuserId
- unique identifier for requesting user, under which the request is performedsuppliedGlossary
- 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.
-
getGlossaryByGuid
public SubjectAreaOMASAPIResponse<Glossary> getGlossaryByGuid(String serverName, String userId, String guid) Get a glossary by guid.- Parameters:
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 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
public SubjectAreaOMASAPIResponse<Glossary> findGlossary(String serverName, String userId, String searchCriteria, boolean exactValue, boolean ignoreCase, Date asOfTime, Integer startingFrom, Integer pageSize, String sequencingOrder, String sequencingProperty) Find Glossary- Parameters:
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 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 respectedasOfTime
- 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 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 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
public SubjectAreaOMASAPIResponse<Relationship> getGlossaryRelationships(String serverName, String userId, String guid, Date asOfTime, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty) Get Glossary relationships- Parameters:
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 term 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.- Returns:
- the relationships associated with the requested Glossary 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.
-
updateGlossary
public SubjectAreaOMASAPIResponse<Glossary> updateGlossary(String serverName, String userId, String guid, Glossary suppliedGlossary, boolean isReplace) Update a GlossaryIf 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 tenantuserId
- unique identifier for requesting user, under which the request is performedguid
- guid of the glossary to updatesuppliedGlossary
- glossary to be updatedisReplace
- 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
public SubjectAreaOMASAPIResponse<Glossary> deleteGlossary(String serverName, String userId, String guid) Delete a Glossary instanceThe 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.
- Parameters:
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 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
public SubjectAreaOMASAPIResponse<Glossary> restoreGlossary(String serverName, String userId, String guid) Restore a GlossaryRestore 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 tenantuserId
- unique identifier for requesting user, under which the request is performedguid
- 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
public SubjectAreaOMASAPIResponse<Term> getGlossaryTerms(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Date asOfTime, Integer startingFrom, Integer pageSize, String sequencingOrder, String sequencingProperty) Get terms that are owned by this glossary- Parameters:
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 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 respectedasOfTime
- 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 elementssequencingOrder
- the sequencing order for the results.sequencingProperty
- the name of the property that should be used to sequence the results.pageSize
- 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
public SubjectAreaOMASAPIResponse<Category> getGlossaryCategories(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Date asOfTime, Boolean onlyTop, Integer startingFrom, Integer pageSize, String sequencingOrder, String sequencingProperty) Get the Categories owned by this glossary.- Parameters:
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 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 respectedasOfTime
- the categories returned as they were at this time. null indicates at the current time.onlyTop
- when only the top categories (those categories without parents) are returned.startingFrom
- 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.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 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.
-