Skip to content

Commit

Permalink
Merge pull request #8178 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Rename OpenConnectorsArchive to CoreContentPack
  • Loading branch information
mandy-chessell committed May 22, 2024
2 parents 79f8918 + ccee0de commit dd4f1b3
Show file tree
Hide file tree
Showing 54 changed files with 927 additions and 340 deletions.
1 change: 1 addition & 0 deletions CoreContentPackGUIDMap.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion OpenConnectorsArchiveGUIDMap.json

This file was deleted.

2 changes: 1 addition & 1 deletion content-packs/CocoClinicalTrialsTemplatesArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoComboArchive.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoComboArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoGovernanceEngineDefinitionsArchive.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion content-packs/OpenConnectorsArchive.omarchive

This file was deleted.

59 changes: 29 additions & 30 deletions content-packs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,60 +11,59 @@ or [while the server is running](https://egeria-project.org/guides/operations/ad

They are as follows:

* **CloudInformationModel.json** - glossary from the **Cloud Information Model**'s
* **CoreContentPack** - contains the connector definitions for the open connectors supplied in this distribution along with the valid metadata values for the technologies they support.
This content pack is designed to provide a good starting point for a new Egeria deployment.
It is loaded automatically in the *active-metadata-store* sample server.

* **CloudInformationModel** - glossary from the **Cloud Information Model**'s
[JSONLD formatted model](https://raw.githubusercontent.com/cloudinformationmodel/cloudinformationmodel/master/dist/model.jsonld).
The content covers basic commerce concepts such as Party, Product, Invoice and Shipping.
The cloud information project has been archived. However, this is a useful starter set glossary,

The next four archives are built from the [coco-metadata-archives](https://github.com/odpi/egeria/tree/main/open-metadata-resources/open-metadata-samples/sample-metadata/coco-metadata-archives) module.
They supply metadata to support the [Coco Pharmaceuticals scenarios](https://egeria-project.org/practices/coco-pharmaceuticals/).
* **OpenMetadataTypes** - Archive of the open metadata types defined by Egeria.
This archive contains all the open metadata type definitions provided by Egeria.
It is supplied for external utilities since each OMAG server capable of being a cohort member will load these types on start up.

* **CocoComboArchive** - supplies metadata to support the [Coco Pharmaceuticals scenarios](https://egeria-project.org/practices/coco-pharmaceuticals/).
It is a useful content pack to load when experimenting with Egeria's capabilities since it provides examples of many
types of open metadata. In addition, this metadata is also available in the following archives that are used in the
[Open Metadata Labs](https://egeria-project.org/education/open-metadata-labs/overview/)
where different subsets of this metadata are loading into each of the servers.

* **CocoBusinessSystemsArchive** provides a catalog of the business systems and the lineage between
* **CocoBusinessSystemsArchive** provides a catalog of the business systems and the lineage between
them and the load of their data into the data lake. This archive simulates the type of metadata expected from
an ETL tool suite. It is intended for **cocoMDS5** in the open metadata labs but can be used in any server.

* **Coco Pharmaceuticals Organizations** - provides the profiles, user identifies and team of the featured
* **CocoOrganizationArchive** - provides the profiles, user identifies and team of the featured
personas of Coco Pharmaceuticals.

* **CocoClinicalTrialsTemplatesArchive** - provides the template assets used for onboarding weekly patient measurements during a clinical trial.
* **CocoClinicalTrialsTemplatesArchive** - provides the template assets used for onboarding weekly patient measurements during a clinical trial.

* **Governance Program Definitions** - provides the metadata to describe Coco Pharmaceuticals governance program.
* **CocoGovernanceProgramArchive** - provides the metadata to describe Coco Pharmaceuticals governance program.

* **CocoGovernanceEngineDefinitionsArchive** - provides the metadata to describe Coco Pharmaceuticals three governance engines:
* **CocoGovernanceEngineDefinitionsArchive** - provides the metadata to describe Coco Pharmaceuticals three governance engines:
`AssetGovernance`, `AssetDiscovery` and `AssetQuality`.

* **Coco Pharmaceuticals Sustainability Initiative** provides the base definitions for Coco Pharmaceutical's
sustainability initiative.
* **CocoSustainabilityArchive** - provides the base definitions for Coco Pharmaceutical's sustainability initiative.

* **CocoTypesArchive** - provides additional types for Coco Pharmaceuticals. These are `BiopsyScope` Enum, `BiopsyReport` Entity, `BiopsySupportingEvidence` Relationship and
* **CocoTypesArchive** - provides additional types for Coco Pharmaceuticals. These are `BiopsyScope` Enum, `BiopsyReport` Entity, `BiopsySupportingEvidence` Relationship and
`ReviewedByClinicalTrials` Classification.

These next archives contain connector type and connector category definitions.

* **DataStoreConnectorTypes** - A subset of the *OpenConnectorsArchive* retained in case anyone is using it.
It should be considered deprecated and the OpenConnectorsArchive used instead.

* **OpenConnectorsArchive** - Connector type metadata for connecting to data sources and other third party technology.

This archive is a summary of all the open metadata type definitions provided by Egeria. It is supplied for
external utilities since each OMAG server capable of being a cohort member will load these types on start up.

* **OpenMetadataTypes** - Archive of the open metadata types defined by Egeria.

This final four archives are for a demo showing 4 metadata access servers connected together in a single cohort.
The archives are each loaded into a different server.
* **SimpleCatalog** - provides an example of a database, an API and an event structure linked to a glossary term.
It is loaded automatically in the *simple-metadata-store* sample server.
SimpleCatalog is also supplied as four archives for use in a demo showing 4 metadata access servers connected together in a single cohort.
The archives are each loaded into a different server.
It is then possible to show how the cohort integrates metadata from different catalogs.
These archives are used in the *Development labs* which are part of the [Open Metadata Labs](https://egeria-project.org/education/open-metadata-labs/overview/).

* **SimpleAPICatalog** - API metadata typically found in an API catalog.
* **SimpleAPICatalog** - API metadata typically found in an API catalog.

* **SimpleDataCatalog** - Data Source metadata typically found in an Data catalog.
* **SimpleDataCatalog** - Database metadata typically found in an Data catalog.

* **SimpleEventCatalog** - Event metadata typically found in an API catalog.
* **SimpleEventCatalog** - Event metadata typically found in an API catalog.

* **SimpleGovernanceCatalog** - A glossary term linked to metadata elements in the API, Event, Data catalogs.
* **SimpleGovernanceCatalog** - A glossary term linked to metadata elements in the API, Event, Data catalogs.

There is also **SimpleCatalog** that rolls up the content of the four catalogs into a single content pack for use in other scenarios.

----
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Expand Down
3 changes: 2 additions & 1 deletion open-metadata-distribution/omag-server-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ distributions {
}
into('assembly/platform') {
from(rootProject.projectDir) {
include 'content-packs/OpenConnectorsArchive.omarchive'
include 'content-packs/CoreContentPack.omarchive'
include 'content-packs/SimpleCatalog.omarchive'
}
fileMode = 0755
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package org.odpi.openmetadata.accessservices.assetcatalog;

import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogListResponse;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogOMASAPIResponse;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogSupportedTypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.odpi.openmetadata.accessservices.communityprofile.rest.ElementStubsResponse;
import org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupResponse;
import org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupsResponse;
import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler;
import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse;
import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody;
import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ else if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType

actionTargetElement.setActionTargetRelationshipGUID(relationship.getGUID());
actionTargetElement.setActionTargetName(this.removeActionTargetName(instanceProperties));
actionTargetElement.setStatus(this.removeActionStatus(OpenMetadataProperty.TARGET_FOR_ACTION_STATUS.name, instanceProperties));
actionTargetElement.setStatus(this.removeActionStatus(OpenMetadataProperty.ACTION_STATUS.name, instanceProperties));
actionTargetElement.setStartDate(this.removeStartDate(instanceProperties));
actionTargetElement.setCompletionDate(this.removeCompletionDate(instanceProperties));
actionTargetElement.setCompletionMessage(this.removeCompletionMessage(instanceProperties));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,24 @@ private void catalogDirectory(File directory,
{
for (File file : filesArray)
{
if (file != null)
if (super.isActive())
{
if (file.isDirectory())
if (file != null)
{
this.catalogDirectory(file, localMethodName);
}
else
{
this.catalogFile(file, methodName);
if (file.isDirectory())
{
this.catalogDirectory(file, localMethodName);
}
else
{
this.catalogFile(file, methodName);
}
}
}
else
{
break;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,65 +79,72 @@ private void updateDataFolder(File fileChanged,

for (DirectoryToMonitor directoryToMonitor : directoriesToMonitor)
{
try
if (super.isActive())
{
if (fileChanged.getAbsolutePath().startsWith(directoryToMonitor.directoryFile.getAbsolutePath()))
try
{
/*
* The directory matches this directory.
*/
if (directoryToMonitor.dataFolderElement == null)
if (fileChanged.getAbsolutePath().startsWith(directoryToMonitor.directoryFile.getAbsolutePath()))
{
directoryToMonitor.dataFolderElement = this.getFolderElement(directoryToMonitor.directoryFile);
}

if (directoryToMonitor.dataFolderElement != null)
{
Date lastRecordedChange = directoryToMonitor.dataFolderElement.getFileFolderProperties().getModifiedTime();

if ((lastRecordedChange == null) || (lastRecordedChange.before(new Date(directoryToMonitor.directoryFile.lastModified()))))
/*
* The directory matches this directory.
*/
if (directoryToMonitor.dataFolderElement == null)
{
FileFolderProperties properties = new FileFolderProperties();
directoryToMonitor.dataFolderElement = this.getFolderElement(directoryToMonitor.directoryFile);
}

properties.setModifiedTime(modifiedTime);
this.getContext().updateDataFolderInCatalog(directoryToMonitor.dataFolderElement.getElementHeader().getGUID(), true,
properties);
if (directoryToMonitor.dataFolderElement != null)
{
Date lastRecordedChange = directoryToMonitor.dataFolderElement.getFileFolderProperties().getModifiedTime();

if (auditLog != null)
if ((lastRecordedChange == null) || (lastRecordedChange.before(new Date(directoryToMonitor.directoryFile.lastModified()))))
{
auditLog.logMessage(methodName,
BasicFilesIntegrationConnectorsAuditCode.DATA_FOLDER_UPDATED_FOR_FILE.getMessageDefinition(
connectorName,
directoryToMonitor.directoryFile.getAbsolutePath(),
modifiedTime.toString(),
fileChanged.getAbsolutePath()));
FileFolderProperties properties = new FileFolderProperties();

properties.setModifiedTime(modifiedTime);
this.getContext().updateDataFolderInCatalog(directoryToMonitor.dataFolderElement.getElementHeader().getGUID(), true,
properties);

if (auditLog != null)
{
auditLog.logMessage(methodName,
BasicFilesIntegrationConnectorsAuditCode.DATA_FOLDER_UPDATED_FOR_FILE.getMessageDefinition(
connectorName,
directoryToMonitor.directoryFile.getAbsolutePath(),
modifiedTime.toString(),
fileChanged.getAbsolutePath()));
}
}
}
}
}
}
catch (Exception error)
{
if (auditLog != null)
catch (Exception error)
{
String folderGUID = null;

if (directoryToMonitor.dataFolderElement != null)
if (auditLog != null)
{
folderGUID = directoryToMonitor.dataFolderElement.getElementHeader().getGUID();
}
String folderGUID = null;

if (directoryToMonitor.dataFolderElement != null)
{
folderGUID = directoryToMonitor.dataFolderElement.getElementHeader().getGUID();
}

auditLog.logException(methodName,
BasicFilesIntegrationConnectorsAuditCode.UNEXPECTED_EXC_FOLDER_UPDATE.getMessageDefinition(
error.getClass().getName(),
connectorName,
folderGUID,
directoryToMonitor.directoryFile.getAbsolutePath(),
error.getMessage()),
error);
auditLog.logException(methodName,
BasicFilesIntegrationConnectorsAuditCode.UNEXPECTED_EXC_FOLDER_UPDATE.getMessageDefinition(
error.getClass().getName(),
connectorName,
folderGUID,
directoryToMonitor.directoryFile.getAbsolutePath(),
error.getMessage()),
error);

}
}
}
else
{
break;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ public static List<PlaceholderPropertyType> getDataFilesPlaceholderPropertyTypes
{
List<PlaceholderPropertyType> placeholderPropertyTypes = new ArrayList<>();

placeholderPropertyTypes.add(DEPLOYED_IMPLEMENTATION_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(PATH_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_TYPE.getPlaceholderType());
Expand All @@ -215,7 +214,6 @@ public static List<PlaceholderPropertyType> getMediaFilesPlaceholderPropertyType
{
List<PlaceholderPropertyType> placeholderPropertyTypes = new ArrayList<>();

placeholderPropertyTypes.add(DEPLOYED_IMPLEMENTATION_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(PATH_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_TYPE.getPlaceholderType());
Expand All @@ -236,7 +234,6 @@ public static List<PlaceholderPropertyType> getFolderPlaceholderPropertyTypes()
{
List<PlaceholderPropertyType> placeholderPropertyTypes = new ArrayList<>();

placeholderPropertyTypes.add(DEPLOYED_IMPLEMENTATION_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(PATH_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FOLDER_NAME.getPlaceholderType());

Expand Down
Loading

0 comments on commit dd4f1b3

Please sign in to comment.