Skip to content

Commit

Permalink
Merge pull request #7651 from mandy-chessell/code2023
Browse files Browse the repository at this point in the history
Extend glossary support
  • Loading branch information
mandy-chessell authored May 3, 2023
2 parents d46a2ab d50d640 commit 071b803
Show file tree
Hide file tree
Showing 42 changed files with 3,359 additions and 256 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 109,7 @@ egeria-lineage-repositories/**
/SimpleEventCatalog.json
/SimpleGovernanceCatalog.json
/*Archive.json
/BigGlossary*.json

# Ignore any json files generated during junit
open-metadata-resources/open-metadata-archives/design-model-archives/*.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 100,7 @@ dependencies {
implementation project(':open-metadata-resources:open-metadata-archives:open-metadata-types-utility')
implementation project(':open-metadata-resources:open-metadata-archives:open-connector-archives')
implementation project(':open-metadata-resources:open-metadata-archives:design-model-archives:glossary-canonical-model')
implementation project(':open-metadata-resources:open-metadata-samples:sample-metadata:big-glossaries')
implementation project(':open-metadata-resources:open-metadata-samples:governance-services-sample')

}
Expand Down Expand Up @@ -154,6 155,7 @@ distributions {
into('utilities') {
from { project(':open-metadata-resources:open-metadata-archives:design-model-archives:glossary-canonical-model').shadowJar }
from { project(':open-metadata-resources:open-metadata-archives:open-metadata-types-utility').shadowJar }
from { project(':open-metadata-resources:open-metadata-samples:sample-metadata:big-glossaries').shadowJar }
fileMode = 0755
}
into('samples') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 126,7 @@ void updateGlossary(String userId,

/**
* Classify the glossary to indicate that it is an editing glossary - this means it is
* a temporary collection of glossary updates that will be merged into another glossary.
* a temporary collection of glossary updates that will be merged into its source glossary.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
Expand Down Expand Up @@ -183,6 183,65 @@ void clearGlossaryAsEditingGlossary(String userId,
PropertyServerException;


/**
* Classify the glossary to indicate that it is an editing glossary - this means it is
* a temporary collection of glossary updates that will be merged into another glossary.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param glossaryGUID unique identifier of the metadata element to remove
* @param glossaryExternalIdentifier unique identifier of the glossary in the external asset manager
* @param properties description of the purpose of the editing glossary
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
* @param forDuplicateProcessing do not merge elements marked as duplicates?
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
void setGlossaryAsStagingGlossary(String userId,
String assetManagerGUID,
String assetManagerName,
String glossaryGUID,
String glossaryExternalIdentifier,
StagingGlossaryProperties properties,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Remove the staging glossary classification from the glossary.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param glossaryGUID unique identifier of the metadata element to remove
* @param glossaryExternalIdentifier unique identifier of the glossary in the external asset manager
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
* @param forDuplicateProcessing do not merge elements marked as duplicates?
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
void clearGlossaryAsStagingGlossary(String userId,
String assetManagerGUID,
String assetManagerName,
String glossaryGUID,
String glossaryExternalIdentifier,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* 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
Expand Down Expand Up @@ -475,6 534,7 @@ GlossaryElement getGlossaryByGUID(String userId,
* @param glossaryGUID unique identifier of the glossary where the category is located
* @param externalIdentifierProperties optional properties used to define an external identifier
* @param glossaryCategoryProperties properties about the glossary category to store
* @param isRootCategory is this category a root category?
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
* @param forDuplicateProcessing do not merge elements marked as duplicates?
Expand All @@ -492,6 552,7 @@ String createGlossaryCategory(String userId,
String glossaryGUID,
ExternalIdentifierProperties externalIdentifierProperties,
GlossaryCategoryProperties glossaryCategoryProperties,
boolean isRootCategory,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
Expand Down Expand Up @@ -920,6 981,7 @@ String createControlledGlossaryTerm(String userId,
* @param glossaryGUID unique identifier of the glossary where the term is located
* @param templateGUID unique identifier of the metadata element to copy
* @param externalIdentifierProperties optional properties used to define an external identifier
* @param initialStatus what status should the copy be set to
* @param deepCopy should the template creation extend to the anchored elements or just the direct entity?
* @param templateProperties properties that override the template
*
Expand All @@ -937,6 999,7 @@ String createGlossaryTermFromTemplate(String userId,
String templateGUID,
ExternalIdentifierProperties externalIdentifierProperties,
boolean deepCopy,
GlossaryTermStatus initialStatus,
TemplateProperties templateProperties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
Expand Down Expand Up @@ -1004,6 1067,70 @@ void updateGlossaryTermStatus(String userId,
UserNotAuthorizedException,
PropertyServerException;


/**
* Update the glossary term using the properties and classifications from the parentGUID stored in the request body.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param glossaryTermGUID unique identifier of the glossary term to update
* @param glossaryTermExternalIdentifier unique identifier of the glossary term in the external asset manager
* @param templateGUID identifier for the template glossary term
* @param isMergeClassifications should the classification be merged or replace the target entity?
* @param isMergeProperties should the properties be merged with the existing ones or replace them
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
* @param forDuplicateProcessing do not merge elements marked as duplicates?
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
void updateGlossaryTermFromTemplate(String userId,
String assetManagerGUID,
String assetManagerName,
String glossaryTermGUID,
String glossaryTermExternalIdentifier,
String templateGUID,
boolean isMergeClassifications,
boolean isMergeProperties,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;

/**
* Move a glossary term from one glossary to another.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param glossaryTermGUID unique identifier of the glossary term to update
* @param glossaryTermExternalIdentifier unique identifier of the glossary term in the external asset manager
* @param newGlossaryGUID identifier for the new glossary
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
* @param forDuplicateProcessing do not merge elements marked as duplicates?
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
void moveGlossaryTerm(String userId,
String assetManagerGUID,
String assetManagerName,
String glossaryTermGUID,
String glossaryTermExternalIdentifier,
String newGlossaryGUID,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Link a term to a category.
*
Expand Down Expand Up @@ -1061,6 1188,19 @@ void clearTermCategory(String userId,
UserNotAuthorizedException,
PropertyServerException;

/**
* Return the list of term-to-term relationship names.
*
* @param userId calling user
* @return list of type names that are subtypes of asset
* @throws InvalidParameterException userId is null
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
List<String> getTermRelationshipTypeNames(String userId) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Link two terms together using a specialist relationship.
Expand Down Expand Up @@ -1093,6 1233,7 @@ void setupTermRelationship(String userId,
UserNotAuthorizedException,
PropertyServerException;


/**
* Update the relationship properties for the two terms.
*
Expand Down Expand Up @@ -1155,7 1296,6 @@ void clearTermRelationship(String userId,
PropertyServerException;



/**
* Classify the glossary term to indicate that it describes an abstract concept.
*
Expand Down
Loading

0 comments on commit 071b803

Please sign in to comment.