Skip to content

Commit

Permalink
Merge pull request #7107 from mandy-chessell/egeria-code
Browse files Browse the repository at this point in the history
Refresh content packs
  • Loading branch information
mandy-chessell authored Nov 16, 2022
2 parents fd77a62 + 2ce0c9b commit abab90e
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 15 deletions.
2 changes: 1 addition & 1 deletion content-packs/CocoBusinessSystemsArchive.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoClinicalTrialsTemplatesArchive.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"class":"OpenMetadataArchive","archiveProperties":{"class":"OpenMetadataArchiveProperties","archiveGUID":"74a786b2-d6d7-401d-b8c1-7d798f752c55","archiveName":"Coco Pharmaceuticals Clinical Trials Templates","archiveDescription":"Templates for new assets relating to a clinical trial.","archiveType":"CONTENT_PACK","originatorName":"Egeria Project","originatorLicense":"Apache 2.0","creationDate":1663761361149,"dependsOnArchives":["bce3b0a0-662a-4f87-b8dc-844078a11a6e"]}}
{"class":"OpenMetadataArchive","archiveProperties":{"class":"OpenMetadataArchiveProperties","archiveGUID":"74a786b2-d6d7-401d-b8c1-7d798f752c55","archiveName":"Coco Pharmaceuticals Clinical Trials Templates","archiveDescription":"Templates for new assets relating to a clinical trial.","archiveType":"CONTENT_PACK","originatorName":"Egeria Project","originatorLicense":"Apache 2.0","creationDate":1668588486684,"dependsOnArchives":["bce3b0a0-662a-4f87-b8dc-844078a11a6e"]}}
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/CocoGovernanceEngineDefinitionsArchive.json

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

They are as follows:

