Class GlossaryClient
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.GlossaryClient
Provides services for connectors to work with Schema Type elements.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
asOfTimeDefault, auditLog, connectorGUID, connectorUserId, externalSourceGUID, externalSourceIsHome, externalSourceName, forDuplicateProcessing, forLineage, governanceZonesFilterDefault, limitResultsByStatusDefault, localServerName, localServiceName, maxPageSize, parentContext, propertyHelper, sequencingOrderDefault, sequencingPropertyDefault, useCurrentEffectiveTime
-
Constructor Summary
ConstructorsConstructorDescriptionGlossaryClient
(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenMetadataClient openMetadataClient, AuditLog auditLog, int maxPageSize) Constructor for connector context client. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearGlossaryAsCanonical
(String glossaryGUID, MetadataSourceOptions metadataSourceOptions) Remove the canonical designation from the glossary.void
clearGlossaryAsEditingGlossary
(String glossaryGUID, MetadataSourceOptions metadataSourceOptions) Remove the editing glossary classification from the glossary.void
clearGlossaryAsStagingGlossary
(String glossaryGUID, MetadataSourceOptions metadataSourceOptions) Remove the staging glossary classification from the glossary.void
clearGlossaryAsTaxonomy
(String glossaryGUID, MetadataSourceOptions metadataSourceOptions) Remove the taxonomy glossary classification from the glossary.createGlossary
(NewElementOptions newElementOptions, Map<String, ClassificationProperties> initialClassifications, GlossaryProperties properties, RelationshipProperties parentRelationshipProperties) Create a new glossary.createGlossaryFromTemplate
(TemplateOptions templateOptions, String templateGUID, ElementProperties replacementProperties, Map<String, String> placeholderProperties, RelationshipProperties parentRelationshipProperties) Create a new metadata element to represent a glossary using an existing element as a template.void
deleteGlossary
(String glossaryGUID, DeleteOptions deleteOptions) Delete a glossary.findGlossaries
(String searchString, SearchOptions searchOptions) Retrieve the list of glossaries metadata elements that contain the search string and show which solution components (if any) are attached to it.getGlossariesByName
(String name, QueryOptions queryOptions) Returns the list of glossaries with a particular name.getGlossaryByGUID
(String glossaryGUID, GetOptions getOptions) Return the properties of a specific glossary.getGlossaryForTerm
(String glossaryTermGUID, GetOptions getOptions) Retrieve the glossary metadata element for the requested glossary term.void
setGlossaryAsCanonical
(String glossaryGUID, CanonicalVocabularyProperties properties, MetadataSourceOptions metadataSourceOptions) Classify a glossary to declare that it has no two GlossaryTerm definitions with the same name.void
setGlossaryAsEditingGlossary
(String glossaryGUID, EditingGlossaryProperties properties, MetadataSourceOptions metadataSourceOptions) Classify the glossary to indicate that it is an editing glossary - this means it is a collection of glossary updates that will be merged into its source glossary.void
setGlossaryAsStagingGlossary
(String glossaryGUID, StagingGlossaryProperties properties, MetadataSourceOptions metadataSourceOptions) Classify the glossary to indicate that it is a staging glossary.void
setGlossaryAsTaxonomy
(String glossaryGUID, TaxonomyProperties properties, MetadataSourceOptions metadataSourceOptions) Classify the glossary to indicate that it can be used as a taxonomy.void
updateGlossary
(String glossaryGUID, UpdateOptions updateOptions, GlossaryProperties properties) Update the properties of a glossary.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
getAdditionalProperties, getDeleteOptions, getDisplayName, getEffectiveTime, getGetOptions, getMaxPagingSize, getMetadataSourceOptions, getNewElementProperties, getQualifiedName, getQueryOptions, getQueryOptions, getQueryOptions, getQueryOptions, getSearchOptions, getSearchOptions, getUpdateOptions, isForDuplicateProcessing, isForLineage, isUseCurrentEffectiveTime, publishElement, setAsOfTimeDefault, setEffectiveTimeDefault, setExternalSourceIsHome, setForDuplicateProcessing, setForLineage, setGovernanceZonesFilterDefault, setLimitResultsByStatusDefault, setSequencingOrderDefault, setUseCurrentEffectiveTime, withdrawElement
-
Constructor Details
-
GlossaryClient
public GlossaryClient(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenMetadataClient openMetadataClient, AuditLog auditLog, int maxPageSize) Constructor for connector context client.- Parameters:
parentContext
- connector's contextlocalServerName
- local server where this client is running - used for error handlinglocalServiceName
- local service that his connector is hosted by - used for error handlingconnectorUserId
- the userId to use with all requests for open metadataconnectorGUID
- the unique identifier that represents this connector in open metadataexternalSourceGUID
- unique identifier of the software server capability for the source of metadataexternalSourceName
- unique name of the software server capability for the source of metadataopenMetadataClient
- client to access the open metadata storeauditLog
- logging destinationmaxPageSize
- max number of elements that can be returned on a query
-
-
Method Details
-
createGlossary
public String createGlossary(NewElementOptions newElementOptions, Map<String, ClassificationProperties> initialClassifications, GlossaryProperties properties, RelationshipProperties parentRelationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionCreate a new glossary.- Parameters:
newElementOptions
- details of the element to createinitialClassifications
- map of classification names to classification properties to include in the entity creation requestproperties
- properties for the new element.parentRelationshipProperties
- properties to include in parent relationship- Returns:
- unique identifier of the newly created element
- Throws:
InvalidParameterException
- one of the parameters is invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
createGlossaryFromTemplate
public String createGlossaryFromTemplate(TemplateOptions templateOptions, String templateGUID, ElementProperties replacementProperties, Map<String, String> placeholderProperties, RelationshipProperties parentRelationshipProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a new metadata element to represent a glossary using an existing element as a template. The template defines additional classifications and relationships that should be added to the new glossary.- Parameters:
templateOptions
- details of the element to createtemplateGUID
- the unique identifier of the existing glossary to copy (this will copy all the attachments such as nested content, schema connection etc)replacementProperties
- properties of the new metadata element. These override the template valuesplaceholderProperties
- property name-to-property value map to replace any placeholder values in the template element - and their anchored elements, which are also copied as part of this operation.parentRelationshipProperties
- properties to include in parent relationship- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateGlossary
public void updateGlossary(String glossaryGUID, UpdateOptions updateOptions, GlossaryProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties of a glossary.- Parameters:
glossaryGUID
- unique identifier of the glossary (returned from create)updateOptions
- provides a structure for the additional options when updating an element.properties
- properties for the element.- Throws:
InvalidParameterException
- one of the parameters is invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
setGlossaryAsEditingGlossary
public void setGlossaryAsEditingGlossary(String glossaryGUID, EditingGlossaryProperties properties, MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Classify the glossary to indicate that it is an editing glossary - this means it is a collection of glossary updates that will be merged into its source glossary.- Parameters:
glossaryGUID
- unique identifier of the glossary.properties
- properties for the classificationmetadataSourceOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
clearGlossaryAsEditingGlossary
public void clearGlossaryAsEditingGlossary(String glossaryGUID, MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove the editing glossary classification from the glossary.- Parameters:
glossaryGUID
- unique identifier of the glossary.metadataSourceOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
setGlossaryAsStagingGlossary
public void setGlossaryAsStagingGlossary(String glossaryGUID, StagingGlossaryProperties properties, MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Classify the glossary to indicate that it is a staging glossary.- Parameters:
glossaryGUID
- unique identifier of the glossary.properties
- properties for the classificationmetadataSourceOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
clearGlossaryAsStagingGlossary
public void clearGlossaryAsStagingGlossary(String glossaryGUID, MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove the staging glossary classification from the glossary.- Parameters:
glossaryGUID
- unique identifier of the glossary.metadataSourceOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
setGlossaryAsTaxonomy
public void setGlossaryAsTaxonomy(String glossaryGUID, TaxonomyProperties properties, MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Classify the glossary to indicate that it can be used as a taxonomy. This means each term is attached to one, and only one category and the categories are organized as a hierarchy with a single root category. Taxonomies are used as a way of organizing assets and other related metadata. The terms in the taxonomy are linked to the assets etc. and as such they are logically categorized by the linked category.- Parameters:
glossaryGUID
- unique identifier of the glossary.properties
- properties for the classificationmetadataSourceOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
clearGlossaryAsTaxonomy
public void clearGlossaryAsTaxonomy(String glossaryGUID, MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove the taxonomy glossary classification from the glossary.- Parameters:
glossaryGUID
- unique identifier of the glossary.metadataSourceOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
setGlossaryAsCanonical
public void setGlossaryAsCanonical(String glossaryGUID, CanonicalVocabularyProperties properties, MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Classify a glossary to declare that it has no two GlossaryTerm definitions with the same name. This means there is only one definition for each term. Typically, the terms are also of a similar level of granularity and are limited to a specific scope of use. Canonical vocabularies are used to semantically classify assets in an unambiguous way.- Parameters:
glossaryGUID
- unique identifier of the glossary.properties
- properties for the classificationmetadataSourceOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
clearGlossaryAsCanonical
public void clearGlossaryAsCanonical(String glossaryGUID, MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove the canonical designation from the glossary.- Parameters:
glossaryGUID
- unique identifier of the glossary.metadataSourceOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
deleteGlossary
public void deleteGlossary(String glossaryGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Delete a glossary.- Parameters:
glossaryGUID
- unique identifier of the element- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getGlossariesByName
public List<OpenMetadataRootElement> getGlossariesByName(String name, QueryOptions queryOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Returns the list of glossaries with a particular name.- Parameters:
name
- name of the element to return - match is full text match in qualifiedName, resourceName or displayNamequeryOptions
- multiple options to control the query- Returns:
- a list of elements
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getGlossaryByGUID
public OpenMetadataRootElement getGlossaryByGUID(String glossaryGUID, GetOptions getOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the properties of a specific glossary.- Parameters:
glossaryGUID
- unique identifier of the required elementgetOptions
- multiple options to control the query- Returns:
- retrieved properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
findGlossaries
public List<OpenMetadataRootElement> findGlossaries(String searchString, SearchOptions searchOptions) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of glossaries metadata elements that contain the search string and show which solution components (if any) are attached to it. The returned glossaries include a list of the components that are associated with it. The search string is treated as a regular expression.- Parameters:
searchString
- string to find in the propertiessearchOptions
- multiple options to control the query- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getGlossaryForTerm
public OpenMetadataRootElement getGlossaryForTerm(String glossaryTermGUID, GetOptions getOptions) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the glossary metadata element for the requested glossary term.- Parameters:
glossaryTermGUID
- unique identifier of the requested termgetOptions
- multiple options to control the query- Returns:
- matching metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-