Skip to content

Commit e993386

Browse files
Merge pull request #8720 from mandy-chessell/oak2025
add getCollectionGraph
2 parents 5e0577d + 099e014 commit e993386

File tree

57 files changed

+2579
-2521
lines changed

Some content is hidden

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

57 files changed

+2579
-2521
lines changed

CloudInformationModelGUIDMap.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

cloud-information-model.jsonld

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

open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CollectionRESTServices.java

Lines changed: 0 additions & 944 deletions
This file was deleted.

open-metadata-implementation/access-services/design-model/design-model-client/src/main/java/org/odpi/openmetadata/accessservices/designmodel/client/DataDesignManager.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ public void linkDataClassDefinition(String userId,
18691869
openMetadataStoreClient.createRelatedElementsInStore(userId,
18701870
externalSourceGUID,
18711871
externalSourceName,
1872-
OpenMetadataType.DATA_CLASS_DEFINITION.typeName,
1872+
OpenMetadataType.DATA_CLASS_DEFINITION_RELATIONSHIP.typeName,
18731873
dataDefinitionGUID,
18741874
dataClassGUID,
18751875
forLineage,
@@ -1920,7 +1920,7 @@ public void detachDataClassDefinition(String userId,
19201920
openMetadataStoreClient.detachRelatedElementsInStore(userId,
19211921
externalSourceGUID,
19221922
externalSourceName,
1923-
OpenMetadataType.DATA_CLASS_DEFINITION.typeName,
1923+
OpenMetadataType.DATA_CLASS_DEFINITION_RELATIONSHIP.typeName,
19241924
dataDefinitionGUID,
19251925
dataClassGUID,
19261926
forLineage,
@@ -2486,7 +2486,7 @@ private DataStructureElement convertDataStructure(String userId,
24862486
int startFrom = 0;
24872487
RelatedMetadataElementList relatedMetadataElementList = openMetadataStoreClient.getRelatedMetadataElements(userId,
24882488
openMetadataElement.getElementGUID(),
2489-
1,
2489+
0,
24902490
null,
24912491
null,
24922492
asOfTime,
@@ -2523,7 +2523,7 @@ private DataStructureElement convertDataStructure(String userId,
25232523
startFrom = startFrom + invalidParameterHandler.getMaxPagingSize();
25242524
relatedMetadataElementList = openMetadataStoreClient.getRelatedMetadataElements(userId,
25252525
openMetadataElement.getElementGUID(),
2526-
1,
2526+
0,
25272527
null,
25282528
null,
25292529
asOfTime,
@@ -2644,7 +2644,7 @@ private DataFieldElement convertDataField(String userId,
26442644
int startFrom = 0;
26452645
RelatedMetadataElementList relatedMetadataElementList = openMetadataStoreClient.getRelatedMetadataElements(userId,
26462646
openMetadataElement.getElementGUID(),
2647-
1,
2647+
0,
26482648
null,
26492649
null,
26502650
asOfTime,
@@ -2661,7 +2661,7 @@ private DataFieldElement convertDataField(String userId,
26612661
{
26622662
if (relatedMetadataElement != null)
26632663
{
2664-
if (propertyHelper.isTypeOf(relatedMetadataElement, OpenMetadataType.NESTED_DATA_FIELD_RELATIONSHIP.typeName))
2664+
if ((propertyHelper.isTypeOf(relatedMetadataElement, OpenMetadataType.NESTED_DATA_FIELD_RELATIONSHIP.typeName)) && (!relatedMetadataElement.getElementAtEnd1()))
26652665
{
26662666
relatedFields.add(this.convertMemberDataField(userId,
26672667
relatedMetadataElement,
@@ -2681,7 +2681,7 @@ private DataFieldElement convertDataField(String userId,
26812681
startFrom = startFrom + invalidParameterHandler.getMaxPagingSize();
26822682
relatedMetadataElementList = openMetadataStoreClient.getRelatedMetadataElements(userId,
26832683
openMetadataElement.getElementGUID(),
2684-
1,
2684+
0,
26852685
null,
26862686
null,
26872687
asOfTime,
@@ -2839,7 +2839,7 @@ private DataClassElement convertDataClass(String userId,
28392839
{
28402840
RelatedMetadataElementList relatedMetadataElementList = openMetadataStoreClient.getRelatedMetadataElements(userId,
28412841
openMetadataElement.getElementGUID(),
2842-
1,
2842+
0,
28432843
null,
28442844
null,
28452845
asOfTime,

open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/CollectionsInterface.java

Lines changed: 65 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException;
88
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException;
99
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException;
10+
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionGraph;
1011
import org.odpi.openmetadata.frameworks.openmetadata.search.ElementProperties;
1112
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement;
1213
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember;
@@ -438,23 +439,77 @@ void deleteCollection(String userId,
438439
*
439440
* @param userId userId of user making request.
440441
* @param collectionGUID unique identifier of the collection.
441-
* @param startFrom index of the list to start from (0 for start)
442-
* @param pageSize maximum number of elements to return.
443-
* @param effectiveTime the time that the retrieved elements must be effective for (null for any time, new Date() for now)
442+
* @param limitResultsByStatus By default, relationships in all statuses (other than DELETE) are returned. However, it is possible
443+
* to specify a list of statuses (for example ACTIVE) to restrict the results to. Null means all status values.
444+
* @param asOfTime Requests a historical query of the entity. Null means return the present values.
445+
* @param sequencingProperty String name of the property that is to be used to sequence the results.
446+
* Null means do not sequence on a property name (see SequencingOrder).
447+
* @param sequencingOrder Enum defining how the results should be ordered.
448+
* @param forLineage the retrieved element is for lineage processing so include archived elements
449+
* @param forDuplicateProcessing the retrieved element is for duplicate processing so do not combine results from known duplicates.
450+
* @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
451+
* @param startFrom paging start point
452+
* @param pageSize maximum results that can be returned
453+
*
454+
* @return list of collection details
455+
*
456+
* @throws InvalidParameterException one of the parameters is invalid.
457+
* @throws PropertyServerException there is a problem retrieving information from the property server(s).
458+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
459+
*/
460+
List<CollectionMember> getCollectionMembers(String userId,
461+
String collectionGUID,
462+
List<ElementStatus> limitResultsByStatus,
463+
Date asOfTime,
464+
String sequencingProperty,
465+
SequencingOrder sequencingOrder,
466+
boolean forLineage,
467+
boolean forDuplicateProcessing,
468+
Date effectiveTime,
469+
int startFrom,
470+
int pageSize) throws InvalidParameterException,
471+
PropertyServerException,
472+
UserNotAuthorizedException;
473+
474+
475+
/**
476+
* Return a graph of elements that are the nested members of a collection along
477+
* with elements immediately connected to the starting collection. The result
478+
* includes a mermaid graph of the returned elements.
479+
*
480+
* @param userId userId of user making request.
481+
* @param collectionGUID unique identifier of the collection.
482+
* @param limitResultsByStatus By default, relationships in all statuses (other than DELETE) are returned. However, it is possible
483+
* to specify a list of statuses (for example ACTIVE) to restrict the results to. Null means all status values.
484+
* @param asOfTime Requests a historical query of the entity. Null means return the present values.
485+
* @param sequencingProperty String name of the property that is to be used to sequence the results.
486+
* Null means do not sequence on a property name (see SequencingOrder).
487+
* @param sequencingOrder Enum defining how the results should be ordered.
488+
* @param forLineage the retrieved element is for lineage processing so include archived elements
489+
* @param forDuplicateProcessing the retrieved element is for duplicate processing so do not combine results from known duplicates.
490+
* @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
491+
* @param startFrom paging start point
492+
* @param pageSize maximum results that can be returned
444493
*
445494
* @return list of asset details
446495
*
447496
* @throws InvalidParameterException one of the parameters is invalid.
448497
* @throws PropertyServerException there is a problem retrieving information from the property server(s).
449498
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
450499
*/
451-
List<CollectionMember> getCollectionMembers(String userId,
452-
String collectionGUID,
453-
int startFrom,
454-
int pageSize,
455-
Date effectiveTime) throws InvalidParameterException,
456-
PropertyServerException,
457-
UserNotAuthorizedException;
500+
CollectionGraph getCollectionGraph(String userId,
501+
String collectionGUID,
502+
List<ElementStatus> limitResultsByStatus,
503+
Date asOfTime,
504+
String sequencingProperty,
505+
SequencingOrder sequencingOrder,
506+
boolean forLineage,
507+
boolean forDuplicateProcessing,
508+
Date effectiveTime,
509+
int startFrom,
510+
int pageSize) throws InvalidParameterException,
511+
PropertyServerException,
512+
UserNotAuthorizedException;
458513

459514

460515
/**

open-metadata-implementation/access-services/digital-service/digital-service-client/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies {
1616
implementation project(':open-metadata-implementation:repository-services:repository-services-apis')
1717
implementation project(':open-metadata-implementation:admin-services:admin-services-api')
1818
implementation project(':open-metadata-implementation:common-services:ffdc-services')
19+
implementation project(':open-metadata-implementation:common-services:mermaid-services')
1920
implementation project(':open-metadata-implementation:access-services:digital-service:digital-service-api')
2021
implementation project(':open-metadata-implementation:frameworks:open-metadata-framework')
2122
implementation project(':open-metadata-implementation:frameworks:open-connector-framework')

0 commit comments

Comments
 (0)