Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancing controlled glossary development #7621

Merged
merged 3 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content-packs/OpenMetadataTypes.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,7 @@ void clearTermAsAbstractConcept(String userId,
* @param assetManagerName unique name of software capability representing the caller
* @param glossaryTermGUID unique identifier of the metadata element to update
* @param glossaryTermExternalIdentifier unique identifier of the glossary term in the external asset manager
* @param properties descriptive properties for the data field
* @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 Down Expand Up @@ -1767,14 +1768,15 @@ List<GlossaryTermElement> getTermsForGlossary(String userId,
UserNotAuthorizedException,
PropertyServerException;


/**
* Retrieve the list of glossary terms associated with a glossary category.
*
* @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 glossaryCategoryGUID unique identifier of the glossary category of interest
* @param limitResultsByStatus By default, term relationships in all statuses are returned. However, it is possible
* to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
* @param startFrom paging start point
* @param pageSize maximum results that can be returned
* @param effectiveTime the time that the retrieved elements must be effective for
Expand All @@ -1787,17 +1789,51 @@ List<GlossaryTermElement> getTermsForGlossary(String userId,
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
List<GlossaryTermElement> getTermsForGlossaryCategory(String userId,
String assetManagerGUID,
String assetManagerName,
String glossaryCategoryGUID,
int startFrom,
int pageSize,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
List<GlossaryTermElement> getTermsForGlossaryCategory(String userId,
String assetManagerGUID,
String assetManagerName,
String glossaryCategoryGUID,
List<GlossaryTermRelationshipStatus> limitResultsByStatus,
int startFrom,
int pageSize,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Retrieve the list of glossary terms associated with the requested glossary term.
*
* @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 of interest
* @param startFrom paging start point
* @param pageSize maximum results that can be returned
* @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?
*
* @return list of associated metadata elements
*
* @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)
*/
List<GlossaryTermElement> getRelatedTerms(String userId,
String assetManagerGUID,
String assetManagerName,
String glossaryTermGUID,
List<GlossaryTermRelationshipStatus> limitResultsByStatus,
int startFrom,
int pageSize,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermContextDefinition;
import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties;
import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermRelationship;
import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermRelationshipStatus;
import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus;
import org.odpi.openmetadata.accessservices.assetmanager.properties.TaxonomyProperties;
import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties;
Expand Down Expand Up @@ -1447,6 +1448,8 @@ List<GlossaryTermElement> getTermsForGlossary(String userId,
*
* @param userId calling user
* @param glossaryCategoryGUID unique identifier of the glossary category of interest
* @param limitResultsByStatus By default, term relationships in all statuses are returned. However, it is possible
* to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
* @param startFrom paging start point
* @param pageSize maximum results that can be returned
* @param effectiveTime the time that the retrieved elements must be effective for
Expand All @@ -1459,16 +1462,47 @@ List<GlossaryTermElement> getTermsForGlossary(String userId,
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
List<GlossaryTermElement> getTermsForGlossaryCategory(String userId,
String glossaryCategoryGUID,
int startFrom,
int pageSize,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
List<GlossaryTermElement> getTermsForGlossaryCategory(String userId,
String glossaryCategoryGUID,
List<GlossaryTermRelationshipStatus> limitResultsByStatus,
int startFrom,
int pageSize,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Retrieve the list of glossary terms associated with the requested glossary term.
*
* @param userId calling user
* @param glossaryTermGUID unique identifier of the glossary term of interest
* @param limitResultsByStatus By default, term relationships in all statuses are returned. However, it is possible
* to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
* @param startFrom paging start point
* @param pageSize maximum results that can be returned
* @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?
*
* @return list of associated metadata elements
*
* @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)
*/
List<GlossaryTermElement> getRelatedTerms(String userId,
String glossaryTermGUID,
List<GlossaryTermRelationshipStatus> limitResultsByStatus,
int startFrom,
int pageSize,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;

/**
* Retrieve the list of glossary term metadata elements with a matching qualified or display name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class GlossaryTermElement implements MetadataElement, Serializable
private ElementHeader elementHeader = null;
private List<MetadataCorrelationHeader> correlationHeaders = null;
private GlossaryTermProperties glossaryTermProperties = null;
private RelatedElement relatedElement = null;


/**
Expand Down Expand Up @@ -140,6 +141,28 @@ public void setGlossaryTermProperties(GlossaryTermProperties glossaryTermPropert
}


/**
* Return details of the relationship used to retrieve the element.
*
* @return relationship properties and starting element
*/
public RelatedElement getRelatedElement()
{
return relatedElement;
}


/**
* Set up details of the relationship used to retrieve the element.
*
* @param relatedElement relationship properties and starting element
*/
public void setRelatedElement(RelatedElement relatedElement)
{
this.relatedElement = relatedElement;
}


/**
* JSON-style toString
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.odpi.openmetadata.accessservices.assetmanager.rest.ActivityDescriptionProperties;

import java.io.Serial;
import java.io.Serializable;
Expand All @@ -30,13 +31,16 @@
property = "class")
@JsonSubTypes(
{
@JsonSubTypes.Type(value = ActivityDescriptionProperties.class, name = "ActivityDescriptionProperties"),
@JsonSubTypes.Type(value = AssetOriginProperties.class, name = "AssetOriginProperties"),
@JsonSubTypes.Type(value = CanonicalVocabularyProperties.class, name = "CanonicalVocabularyProperties"),
@JsonSubTypes.Type(value = DataFieldValuesProperties.class, name = "DataFieldValuesProperties"),
@JsonSubTypes.Type(value = EditingGlossaryProperties.class, name = "EditingGlossaryProperties"),
@JsonSubTypes.Type(value = GlossaryTermContextDefinition.class, name = "GlossaryTermContextDefinition"),
@JsonSubTypes.Type(value = GovernanceClassificationBase.class, name = "GovernanceClassificationBase"),
@JsonSubTypes.Type(value = OwnerProperties.class, name = "OwnerProperties"),
@JsonSubTypes.Type(value = SecurityTagsProperties.class, name = "SecurityTagsProperties"),
@JsonSubTypes.Type(value = SubjectAreaMemberProperties.class, name = "SubjectAreaMemberProperties"),
@JsonSubTypes.Type(value = TaxonomyProperties.class, name = "TaxonomyProperties"),
})
public class ClassificationProperties implements Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public enum CommentType implements Serializable

private static final long serialVersionUID = 1L;

public static final String ENUM_TYPE_GUID = "06d5032e-192a-4f77-ade1-a4b97926e867";
public static final String ENUM_TYPE_NAME = "CommentType";
private static final String ENUM_TYPE_GUID = "06d5032e-192a-4f77-ade1-a4b97926e867";
private static final String ENUM_TYPE_NAME = "CommentType";

private final int openTypeOrdinal;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public enum DataItemSortOrder implements Serializable
UNSORTED (3, 99, "Unsorted", "The instances of the schema attribute may appear in any order.");


public static final String ENUM_TYPE_GUID = "aaa4df8f-1aca-4de8-9abd-1ef2aadba300";
public static final String ENUM_TYPE_NAME = "DataItemSortOrder";
private static final String ENUM_TYPE_GUID = "aaa4df8f-1aca-4de8-9abd-1ef2aadba300";
private static final String ENUM_TYPE_NAME = "DataItemSortOrder";


private final int ordinal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public enum GlossaryTermActivityType implements Serializable
*/
OTHER (99, 99, "Other", "Another type of activity.");

public static final String ENUM_TYPE_GUID = "af7e403d-9865-4ebb-8c1a-1fd57b4f4bca";
public static final String ENUM_TYPE_NAME = "ActivityType";
private static final String ENUM_TYPE_GUID = "af7e403d-9865-4ebb-8c1a-1fd57b4f4bca";
private static final String ENUM_TYPE_NAME = "ActivityType";

private final int openTypeOrdinal;

Expand Down
Loading