* **CloudInformationModel.json** - extracted metadata from the **Cloud Information Model**'s
* **CloudInformationModel.json** - 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 build from archive writers in egeria-samples.git.
The next four archives are build from the [archive writers in egeria-samples.git](https://github.com/odpi/egeria-samples/tree/main/sample-metadata-archives/coco-metadata-archives).
They supply metadata to support the Coco Pharmaceuticals scenarios.

* **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
Expand Down Expand Up @@ -43,6 +46,7 @@ external utilities since each OMAG server capable of being a cohort member will
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.
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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public synchronized RepositoryGovernanceContext getRepositoryGovernanceContext()
* @throws ConnectorCheckedException there is a problem within the archive service.
*/
@Override
public void start() throws ConnectorCheckedException
public synchronized void start() throws ConnectorCheckedException
{
super.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public AuditLogReportingComponent(int componentId,
*
* @return int componentId
*/
@Override
public int getComponentId()
{
return componentId;
Expand All @@ -106,6 +107,7 @@ public void setComponentId(int componentId)
*
* @return enum describing the status
*/
@Override
public ComponentDevelopmentStatus getComponentDevelopmentStatus()
{
return componentDevelopmentStatus;
Expand All @@ -128,6 +130,7 @@ public void setComponentDevelopmentStatus(ComponentDevelopmentStatus componentDe
*
* @return String component name
*/
@Override
public String getComponentName()
{
return componentName;
Expand All @@ -148,11 +151,12 @@ public void setComponentName(String componentName)

/**
* Return the short description of the component. This is an English description. Natural language support for
* these values can be added to UIs using a resource bundle indexed with the component Id. This value is
* these values can be added to UIs using a resource bundle indexed with the component id. This value is
* provided as a default if the resource bundle is not available.
*
* @return String description
*/
@Override
public String getComponentDescription()
{
return componentDescription;
Expand All @@ -161,7 +165,7 @@ public String getComponentDescription()

/**
* Set up the short description of the component. This is an English description. Natural language support for
* these values can be added to UIs using a resource bundle indexed with the component Id. This value is
* these values can be added to UIs using a resource bundle indexed with the component id. This value is
* provided as a default if the resource bundle is not available.
*
* @param componentDescription String description
Expand All @@ -178,6 +182,7 @@ public void setComponentDescription(String componentDescription)
*
* @return String URL
*/
@Override
public String getComponentWikiURL()
{
return componentWikiURL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public abstract class GeneralGovernanceActionService extends GovernanceActionSer
*
* @param governanceContext specialist context for this type of governance action.
*/
@Override
public synchronized void setGovernanceContext(GovernanceActionContext governanceContext)
{
this.governanceContext = governanceContext;
Expand All @@ -50,7 +51,7 @@ public synchronized void setGovernanceContext(GovernanceActionContext governance
* @throws ConnectorCheckedException there is a problem within the governance action service.
*/
@Override
public void start() throws ConnectorCheckedException
public synchronized void start() throws ConnectorCheckedException
{
super.start();
super.validateContext(governanceContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public ConnectorTypeProperties getConnectorTypeProperties()
* @return properties including the name of the connector type, the connector provider class
* and any specific connection properties that are recognized by this connector.
*/
@Override
public synchronized ConnectorType getConnectorType()
{
final String javaLanguageName = "Java";
Expand Down Expand Up @@ -269,6 +270,7 @@ protected void setConnectorTypeProperties(ConnectorType connectorTypeBean)
* @throws ConnectionCheckedException an error with the connection.
* @throws ConnectorCheckedException an error initializing the connector.
*/
@Override
public Connector getConnector(Connection connection) throws ConnectionCheckedException, ConnectorCheckedException
{
return this.getConnector(new ConnectionProperties(connection));
Expand All @@ -284,6 +286,7 @@ public Connector getConnector(Connection connection) throws ConnectionCheckedExc
* @throws ConnectionCheckedException if there are missing or invalid properties in the connection
* @throws ConnectorCheckedException if there are issues instantiating or initializing the connector
*/
@Override
public Connector getConnector(ConnectionProperties connection) throws ConnectionCheckedException, ConnectorCheckedException
{
final String methodName = "getConnector";
Expand Down Expand Up @@ -410,6 +413,7 @@ public Connector getConnector(ConnectionProperties connection) throws Connection
*
* @return random UUID as hashcode
*/
@Override
public int hashCode()
{
return hashCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ public int getComponentId()
*
* @return enum describing the status
*/
@Override
public ComponentDevelopmentStatus getComponentDevelopmentStatus()
{
return componentDevelopmentStatus;
Expand All @@ -275,6 +276,7 @@ public ComponentDevelopmentStatus getComponentDevelopmentStatus()
*
* @return String component name
*/
@Override
public String getComponentName()
{
return componentName;
Expand All @@ -288,6 +290,7 @@ public String getComponentName()
*
* @return String description
*/
@Override
public String getComponentDescription()
{
return componentDescription;
Expand All @@ -300,6 +303,7 @@ public String getComponentDescription()
*
* @return String URL
*/
@Override
public String getComponentWikiURL()
{
return componentWikiURL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public OMRSAuditLogReportingComponent(ComponentDescription template)
*
* @return int componentId
*/
@Override
public int getComponentId()
{
return componentId;
Expand All @@ -90,6 +91,7 @@ public int getComponentId()
*
* @return enum describing the status
*/
@Override
public ComponentDevelopmentStatus getComponentDevelopmentStatus()
{
return componentDevelopmentStatus;
Expand All @@ -101,6 +103,7 @@ public ComponentDevelopmentStatus getComponentDevelopmentStatus()
*
* @return String component name
*/
@Override
public String getComponentName()
{
return componentName;
Expand All @@ -114,6 +117,7 @@ public String getComponentName()
*
* @return String description
*/
@Override
public String getComponentDescription()
{
return componentDescription;
Expand All @@ -126,6 +130,7 @@ public String getComponentDescription()
*
* @return String URL
*/
@Override
public String getComponentWikiURL()
{
return componentWikiURL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public class SimpleCatalogArchiveHelper

private static final String GOVERNANCE_DEFINITION_SCOPE_RELATIONSHIP_NAME = "GovernanceDefinitionScope";
private static final String GOVERNED_BY_RELATIONSHIP_NAME = "GovernedBy";
private static final String RESOURCE_LIST_RELATIONSHIP_NAME = "ResourceList";

public static final String GOVERNANCE_DRIVER_LINK_RELATIONSHIP_NAME = "GovernanceDriverLink";
public static final String GOVERNANCE_RESPONSE_RELATIONSHIP_NAME = "GovernanceResponse";
Expand Down Expand Up @@ -357,6 +358,8 @@ public class SimpleCatalogArchiveHelper
private static final String PROJECT_TYPE_PROPERTY = "projectType";
private static final String PURPOSES_PROPERTY = "purposes";
private static final String DETAILS_PROPERTY = "details";
private static final String RESOURCE_USE_PROPERTY = "resourceUse";
private static final String WATCH_RESOURCE_PROPERTY = "watchResource";

private static final String GROUPS_PROPERTY = "groups";
private static final String SECURITY_LABELS_PROPERTY = "securityLabels";
Expand Down Expand Up @@ -2463,6 +2466,36 @@ public void addGovernedByRelationship(String referenceableQName,
end2));
}

/**
* Link a referenceable to another referenceable to indicate that the second referenceable is providing resources in support of the first.
*
* @param referenceableQName qualified name of the referenceable
* @param resourceQName qualified name of the second referenceable
*/
public void addResourceListRelationship(String referenceableQName,
String resourceQName,
String resourceUse,
boolean watchResource)
{
final String methodName = "addResourceListRelationship";

String guid1 = idToGUIDMap.getGUID(referenceableQName);
String guid2 = idToGUIDMap.getGUID(resourceQName);

EntityProxy end1 = archiveHelper.getEntityProxy(archiveBuilder.getEntity(guid1));
EntityProxy end2 = archiveHelper.getEntityProxy(archiveBuilder.getEntity(guid2));

InstanceProperties properties = archiveHelper.addStringPropertyToInstance(archiveRootName, null, RESOURCE_USE_PROPERTY, resourceUse, methodName);
properties = archiveHelper.addBooleanPropertyToInstance(archiveRootName, properties, WATCH_RESOURCE_PROPERTY, watchResource, methodName);

archiveBuilder.addRelationship(archiveHelper.getRelationship(RESOURCE_LIST_RELATIONSHIP_NAME,
idToGUIDMap.getGUID(guid1 + "_to_" + guid2 + "_resource_list_relationship"),
properties,
InstanceStatus.ACTIVE,
end1,
end2));
}


/**
* Link two governance definitions at the same level.
Expand Down

0 comments on commit abab90e

Please sign in to comment.