Skip to content

Commit 4bfac60

Browse files
Merge pull request #9233 from mandy-chessell/oak2026
Add comprehensive support for classifications in the API
2 parents 6656953 + 3321047 commit 4bfac60

65 files changed

Lines changed: 19359 additions & 3 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/connectorcontext/AssetClient.java

Lines changed: 777 additions & 0 deletions
Large diffs are not rendered by default.

open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/connectorcontext/ClassificationExplorerClient.java

Lines changed: 300 additions & 0 deletions
Large diffs are not rendered by default.

open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/connectorcontext/CollectionClient.java

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,4 +1442,112 @@ public void detachDigitalProductDependency(String consumerDigitalProductG
14421442
{
14431443
collectionHandler.detachDigitalProductDependency(connectorUserId, consumerDigitalProductGUID, consumedDigitalProductGUID, deleteOptions);
14441444
}
1445+
1446+
1447+
/*
1448+
* =====================================================================================================================
1449+
* Collection kind classification
1450+
*/
1451+
1452+
1453+
/**
1454+
* Classify a collection to describe the kind of collection that it is.
1455+
*
1456+
* @param collectionGUID unique identifier of the collection
1457+
* @param properties properties for the classification
1458+
* @param metadataSourceOptions options to control access to open metadata
1459+
* @throws InvalidParameterException one of the parameters is null or invalid.
1460+
* @throws PropertyServerException a problem retrieving information from the property server(s).
1461+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
1462+
*/
1463+
public void setCollectionKind(String collectionGUID,
1464+
CollectionKindProperties properties,
1465+
MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException,
1466+
PropertyServerException,
1467+
UserNotAuthorizedException
1468+
{
1469+
collectionHandler.setCollectionKind(connectorUserId, collectionGUID, properties, metadataSourceOptions);
1470+
1471+
if (parentContext.getActivityReportWriter() != null)
1472+
{
1473+
parentContext.getActivityReportWriter().reportElementUpdate(collectionGUID);
1474+
}
1475+
}
1476+
1477+
1478+
/**
1479+
* Remove the collection kind classification from a collection.
1480+
*
1481+
* @param collectionGUID unique identifier of the collection
1482+
* @param metadataSourceOptions options to control access to open metadata
1483+
* @throws InvalidParameterException one of the parameters is null or invalid.
1484+
* @throws PropertyServerException a problem retrieving information from the property server(s).
1485+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
1486+
*/
1487+
public void clearCollectionKind(String collectionGUID,
1488+
MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException,
1489+
PropertyServerException,
1490+
UserNotAuthorizedException
1491+
{
1492+
collectionHandler.clearCollectionKind(connectorUserId, collectionGUID, metadataSourceOptions);
1493+
1494+
if (parentContext.getActivityReportWriter() != null)
1495+
{
1496+
parentContext.getActivityReportWriter().reportElementUpdate(collectionGUID);
1497+
}
1498+
}
1499+
1500+
1501+
/*
1502+
* =====================================================================================================================
1503+
* Data sharing agreement classification
1504+
*/
1505+
1506+
1507+
/**
1508+
* Classify an agreement to say that it governs the sharing of data.
1509+
*
1510+
* @param agreementGUID unique identifier of the agreement
1511+
* @param properties properties for the classification
1512+
* @param metadataSourceOptions options to control access to open metadata
1513+
* @throws InvalidParameterException one of the parameters is null or invalid.
1514+
* @throws PropertyServerException a problem retrieving information from the property server(s).
1515+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
1516+
*/
1517+
public void setAgreementAsDataSharingAgreement(String agreementGUID,
1518+
DataSharingAgreementProperties properties,
1519+
MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException,
1520+
PropertyServerException,
1521+
UserNotAuthorizedException
1522+
{
1523+
collectionHandler.setAgreementAsDataSharingAgreement(connectorUserId, agreementGUID, properties, metadataSourceOptions);
1524+
1525+
if (parentContext.getActivityReportWriter() != null)
1526+
{
1527+
parentContext.getActivityReportWriter().reportElementUpdate(agreementGUID);
1528+
}
1529+
}
1530+
1531+
1532+
/**
1533+
* Remove the data sharing agreement designation from an agreement.
1534+
*
1535+
* @param agreementGUID unique identifier of the agreement
1536+
* @param metadataSourceOptions options to control access to open metadata
1537+
* @throws InvalidParameterException one of the parameters is null or invalid.
1538+
* @throws PropertyServerException a problem retrieving information from the property server(s).
1539+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
1540+
*/
1541+
public void clearAgreementAsDataSharingAgreement(String agreementGUID,
1542+
MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException,
1543+
PropertyServerException,
1544+
UserNotAuthorizedException
1545+
{
1546+
collectionHandler.clearAgreementAsDataSharingAgreement(connectorUserId, agreementGUID, metadataSourceOptions);
1547+
1548+
if (parentContext.getActivityReportWriter() != null)
1549+
{
1550+
parentContext.getActivityReportWriter().reportElementUpdate(agreementGUID);
1551+
}
1552+
}
14451553
}

open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/connectorcontext/GlossaryTermClient.java

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,4 +739,58 @@ public void detachUsedInContext(String glossaryTermGUID,
739739
{
740740
glossaryTermHandler.detachUsedInContext(connectorUserId, glossaryTermGUID, contextElementGUID, deleteOptions);
741741
}
742+
743+
744+
/*
745+
* =====================================================================================================================
746+
* Glossary term supplement classification
747+
*/
748+
749+
750+
/**
751+
* Classify a glossary term to say that it supplements the description of another element.
752+
*
753+
* @param glossaryTermGUID unique identifier of the glossary term
754+
* @param properties properties for the classification
755+
* @param metadataSourceOptions options to control access to open metadata
756+
* @throws InvalidParameterException one of the parameters is null or invalid.
757+
* @throws PropertyServerException a problem retrieving information from the property server(s).
758+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
759+
*/
760+
public void setTermAsElementSupplement(String glossaryTermGUID,
761+
ElementSupplementProperties properties,
762+
MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException,
763+
PropertyServerException,
764+
UserNotAuthorizedException
765+
{
766+
glossaryTermHandler.setTermAsElementSupplement(connectorUserId, glossaryTermGUID, properties, metadataSourceOptions);
767+
768+
if (parentContext.getActivityReportWriter() != null)
769+
{
770+
parentContext.getActivityReportWriter().reportElementUpdate(glossaryTermGUID);
771+
}
772+
}
773+
774+
775+
/**
776+
* Remove the element supplement designation from a glossary term.
777+
*
778+
* @param glossaryTermGUID unique identifier of the glossary term
779+
* @param metadataSourceOptions options to control access to open metadata
780+
* @throws InvalidParameterException one of the parameters is null or invalid.
781+
* @throws PropertyServerException a problem retrieving information from the property server(s).
782+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
783+
*/
784+
public void clearTermAsElementSupplement(String glossaryTermGUID,
785+
MetadataSourceOptions metadataSourceOptions) throws InvalidParameterException,
786+
PropertyServerException,
787+
UserNotAuthorizedException
788+
{
789+
glossaryTermHandler.clearTermAsElementSupplement(connectorUserId, glossaryTermGUID, metadataSourceOptions);
790+
791+
if (parentContext.getActivityReportWriter() != null)
792+
{
793+
parentContext.getActivityReportWriter().reportElementUpdate(glossaryTermGUID);
794+
}
795+
}
742796
}

0 commit comments

Comments
 (0)