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

Add report utilities to platform lib #8428

Merged
merged 2 commits into from
Oct 4, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ dependencies {
implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-leadership-sample')
implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-subject-area-sample')
implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-zone-create-sample')
implementation project(':open-metadata-resources:open-metadata-reports:report-utilities')
}

distributions {
Expand Down Expand Up @@ -232,6 +233,7 @@ distributions {
from { project(':open-metadata-implementation:adapters:open-connectors:system-connectors:egeria-system-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:data-manager-connectors:postgres-server-connectors').shadowJar }
from { project(':open-metadata-implementation:adapters:open-connectors:data-manager-connectors:unity-catalog-connectors').jar }
from { project(':open-metadata-resources:open-metadata-reports:report-utilities').jar }
fileMode = 0755
}
into('assembly/platform/extra') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
import org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository;
import org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSTypeDefManager;

import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import java.util.*;

/**
* LocalOMRSMetadataCollection provides a wrapper around the metadata collection for the real local repository.
Expand Down Expand Up @@ -118,7 +116,6 @@ public class LocalOMRSMetadataCollection extends OMRSMetadataCollectionBase
/**
* Set up a new security verifier (the handler runs with a default verifier until this
* method is called).
*
* The security verifier provides authorization checks for access and maintenance
* changes to open metadata. Authorization checks are enabled through the
* OpenMetadataServerSecurityConnector.
Expand Down Expand Up @@ -1469,18 +1466,21 @@ private List<EntityDetail> setLocalProvenanceInEntityList(List<EntityDetail> i
}
else
{
List<EntityDetail> resultList = new ArrayList<>();
/*
* We have seen duplicate instances coming out of XTDB - the map de-duplicates.
*/
Map<String, EntityDetail> resultList = new HashMap<>();

for (EntityDetail entity : instanceList)
{
if (entity != null)
{
setLocalProvenanceThroughoutEntity(entity);
resultList.add(entity);
resultList.put(entity.getGUID(), entity);
}
}

return resultList;
return new ArrayList<>(resultList.values());
}
}

Expand All @@ -1499,18 +1499,21 @@ private List<Relationship> setLocalProvenanceInRelationshipList(List<Relationshi
}
else
{
List<Relationship> resultList = new ArrayList<>();
/*
* We have seen duplicate instances coming out of XTDB - the map de-duplicates.
*/
Map<String, Relationship> resultList = new HashMap<>();

for (Relationship relationship : instanceList)
{
if (relationship != null)
{
setLocalProvenanceThroughoutRelationship(relationship);
resultList.add(relationship);
resultList.put(relationship.getGUID(), relationship);
}
}

return resultList;
return new ArrayList<>(resultList.values());
}
}

Expand Down
Loading