From ae8d25dbc19a5363818e1eba2d920b7c4b0e6908 Mon Sep 17 00:00:00 2001 From: Mandy Chessell Date: Mon, 6 Feb 2023 09:19:32 +0000 Subject: [PATCH] Version 4 types Signed-off-by: Mandy Chessell --- .../ffdc/RESTClientConnectorErrorCode.java | 10 +- .../spring/SpringRESTClientConnector.java | 289 ++++---- .../OMRSRepositoryPropertiesUtilities.java | 8 +- .../opentypes/OpenMetadataTypesArchive.java | 683 ++++++++++-------- .../OpenMetadataTypesArchive1_2.java | 12 +- .../OpenMetadataTypesArchive3_15.java | 675 +++++++++++++++++ .../auditlog/FVTAuditLogDestination.java | 2 +- 7 files changed, 1240 insertions(+), 439 deletions(-) create mode 100644 open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_15.java diff --git a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-connectors-api/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/ffdc/RESTClientConnectorErrorCode.java b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-connectors-api/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/ffdc/RESTClientConnectorErrorCode.java index ba7d759ceb2..6d88185414c 100644 --- a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-connectors-api/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/ffdc/RESTClientConnectorErrorCode.java +++ b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-connectors-api/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/ffdc/RESTClientConnectorErrorCode.java @@ -44,11 +44,11 @@ public enum RESTClientConnectorErrorCode ; - private int httpErrorCode; - private String errorMessageId; - private String errorMessage; - private String systemAction; - private String userAction; + private final int httpErrorCode; + private final String errorMessageId; + private final String errorMessage; + private final String systemAction; + private final String userAction; private static final Logger log = LoggerFactory.getLogger(RESTClientConnectorErrorCode.class); private static final long serialVersionUID = 1L; diff --git a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/spring/SpringRESTClientConnector.java b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/spring/SpringRESTClientConnector.java index c9d729dbc98..66019396320 100644 --- a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/spring/SpringRESTClientConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/spring/SpringRESTClientConnector.java @@ -165,9 +165,12 @@ public T callGetRESTCallNoParams(String methodName, HttpHeaders headers = getHttpHeaders(); - if (headers.isEmpty()) { + if (headers.isEmpty()) + { responseObject = restTemplate.getForObject(urlTemplate, returnClass); - } else { + } + else + { HttpEntity request = new HttpEntity<>(headers); ResponseEntity responseEntity = restTemplate.exchange(urlTemplate, HttpMethod.GET, request, returnClass); @@ -185,15 +188,14 @@ public T callGetRESTCallNoParams(String methodName, log.debug("Returning from {} with no response object.", methodName); } - return responseObject; } catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), @@ -234,13 +236,13 @@ public T callGetRESTCall(String methodName, { try { - if(log.isDebugEnabled()) + if (log.isDebugEnabled()) { //avoid calling Arrays.toString if not debug level log.debug("Calling {} with URL template {} and parameters {}.", - methodName, - urlTemplate, - Arrays.toString(params) + methodName, + urlTemplate, + Arrays.toString(params) ); } @@ -248,9 +250,12 @@ public T callGetRESTCall(String methodName, HttpHeaders headers = getHttpHeaders(); - if (headers.isEmpty()) { + if (headers.isEmpty()) + { responseObject = restTemplate.getForObject(urlTemplate, returnClass, params); - } else { + } + else + { HttpEntity request = new HttpEntity<>(headers); ResponseEntity responseEntity = restTemplate.exchange(urlTemplate, HttpMethod.GET, request, returnClass, params); @@ -274,9 +279,9 @@ public T callGetRESTCall(String methodName, catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), @@ -324,9 +329,12 @@ public T callPostRESTCallNoParams(String methodName, HttpHeaders headers = getHttpHeaders(); - if (headers.isEmpty()) { + if (headers.isEmpty()) + { responseObject = restTemplate.postForObject(urlTemplate, requestBody, returnClass); - } else { + } + else + { HttpEntity request; if (requestBody != null) @@ -361,9 +369,9 @@ public T callPostRESTCallNoParams(String methodName, catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), @@ -408,22 +416,25 @@ public T callPostRESTCall(String methodName, { try { - if(log.isDebugEnabled()) + if (log.isDebugEnabled()) { //avoid calling Arrays.toString if not debug level log.debug("Calling {} with URL template {} and parameters {}.", - methodName, - urlTemplate, - Arrays.toString(params) + methodName, + urlTemplate, + Arrays.toString(params) ); } T responseObject; HttpHeaders headers = getHttpHeaders(); - if (headers.isEmpty()) { + if (headers.isEmpty()) + { responseObject = restTemplate.postForObject(urlTemplate, requestBody, returnClass, params); - } else { + } + else + { HttpEntity request; if (requestBody != null) @@ -456,9 +467,9 @@ public T callPostRESTCall(String methodName, catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), @@ -469,12 +480,12 @@ public T callPostRESTCall(String methodName, error.getMessage()); throw new RESTServerException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - error); + this.getClass().getName(), + methodName, + errorMessage, + errorCode.getSystemAction(), + errorCode.getUserAction(), + error); } } @@ -493,21 +504,20 @@ public T callPostRESTCall(String methodName, */ @Override public T callPutRESTCall(String methodName, - Class returnClass, - String urlTemplate, - Object requestBody, - Object... params) throws RESTServerException + Class returnClass, + String urlTemplate, + Object requestBody, + Object... params) throws RESTServerException { try { - if(log.isDebugEnabled()) + if (log.isDebugEnabled()) { //avoid calling Arrays.toString if not debug level log.debug("Calling {} with URL template {} and parameters {}.", - methodName, - urlTemplate, - Arrays.toString(params) - ); + methodName, + urlTemplate, + Arrays.toString(params)); } HttpEntity request = new HttpEntity<>(requestBody); @@ -519,7 +529,7 @@ public T callPutRESTCall(String methodName, } if (basicAuthorizationHeader != null) { - request = new HttpEntity<>(requestBody, basicAuthorizationHeader); + request = new HttpEntity<>(requestBody, basicAuthorizationHeader); } ResponseEntity responseEntity = restTemplate.exchange(urlTemplate, HttpMethod.PUT, request, returnClass, params); @@ -540,9 +550,9 @@ public T callPutRESTCall(String methodName, catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), @@ -588,9 +598,12 @@ public T callDeleteRESTCallNoParams(String methodName, HttpHeaders headers = getHttpHeaders(); - if (headers.isEmpty()) { + if (headers.isEmpty()) + { restTemplate.delete(urlTemplate); - } else { + } + else + { HttpEntity request; if (requestBody != null) @@ -623,9 +636,9 @@ public T callDeleteRESTCallNoParams(String methodName, catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), @@ -669,14 +682,13 @@ public T callDeleteRESTCall(String methodName, { try { - if(log.isDebugEnabled()) + if (log.isDebugEnabled()) { //avoid calling Arrays.toString if not debug level log.debug("Calling {} with URL template {} and parameters {}.", - methodName, - urlTemplate, - Arrays.toString(params) - ); + methodName, + urlTemplate, + Arrays.toString(params)); } // requestBody may be null @@ -742,13 +754,13 @@ public T callPostRESTCall(String methodName, { try { - if(log.isDebugEnabled()) + if (log.isDebugEnabled()) { //avoid calling Arrays.toString if not debug level log.debug("Calling {} with URL template {} and parameters {}.", - methodName, - urlTemplate, - Arrays.toString(params) + methodName, + urlTemplate, + Arrays.toString(params) ); } @@ -758,10 +770,12 @@ public T callPostRESTCall(String methodName, HttpHeaders headers = getHttpHeaders(); - if (headers.isEmpty()) { + if (headers.isEmpty()) + { request = new HttpEntity<>(requestBody); } - else { + else + { if (requestBody != null) { request = new HttpEntity<>(requestBody, headers); @@ -791,25 +805,25 @@ public T callPostRESTCall(String methodName, catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), - methodName, - urlTemplate, - serverName, - serverPlatformURLRoot, - error.getMessage()); + methodName, + urlTemplate, + serverName, + serverPlatformURLRoot, + error.getMessage()); throw new RESTServerException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - error); + this.getClass().getName(), + methodName, + errorMessage, + errorCode.getSystemAction(), + errorCode.getUserAction(), + error); } } @@ -837,9 +851,9 @@ public T callGetRESTCall(String methodName, { //avoid calling Arrays.toString if not debug level log.debug("Calling {} with URL template {} and parameters {}.", - methodName, - urlTemplate, - Arrays.toString(params) + methodName, + urlTemplate, + Arrays.toString(params) ); } @@ -849,9 +863,12 @@ public T callGetRESTCall(String methodName, HttpHeaders headers = getHttpHeaders(); - if (headers.isEmpty()) { + if (headers.isEmpty()) + { request = HttpEntity.EMPTY; - } else { + } + else + { request = new HttpEntity<>(headers); } @@ -859,7 +876,6 @@ public T callGetRESTCall(String methodName, responseObject = responseEntity.getBody(); - if (responseObject != null) { log.debug("Returning from {} with response object {}", methodName, responseObject); @@ -874,25 +890,25 @@ public T callGetRESTCall(String methodName, catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), - methodName, - urlTemplate, - serverName, - serverPlatformURLRoot, - error.getMessage()); + methodName, + urlTemplate, + serverName, + serverPlatformURLRoot, + error.getMessage()); throw new RESTServerException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - error); + this.getClass().getName(), + methodName, + errorMessage, + errorCode.getSystemAction(), + errorCode.getUserAction(), + error); } } @@ -922,9 +938,9 @@ public T callDeleteRESTCall(String methodName, { //avoid calling Arrays.toString if not debug level log.debug("Calling {} with URL template {} and parameters {}.", - methodName, - urlTemplate, - Arrays.toString(params) + methodName, + urlTemplate, + Arrays.toString(params) ); } @@ -954,19 +970,19 @@ public T callDeleteRESTCall(String methodName, RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), - methodName, - urlTemplate, - serverName, - serverPlatformURLRoot, - error.getMessage()); + methodName, + urlTemplate, + serverName, + serverPlatformURLRoot, + error.getMessage()); throw new RESTServerException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - error); + this.getClass().getName(), + methodName, + errorMessage, + errorCode.getSystemAction(), + errorCode.getUserAction(), + error); } } @@ -989,14 +1005,15 @@ public T callPutRESTCall(String methodName, Object requestBody, Object... params) throws RESTServerException { - try { + try + { if(log.isDebugEnabled()) { //avoid calling Arrays.toString if not debug level log.debug("Calling {} with URL template {} and parameters {}.", - methodName, - urlTemplate, - Arrays.toString(params) + methodName, + urlTemplate, + Arrays.toString(params) ); } @@ -1030,25 +1047,25 @@ public T callPutRESTCall(String methodName, catch (Exception error) { log.debug("Exception {} with message {} occurred during REST call for {}.", - error.getClass().getName(), - error.getMessage(), - methodName); + error.getClass().getName(), + error.getMessage(), + methodName); RESTClientConnectorErrorCode errorCode = RESTClientConnectorErrorCode.CLIENT_SIDE_REST_API_ERROR; String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(error.getClass().getName(), - methodName, - urlTemplate, - serverName, - serverPlatformURLRoot, - error.getMessage()); + methodName, + urlTemplate, + serverName, + serverPlatformURLRoot, + error.getMessage()); throw new RESTServerException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - error); + this.getClass().getName(), + methodName, + errorMessage, + errorCode.getSystemAction(), + errorCode.getUserAction(), + error); } } @@ -1058,18 +1075,22 @@ public T callPutRESTCall(String methodName, * * @return http headers */ - private HttpHeaders getHttpHeaders() { + private HttpHeaders getHttpHeaders() + { HttpHeaders headers = new HttpHeaders(); Map threadLocalHeaders = HttpHeadersThreadLocal.getHeadersThreadLocal().get(); - if (threadLocalHeaders != null) { - for (Map.Entry entry : threadLocalHeaders.entrySet()) { + if (threadLocalHeaders != null) + { + for (Map.Entry entry : threadLocalHeaders.entrySet()) + { headers.set(entry.getKey(), entry.getValue()); } } - if (basicAuthorizationHeader != null) { + if (basicAuthorizationHeader != null) + { headers.addAll(basicAuthorizationHeader); } diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/utilities/OMRSRepositoryPropertiesUtilities.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/utilities/OMRSRepositoryPropertiesUtilities.java index 0703dfc0e53..c26b5a64269 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/utilities/OMRSRepositoryPropertiesUtilities.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/utilities/OMRSRepositoryPropertiesUtilities.java @@ -109,7 +109,7 @@ public String getStringProperty(String sourceName, } } } - catch (Throwable error) + catch (Exception error) { throwHelperLogicError(sourceName, methodName, thisMethodName); } @@ -247,7 +247,7 @@ public InstanceProperties getMapProperty(String sourceName, return mapPropertyValue.getMapValues(); } } - catch (Throwable error) + catch (Exception error) { throwHelperLogicError(sourceName, methodName, thisMethodName); } @@ -306,7 +306,7 @@ public List getStringArrayProperty(String sourceName, } } } - catch (Throwable error) + catch (Exception error) { throwHelperLogicError(sourceName, callingMethodName, thisMethodName); } @@ -750,7 +750,7 @@ public Map getMapFromProperty(String sourceName, return this.getInstancePropertiesAsMap(mapInstancePropertyValue.getMapValues()); } } - catch (Throwable error) + catch (Exception error) { throwHelperLogicError(sourceName, methodName, thisMethodName); } diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java index b88d00ea3ab..658b91719f5 100644 --- a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java +++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java @@ -8,11 +8,13 @@ import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive; import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationPropagationRule; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumElementDef; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndDef; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttributeStatus; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch; import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode; import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSLogicErrorException; @@ -43,7 +45,7 @@ public class OpenMetadataTypesArchive private static final String archiveName = "Open Metadata Types"; private static final String archiveDescription = "Standard types for open metadata repositories."; private static final OpenMetadataArchiveType archiveType = OpenMetadataArchiveType.CONTENT_PACK; - private static final String archiveVersion = "3.15"; + private static final String archiveVersion = "4.0"; private static final String originatorName = "Egeria"; private static final String originatorLicense = "Apache 2.0"; private static final Date creationDate = new Date(1588261366992L); @@ -151,7 +153,7 @@ public OpenMetadataArchive getOpenMetadataArchive() */ public void getOriginalTypes() { - OpenMetadataTypesArchive3_14 previousTypes = new OpenMetadataTypesArchive3_14(archiveBuilder); + OpenMetadataTypesArchive3_15 previousTypes = new OpenMetadataTypesArchive3_15(archiveBuilder); /* * Pull the types from previous releases. @@ -159,37 +161,140 @@ public void getOriginalTypes() previousTypes.getOriginalTypes(); /* - * Calls for new and changed types go here + * Add the type updates */ - updateGovernanceEngines(); - updateGovernanceActionTypes(); - updateGovernanceActions(); - update0710DigitalServices(); - update0715DigitalServiceOwnership(); - update0735SolutionPortsAndWires(); + update0021Collections(); + update0137ToDos(); + add0220DataFileCollectionDataSet(); + add0224TableDataSet(); + add0239DeployedReportType(); + update0462GovernanceActionType(); + update0470IncidentClassifierSet(); + update0484AgreementActor(); + update0720InformationSupplyChains(); } - /* * ------------------------------------------------------------------------------------------------------- */ - - /** - * Allow a mapping from a governance engine request type to a request type supported by a governance service. - */ - private void updateGovernanceEngines() + private void update0021Collections() { - this.archiveBuilder.addTypeDefPatch(updateSupportedGovernanceServiceRelationship()); + this.archiveBuilder.addEnumDef(getMembershipStatusEnum()); + this.archiveBuilder.addTypeDefPatch(updateCollectionMembershipRelationship()); } + private EnumDef getMembershipStatusEnum() + { + final String guid = "a3bdb2ac-c28e-4e5a-8ab7-76aa01038832"; + final String name = "MembershipStatus"; + final String description = "Defines the provenance and confidence that a member belongs in a collection."; + final String descriptionGUID = null; + + EnumDef enumDef = archiveHelper.getEmptyEnumDef(guid, name, description, descriptionGUID); + + ArrayList elementDefs = new ArrayList<>(); + EnumElementDef elementDef; + + final int element0Ordinal = 0; + final String element0Value = "Unknown"; + final String element0Description = "The membership origin is unknown."; + final String element0DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element0Ordinal, + element0Value, + element0Description, + element0DescriptionGUID); + elementDefs.add(elementDef); + enumDef.setDefaultValue(elementDef); + + final int element1Ordinal = 1; + final String element1Value = "Discovered"; + final String element1Description = "The membership was discovered by an automated process."; + final String element1DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element1Ordinal, + element1Value, + element1Description, + element1DescriptionGUID); + elementDefs.add(elementDef); + + final int element2Ordinal = 2; + final String element2Value = "Assigned"; + final String element2Description = "The membership was proposed by an expert curator."; + final String element2DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element2Ordinal, + element2Value, + element2Description, + element2DescriptionGUID); + elementDefs.add(elementDef); + + final int element3Ordinal = 3; + final String element3Value = "Imported"; + final String element3Description = "The membership was imported from another metadata system."; + final String element3DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element3Ordinal, + element3Value, + element3Description, + element3DescriptionGUID); + elementDefs.add(elementDef); + + final int element4Ordinal = 4; + final String element4Value = "Validated"; + final String element4Description = "The membership created by an automated process has been validated and approved by an expert curator."; + final String element4DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element4Ordinal, + element4Value, + element4Description, + element4DescriptionGUID); + elementDefs.add(elementDef); + + final int element5Ordinal = 5; + final String element5Value = "Deprecated"; + final String element5Description = "The membership should no longer be used."; + final String element5DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element5Ordinal, + element5Value, + element5Description, + element5DescriptionGUID); + elementDefs.add(elementDef); + + final int element6Ordinal = 6; + final String element6Value = "Obsolete"; + final String element6Description = "The membership must no longer be used."; + final String element6DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element6Ordinal, + element6Value, + element6Description, + element6DescriptionGUID); + elementDefs.add(elementDef); + + final int element99Ordinal = 99; + final String element99Value = "Other"; + final String element99Description = "Another membership status."; + final String element99DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element99Ordinal, + element99Value, + element99Description, + element99DescriptionGUID); + elementDefs.add(elementDef); + + enumDef.setElementDefs(elementDefs); + return enumDef; + } - private TypeDefPatch updateSupportedGovernanceServiceRelationship() + private TypeDefPatch updateCollectionMembershipRelationship() { /* * Create the Patch */ - final String typeName = "SupportedGovernanceService"; + final String typeName = "CollectionMembership"; TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); @@ -202,42 +307,71 @@ private TypeDefPatch updateSupportedGovernanceServiceRelationship() List properties = new ArrayList<>(); TypeDefAttribute property; - final String attribute1Name = "serviceRequestType"; - final String attribute1Description = "Request type supported by the governance action service (overrides requestType on call to governance service if specified)."; + final String attribute1Name = "membershipRationale"; + final String attribute1Description = "Description of how the member is used, or why it is useful in this collection."; final String attribute1DescriptionGUID = null; + final String attribute2Name = "expression"; + final String attribute2Description = "Expression describing the membership relationship."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "status"; + final String attribute3Description = "The status of the membership relationship."; + final String attribute3DescriptionGUID = null; + final String attribute4Name = "confidence"; + final String attribute4Description = "Level of confidence in the correctness of the membership relationship."; + final String attribute4DescriptionGUID = null; + final String attribute5Name = "steward"; + final String attribute5Description = "Person responsible for the membership relationship."; + final String attribute5DescriptionGUID = null; + final String attribute6Name = "source"; + final String attribute6Description = "Person, organization or automated process that created the membership relationship."; + final String attribute6DescriptionGUID = null; property = archiveHelper.getStringTypeDefAttribute(attribute1Name, attribute1Description, attribute1DescriptionGUID); properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getEnumTypeDefAttribute("MembershipStatus", + attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + property = archiveHelper.getIntTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute5Name, + attribute5Description, + attribute5DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute6Name, + attribute6Description, + attribute6DescriptionGUID); + properties.add(property); typeDefPatch.setPropertyDefinitions(properties); return typeDefPatch; } - /* * ------------------------------------------------------------------------------------------------------- */ - - /** - * Adjust properties used to control the execution of governance actions. - */ - private void updateGovernanceActionTypes() + private void update0137ToDos() { - this.archiveBuilder.addTypeDefPatch(updateGovernanceActionTypeEntity()); - this.archiveBuilder.addTypeDefPatch(updateNextGovernanceActionTypeRelationship()); - this.archiveBuilder.addTypeDefPatch(updateNextGovernanceActionRelationship()); + this.archiveBuilder.addTypeDefPatch(updateActionTargetRelationship()); } - private TypeDefPatch updateGovernanceActionTypeEntity() + private TypeDefPatch updateActionTargetRelationship() { /* * Create the Patch */ - final String typeName = "GovernanceActionType"; + final String typeName = "ActionTarget"; TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); @@ -250,21 +384,42 @@ private TypeDefPatch updateGovernanceActionTypeEntity() List properties = new ArrayList<>(); TypeDefAttribute property; - final String attribute1Name = "waitTime"; - final String attribute1Description = "The minimum number of minutes that the governance engine should wait before calling the governance service."; + final String attribute1Name = "status"; + final String attribute1Description = "The status of the work on this element."; final String attribute1DescriptionGUID = null; - final String attribute3Name = "ignoreMultipleTriggers"; - final String attribute3Description = "Trigger one or many governance action instances?"; + final String attribute2Name = "startDate"; + final String attribute2Description = "Date/time that work started on this element."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "completionDate"; + final String attribute3Description = "Date/time that work stopped on this element."; final String attribute3DescriptionGUID = null; + final String attribute4Name = "actionTargetName"; + final String attribute4Description = "The name to identify the action target to the actor that processes it."; + final String attribute4DescriptionGUID = null; + final String attribute5Name = "completionMessage"; + final String attribute5Description = "Message to provide additional information on the results of acting on the target by the actor or the reasons for any failures."; + final String attribute5DescriptionGUID = null; - - property = archiveHelper.getIntTypeDefAttribute(attribute1Name, - attribute1Description, - attribute1DescriptionGUID); + property = archiveHelper.getEnumTypeDefAttribute("ToDoStatus", + attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); properties.add(property); - property = archiveHelper.getBooleanTypeDefAttribute(attribute3Name, - attribute3Description, - attribute3DescriptionGUID); + property = archiveHelper.getStringTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute5Name, + attribute5Description, + attribute5DescriptionGUID); properties.add(property); typeDefPatch.setPropertyDefinitions(properties); @@ -272,50 +427,83 @@ private TypeDefPatch updateGovernanceActionTypeEntity() return typeDefPatch; } - private TypeDefPatch updateNextGovernanceActionTypeRelationship() + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void add0220DataFileCollectionDataSet() { - /* - * Create the Patch - */ - final String typeName = "NextGovernanceActionType"; + this.archiveBuilder.addEntityDef(getDataFileCollectionDataSetEntity()); - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + } - typeDefPatch.setUpdatedBy(originatorName); - typeDefPatch.setUpdateTime(creationDate); + private EntityDef getDataFileCollectionDataSetEntity() + { + final String guid = "962de053-ab51-40eb-b843-85b98013f5ca"; + final String name = "DataFileCollection"; + final String description = "A data set that consists of a collection files (do not need to be co-located)."; + final String descriptionGUID = null; - /* - * Build the attributes - */ - List properties = new ArrayList<>(); - TypeDefAttribute property; + final String superTypeName = "DataSet"; - final String attribute3Name = "ignoreMultipleTriggers"; - final String attribute3Description = "Trigger one or many next action instances? (deprecated)"; - final String attribute3DescriptionGUID = null; + return archiveHelper.getDefaultEntityDef(guid, + name, + this.archiveBuilder.getEntityDef(superTypeName), + description, + descriptionGUID); + } - property = archiveHelper.getBooleanTypeDefAttribute(attribute3Name, - attribute3Description, - attribute3DescriptionGUID); - property.setAttributeStatus(TypeDefAttributeStatus.DEPRECATED_ATTRIBUTE); - properties.add(property); + /* + * ------------------------------------------------------------------------------------------------------- + */ - typeDefPatch.setPropertyDefinitions(properties); + private void add0224TableDataSet() + { + this.archiveBuilder.addEntityDef(getTableDataSetEntity()); - return typeDefPatch; } - private TypeDefPatch updateNextGovernanceActionRelationship() + private EntityDef getTableDataSetEntity() { - /* - * Create the Patch - */ - final String typeName = "NextGovernanceAction"; + final String guid = "20c45531-5d2e-4eb6-9a47-035cb1067b82"; + final String name = "TableDataSet"; + final String description = "A tabular data source (typically a database table) that is an asset in its own right."; + final String descriptionGUID = null; - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + final String superTypeName = "DataSet"; - typeDefPatch.setUpdatedBy(originatorName); - typeDefPatch.setUpdateTime(creationDate); + return archiveHelper.getDefaultEntityDef(guid, + name, + this.archiveBuilder.getEntityDef(superTypeName), + description, + descriptionGUID); + } + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void add0239DeployedReportType() + { + this.archiveBuilder.addEntityDef(getDeployedReportTypeEntity()); + + } + + private EntityDef getDeployedReportTypeEntity() + { + final String guid = "ed53a480-e6d4-44f1-aac7-3fac60bbb00e"; + final String name = "DeployedReportType"; + final String description = "A template for generating report."; + final String descriptionGUID = null; + + final String superTypeName = "Asset"; + + EntityDef entityDef = archiveHelper.getDefaultEntityDef(guid, + name, + this.archiveBuilder.getEntityDef(superTypeName), + description, + descriptionGUID); /* * Build the attributes @@ -323,19 +511,53 @@ private TypeDefPatch updateNextGovernanceActionRelationship() List properties = new ArrayList<>(); TypeDefAttribute property; - final String attribute3Name = "ignoreMultipleTriggers"; - final String attribute3Description = "Trigger one or many next action instances? (deprecated)"; + final String attribute1Name = "id"; + final String attribute1Description = "Id of report."; + final String attribute1DescriptionGUID = null; + final String attribute2Name = "author"; + final String attribute2Description = "Author of the report."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "url"; + final String attribute3Description = "url of the report."; final String attribute3DescriptionGUID = null; + final String attribute4Name = "createdTime"; + final String attribute4Description = "Report create time."; + final String attribute4DescriptionGUID = null; + final String attribute5Name = "lastModifiedTime"; + final String attribute5Description = "Report last modified time."; + final String attribute5DescriptionGUID = null; + final String attribute6Name = "lastModifier"; + final String attribute6Description = "Report last modifier."; + final String attribute6DescriptionGUID = null; - property = archiveHelper.getBooleanTypeDefAttribute(attribute3Name, - attribute3Description, - attribute3DescriptionGUID); - property.setAttributeStatus(TypeDefAttributeStatus.DEPRECATED_ATTRIBUTE); + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute5Name, + attribute5Description, + attribute5DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute6Name, + attribute6Description, + attribute6DescriptionGUID); properties.add(property); - typeDefPatch.setPropertyDefinitions(properties); + entityDef.setPropertiesDefinition(properties); - return typeDefPatch; + return entityDef; } @@ -344,24 +566,19 @@ private TypeDefPatch updateNextGovernanceActionRelationship() */ - /** - * Allow a governance service to record a message as part of its completion. This is particularly useful if it fails. - */ - private void updateGovernanceActions() + private void update0462GovernanceActionType() { - this.archiveBuilder.addTypeDefPatch(updateGovernanceActionEntity()); - this.archiveBuilder.addTypeDefPatch(updateTargetForActionRelationship()); + this.archiveBuilder.addTypeDefPatch(update0462GovernanceActionTypeExecutorRelationship()); } - - private TypeDefPatch updateGovernanceActionEntity() + private TypeDefPatch update0462GovernanceActionTypeExecutorRelationship() { /* * Create the Patch */ - final String typeName = "GovernanceAction"; + final String typeName = "GovernanceActionTypeExecutor"; - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); typeDefPatch.setUpdatedBy(originatorName); typeDefPatch.setUpdateTime(creationDate); @@ -372,13 +589,34 @@ private TypeDefPatch updateGovernanceActionEntity() List properties = new ArrayList<>(); TypeDefAttribute property; - final String attribute1Name = "completionMessage"; - final String attribute1Description = "Message to provide additional information on the results of running the governance service or the reasons for its failure."; + final String attribute1Name = "requestParameterFilter"; + final String attribute1Description = "Which requestParameters to remove before calling governance action."; final String attribute1DescriptionGUID = null; + final String attribute2Name = "requestParameterMap"; + final String attribute2Description = "The request parameters to rename before calling the governance action. Map is from old name to new name."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "actionTargetFilter"; + final String attribute3Description = "Which actionTargets to remove before calling governance action."; + final String attribute3DescriptionGUID = null; + final String attribute4Name = "actionTargetMap"; + final String attribute4Description = "The action target to rename before calling the governance action. Map is from old name to new name."; + final String attribute4DescriptionGUID = null; - property = archiveHelper.getStringTypeDefAttribute(attribute1Name, - attribute1Description, - attribute1DescriptionGUID); + property = archiveHelper.getArrayStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getArrayStringTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); properties.add(property); typeDefPatch.setPropertyDefinitions(properties); @@ -386,13 +624,21 @@ private TypeDefPatch updateGovernanceActionEntity() return typeDefPatch; } + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void update0470IncidentClassifierSet() + { + this.archiveBuilder.addTypeDefPatch(updateIncidentClassifierSetClassification()); + } - private TypeDefPatch updateTargetForActionRelationship() + private TypeDefPatch updateIncidentClassifierSetClassification() { /* * Create the Patch */ - final String typeName = "TargetForAction"; + final String typeName = "IncidentClassifierSet"; TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); @@ -405,10 +651,11 @@ private TypeDefPatch updateTargetForActionRelationship() List properties = new ArrayList<>(); TypeDefAttribute property; - final String attribute1Name = "completionMessage"; - final String attribute1Description = "Message to provide additional information on the results of acting on the target by the governance service or the reasons for any failures."; + final String attribute1Name = "incidentClassifierCategory"; + final String attribute1Description = "The category of classifiers used to set the incidentClassifiers in IncidentReport."; final String attribute1DescriptionGUID = null; + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, attribute1Description, attribute1DescriptionGUID); @@ -419,22 +666,46 @@ private TypeDefPatch updateTargetForActionRelationship() return typeDefPatch; } + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void update0484AgreementActor() + { + this.archiveBuilder.addTypeDefPatch(updateAgreementActorRelationship()); + } + + private TypeDefPatch updateAgreementActorRelationship() + { + /* + * Create the Patch + */ + final String typeName = "AgreementActor"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + typeDefPatch.setUpdateMultiLink(true); + typeDefPatch.setMultiLink(true); + + return typeDefPatch; + } /* * ------------------------------------------------------------------------------------------------------- */ - private void update0710DigitalServices() + private void update0720InformationSupplyChains() { - this.archiveBuilder.addRelationshipDef(getDigitalServiceProductRelationship()); - this.archiveBuilder.addTypeDefPatch(updateDigitalProductClassification()); + this.archiveBuilder.addRelationshipDef(getInformationSupplyChainLinkRelationship()); } - private RelationshipDef getDigitalServiceProductRelationship() + private RelationshipDef getInformationSupplyChainLinkRelationship() { - final String guid = "51465a59-c785-406d-929c-def34596e9af"; - final String name = "DigitalServiceProduct"; - final String description = "A digital product that is maintained by a digital service."; + final String guid = "207e5130-ab7c-4048-9249-a63a43c13d60"; + final String name = "InformationSupplyChainLink"; + final String description = "A link between two related information supply chain segments -or to their source or destination."; final String descriptionGUID = null; final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; @@ -451,11 +722,11 @@ private RelationshipDef getDigitalServiceProductRelationship() /* * Set up end 1. */ - final String end1EntityType = "DigitalService"; - final String end1AttributeName = "managingDigitalService"; - final String end1AttributeDescription = "Digital service responsible for the production of the digital product."; + final String end1EntityType = "Referenceable"; + final String end1AttributeName = "supplyFrom"; + final String end1AttributeDescription = "Logical source of the information supply chain."; final String end1AttributeDescriptionGUID = null; - final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.AT_MOST_ONE; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.ANY_NUMBER; relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), end1AttributeName, @@ -464,12 +735,13 @@ private RelationshipDef getDigitalServiceProductRelationship() end1Cardinality); relationshipDef.setEndDef1(relationshipEndDef); + /* * Set up end 2. */ final String end2EntityType = "Referenceable"; - final String end2AttributeName = "digitalProducts"; - final String end2AttributeDescription = "The associated digital products."; + final String end2AttributeName = "supplyTo"; + final String end2AttributeDescription = "Logical destination of an information supply chain."; final String end2AttributeDescriptionGUID = null; final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; @@ -480,196 +752,29 @@ private RelationshipDef getDigitalServiceProductRelationship() end2Cardinality); relationshipDef.setEndDef2(relationshipEndDef); - return relationshipDef; - } - - - private TypeDefPatch updateDigitalProductClassification() - { - /* - * Create the Patch - */ - final String typeName = "DigitalProduct"; - - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); - - typeDefPatch.setUpdatedBy(originatorName); - typeDefPatch.setUpdateTime(creationDate); - /* * Build the attributes */ List properties = new ArrayList<>(); TypeDefAttribute property; - final String attribute1Name = "syncDatesByKey"; - final String attribute1Description = "Collection of synchronization dates identified by a key (deprecated, added in error)."; + final String attribute1Name = "description"; + final String attribute1Description = "Description of the relationship."; final String attribute1DescriptionGUID = null; - final String attribute2Name = "productName"; - final String attribute2Description = "Display name of the product."; - final String attribute2DescriptionGUID = null; - final String attribute3Name = "productType"; - final String attribute3Description = "Type or category of the product."; - final String attribute3DescriptionGUID = null; - final String attribute4Name = "introductionDate"; - final String attribute4Description = "Date that the product was made available."; - final String attribute4DescriptionGUID = null; - final String attribute5Name = "maturity"; - final String attribute5Description = "Level of maturity for the product."; - final String attribute5DescriptionGUID = null; - final String attribute6Name = "serviceLife"; - final String attribute6Description = "Length of time that the product is expected to be in service."; - final String attribute6DescriptionGUID = null; - final String attribute7Name = "currentVersion"; - final String attribute7Description = "Which is the current supported version that is recommended for consumers."; - final String attribute7DescriptionGUID = null; - final String attribute8Name = "nextVersion"; - final String attribute8Description = "When is the next version expected to be released."; - final String attribute8DescriptionGUID = null; - final String attribute9Name = "withdrawDate"; - final String attribute9Description = "What date what the product withdrawn, preventing new consumers."; - final String attribute9DescriptionGUID = null; - final String attribute10Name = "additionalProperties"; - final String attribute10Description = "Any additional properties needed to describe the product."; - final String attribute10DescriptionGUID = null; - - property = archiveHelper.getMapStringLongTypeDefAttribute(attribute1Name, - attribute1Description, - attribute1DescriptionGUID); - - property.setAttributeStatus(TypeDefAttributeStatus.DEPRECATED_ATTRIBUTE); - properties.add(property); - property = archiveHelper.getStringTypeDefAttribute(attribute2Name, - attribute2Description, - attribute2DescriptionGUID); - properties.add(property); - property = archiveHelper.getStringTypeDefAttribute(attribute3Name, - attribute3Description, - attribute3DescriptionGUID); - properties.add(property); - property = archiveHelper.getDateTypeDefAttribute(attribute4Name, - attribute4Description, - attribute4DescriptionGUID); - properties.add(property); - property = archiveHelper.getStringTypeDefAttribute(attribute5Name, - attribute5Description, - attribute5DescriptionGUID); - properties.add(property); - property = archiveHelper.getStringTypeDefAttribute(attribute6Name, - attribute6Description, - attribute6DescriptionGUID); - properties.add(property); - property = archiveHelper.getStringTypeDefAttribute(attribute7Name, - attribute7Description, - attribute7DescriptionGUID); - properties.add(property); - property = archiveHelper.getDateTypeDefAttribute(attribute8Name, - attribute8Description, - attribute8DescriptionGUID); - properties.add(property); - property = archiveHelper.getDateTypeDefAttribute(attribute9Name, - attribute9Description, - attribute9DescriptionGUID); - properties.add(property); - property = archiveHelper.getMapStringStringTypeDefAttribute(attribute10Name, - attribute10Description, - attribute10DescriptionGUID); - properties.add(property); - - typeDefPatch.setPropertyDefinitions(properties); - - return typeDefPatch; - } - - - /* - * ------------------------------------------------------------------------------------------------------- - */ - - private void update0715DigitalServiceOwnership() - { - this.archiveBuilder.addTypeDefPatch(updateDigitalServiceOperatorRelationship()); - } - - private TypeDefPatch updateDigitalServiceOperatorRelationship() - { - /* - * Create the Patch - */ - final String typeName = "DigitalServiceOperator"; - - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); - - typeDefPatch.setUpdatedBy(originatorName); - typeDefPatch.setUpdateTime(creationDate); - - /* - * Set up end 2. - */ - final String end2EntityType = "Referenceable"; - final String end2AttributeName = "digitalServiceOperators"; - final String end2AttributeDescription = "The unit (team, capability, ...) responsible for managing this digital service."; - final String end2AttributeDescriptionGUID = null; - final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; - - RelationshipEndDef relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), - end2AttributeName, - end2AttributeDescription, - end2AttributeDescriptionGUID, - end2Cardinality); + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); - typeDefPatch.setEndDef2(relationshipEndDef); + relationshipDef.setPropertiesDefinition(properties); - return typeDefPatch; + return relationshipDef; } - /* * ------------------------------------------------------------------------------------------------------- */ - private void update0735SolutionPortsAndWires() - { - this.archiveBuilder.addTypeDefPatch(updateSolutionLinkingWireRelationship()); - } - - private TypeDefPatch updateSolutionLinkingWireRelationship() - { - /* - * Create the Patch - */ - final String typeName = "DigitalServiceOperator"; - - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); - - typeDefPatch.setUpdatedBy(originatorName); - typeDefPatch.setUpdateTime(creationDate); - - /* - * Set up end 2. - */ - final String end2EntityType = "Referenceable"; - final String end2AttributeName = "digitalServiceOperators"; - final String end2AttributeDescription = "The unit (team, capability, ...) responsible for managing this digital service."; - final String end2AttributeDescriptionGUID = null; - final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; - - RelationshipEndDef relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), - end2AttributeName, - end2AttributeDescription, - end2AttributeDescriptionGUID, - end2Cardinality); - - - typeDefPatch.setEndDef2(relationshipEndDef); - - return typeDefPatch; - } - - - /* - * ------------------------------------------------------------------------------------------------------- - */ } diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive1_2.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive1_2.java index a6b829e30c5..494e1a9a3ed 100644 --- a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive1_2.java +++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive1_2.java @@ -6067,7 +6067,7 @@ private RelationshipDef getToDoSourceRelationship() { final String guid = "a0b7ba50-4c97-4b76-9a7d-c6a00e1be646"; final String name = "ToDoSource"; - final String description = "The source of a to do, such as a meeting or a condition detected by an engine."; + final String description = "The source of the to do, such as a person, meeting or a governance action."; final String descriptionGUID = null; final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; @@ -6122,7 +6122,7 @@ private RelationshipDef getActionsRelationship() { final String guid = "aca1277b-bf1c-42f5-9b3b-fbc2c9047325"; final String name = "Actions"; - final String description = "An action to change or support a specific project, deliverable, situation or plan of action."; + final String description = "An action to change or support a specific rule, project, deliverable, situation or plan of action."; final String descriptionGUID = null; final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; @@ -6140,10 +6140,10 @@ private RelationshipDef getActionsRelationship() * Set up end 1. */ final String end1EntityType = "Referenceable"; - final String end1AttributeName = "toDoOriginator"; - final String end1AttributeDescription = "Source of a to do request."; + final String end1AttributeName = "toDoCause"; + final String end1AttributeDescription = "Rule or meeting that is driving the need for the to do."; final String end1AttributeDescriptionGUID = null; - final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.AT_MOST_ONE; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.ANY_NUMBER; relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), end1AttributeName, @@ -10199,7 +10199,7 @@ private EntityDef getDeployedReportEntity() { final String guid = "e9077f4f-955b-4d7b-b1f7-12ee769ff0c3"; final String name = "DeployedReport"; - final String description = "A collection if data items that describe a situation."; + final String description = "A collection if data items that describe a situation. This is an instance of a report."; final String descriptionGUID = null; final String superTypeName = "DataSet"; diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_15.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_15.java new file mode 100644 index 00000000000..799bd2d3a0e --- /dev/null +++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive3_15.java @@ -0,0 +1,675 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.opentypes; + + +import org.odpi.openmetadata.repositoryservices.archiveutilities.OMRSArchiveBuilder; +import org.odpi.openmetadata.repositoryservices.archiveutilities.OMRSArchiveHelper; +import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive; +import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationPropagationRule; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndDef; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttributeStatus; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch; +import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode; +import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSLogicErrorException; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * OpenMetadataTypesArchive builds an open metadata archive containing all the standard open metadata types. + * These types have hardcoded dates and guids so that however many times this archive is rebuilt, it will + * produce the same content. + *

+ * Details of the open metadata types are documented on the wiki: + * The Open Metadata Type System + *

+ *

+ * There are 8 areas, each covering a different topic area of metadata. The module breaks down the process of creating + * the models into the areas and then the individual models to simplify the maintenance of this class + *

+ */ +public class OpenMetadataTypesArchive3_15 +{ + /* + * This is the header information for the archive. + */ + private static final String archiveGUID = "bce3b0a0-662a-4f87-b8dc-844078a11a6e"; + private static final String archiveName = "Open Metadata Types"; + private static final String archiveDescription = "Standard types for open metadata repositories."; + private static final OpenMetadataArchiveType archiveType = OpenMetadataArchiveType.CONTENT_PACK; + private static final String archiveVersion = "3.15"; + private static final String originatorName = "Egeria"; + private static final String originatorLicense = "Apache 2.0"; + private static final Date creationDate = new Date(1588261366992L); + + /* + * Specific values for initializing TypeDefs + */ + private static final long versionNumber = 1L; + private static final String versionName = "1.0"; + + + private final OMRSArchiveBuilder archiveBuilder; + private final OMRSArchiveHelper archiveHelper; + + /** + * Default constructor sets up the archive builder. This in turn sets up the header for the archive. + */ + public OpenMetadataTypesArchive3_15() + { + this.archiveBuilder = new OMRSArchiveBuilder(archiveGUID, + archiveName, + archiveDescription, + archiveType, + archiveVersion, + originatorName, + originatorLicense, + creationDate, + null); + + this.archiveHelper = new OMRSArchiveHelper(archiveBuilder, + archiveGUID, + originatorName, + creationDate, + versionNumber, + versionName); + } + + + /** + * Chained constructor sets up the archive builder. This in turn sets up the header for the archive. + * + * @param archiveBuilder accumulator for types + */ + public OpenMetadataTypesArchive3_15(OMRSArchiveBuilder archiveBuilder) + { + this.archiveBuilder = archiveBuilder; + + this.archiveHelper = new OMRSArchiveHelper(archiveBuilder, + archiveGUID, + originatorName, + creationDate, + versionNumber, + versionName); + } + + + /** + * Return the unique identifier for this archive. + * + * @return String guid + */ + public String getArchiveGUID() + { + return archiveGUID; + } + + + /** + * Returns the open metadata type archive containing all the standard open metadata types. + * + * @return populated open metadata archive object + */ + public OpenMetadataArchive getOpenMetadataArchive() + { + final String methodName = "getOpenMetadataArchive"; + + if (this.archiveBuilder != null) + { + /* + * Build the type archive. + */ + this.getOriginalTypes(); + + /* + * The completed archive is ready to be packaged up and returned + */ + return this.archiveBuilder.getOpenMetadataArchive(); + } + else + { + /* + * This is a logic error since it means the creation of the archive builder threw an exception + * in the constructor and so this object should not be used. + */ + throw new OMRSLogicErrorException(OMRSErrorCode.ARCHIVE_UNAVAILABLE.getMessageDefinition(), + this.getClass().getName(), + methodName); + } + } + + + /** + * Add the types from this archive to the archive builder supplied in the + * constructor. + */ + public void getOriginalTypes() + { + OpenMetadataTypesArchive3_14 previousTypes = new OpenMetadataTypesArchive3_14(archiveBuilder); + + /* + * Pull the types from previous releases. + */ + previousTypes.getOriginalTypes(); + + /* + * Calls for new and changed types go here + */ + updateGovernanceEngines(); + updateGovernanceActionTypes(); + updateGovernanceActions(); + update0710DigitalServices(); + update0715DigitalServiceOwnership(); + update0735SolutionPortsAndWires(); + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + + /** + * Allow a mapping from a governance engine request type to a request type supported by a governance service. + */ + private void updateGovernanceEngines() + { + this.archiveBuilder.addTypeDefPatch(updateSupportedGovernanceServiceRelationship()); + } + + + private TypeDefPatch updateSupportedGovernanceServiceRelationship() + { + /* + * Create the Patch + */ + final String typeName = "SupportedGovernanceService"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "serviceRequestType"; + final String attribute1Description = "Request type supported by the governance action service (overrides requestType on call to governance service if specified)."; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + + /** + * Adjust properties used to control the execution of governance actions. + */ + private void updateGovernanceActionTypes() + { + this.archiveBuilder.addTypeDefPatch(updateGovernanceActionTypeEntity()); + this.archiveBuilder.addTypeDefPatch(updateNextGovernanceActionTypeRelationship()); + this.archiveBuilder.addTypeDefPatch(updateNextGovernanceActionRelationship()); + } + + private TypeDefPatch updateGovernanceActionTypeEntity() + { + /* + * Create the Patch + */ + final String typeName = "GovernanceActionType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "waitTime"; + final String attribute1Description = "The minimum number of minutes that the governance engine should wait before calling the governance service."; + final String attribute1DescriptionGUID = null; + final String attribute3Name = "ignoreMultipleTriggers"; + final String attribute3Description = "Trigger one or many governance action instances?"; + final String attribute3DescriptionGUID = null; + + + property = archiveHelper.getIntTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + property = archiveHelper.getBooleanTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + + private TypeDefPatch updateNextGovernanceActionTypeRelationship() + { + /* + * Create the Patch + */ + final String typeName = "NextGovernanceActionType"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute3Name = "ignoreMultipleTriggers"; + final String attribute3Description = "Trigger one or many next action instances? (deprecated)"; + final String attribute3DescriptionGUID = null; + + property = archiveHelper.getBooleanTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + property.setAttributeStatus(TypeDefAttributeStatus.DEPRECATED_ATTRIBUTE); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + + private TypeDefPatch updateNextGovernanceActionRelationship() + { + /* + * Create the Patch + */ + final String typeName = "NextGovernanceAction"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute3Name = "ignoreMultipleTriggers"; + final String attribute3Description = "Trigger one or many next action instances? (deprecated)"; + final String attribute3DescriptionGUID = null; + + property = archiveHelper.getBooleanTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + property.setAttributeStatus(TypeDefAttributeStatus.DEPRECATED_ATTRIBUTE); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + + /** + * Allow a governance service to record a message as part of its completion. This is particularly useful if it fails. + */ + private void updateGovernanceActions() + { + this.archiveBuilder.addTypeDefPatch(updateGovernanceActionEntity()); + this.archiveBuilder.addTypeDefPatch(updateTargetForActionRelationship()); + } + + + private TypeDefPatch updateGovernanceActionEntity() + { + /* + * Create the Patch + */ + final String typeName = "GovernanceAction"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "completionMessage"; + final String attribute1Description = "Message to provide additional information on the results of running the governance service or the reasons for its failure."; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + + + private TypeDefPatch updateTargetForActionRelationship() + { + /* + * Create the Patch + */ + final String typeName = "TargetForAction"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "completionMessage"; + final String attribute1Description = "Message to provide additional information on the results of acting on the target by the governance service or the reasons for any failures."; + final String attribute1DescriptionGUID = null; + + property = archiveHelper.getStringTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void update0710DigitalServices() + { + this.archiveBuilder.addRelationshipDef(getDigitalServiceProductRelationship()); + this.archiveBuilder.addTypeDefPatch(updateDigitalProductClassification()); + } + + private RelationshipDef getDigitalServiceProductRelationship() + { + final String guid = "51465a59-c785-406d-929c-def34596e9af"; + final String name = "DigitalServiceProduct"; + final String description = "A digital product that is maintained by a digital service."; + final String descriptionGUID = null; + + final ClassificationPropagationRule classificationPropagationRule = ClassificationPropagationRule.NONE; + + RelationshipDef relationshipDef = archiveHelper.getBasicRelationshipDef(guid, + name, + null, + description, + descriptionGUID, + classificationPropagationRule); + + RelationshipEndDef relationshipEndDef; + + /* + * Set up end 1. + */ + final String end1EntityType = "DigitalService"; + final String end1AttributeName = "managingDigitalService"; + final String end1AttributeDescription = "Digital service responsible for the production of the digital product."; + final String end1AttributeDescriptionGUID = null; + final RelationshipEndCardinality end1Cardinality = RelationshipEndCardinality.AT_MOST_ONE; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end1EntityType), + end1AttributeName, + end1AttributeDescription, + end1AttributeDescriptionGUID, + end1Cardinality); + relationshipDef.setEndDef1(relationshipEndDef); + + /* + * Set up end 2. + */ + final String end2EntityType = "Referenceable"; + final String end2AttributeName = "digitalProducts"; + final String end2AttributeDescription = "The associated digital products."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + relationshipDef.setEndDef2(relationshipEndDef); + + return relationshipDef; + } + + + private TypeDefPatch updateDigitalProductClassification() + { + /* + * Create the Patch + */ + final String typeName = "DigitalProduct"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + final String attribute1Name = "syncDatesByKey"; + final String attribute1Description = "Collection of synchronization dates identified by a key (deprecated, added in error)."; + final String attribute1DescriptionGUID = null; + final String attribute2Name = "productName"; + final String attribute2Description = "Display name of the product."; + final String attribute2DescriptionGUID = null; + final String attribute3Name = "productType"; + final String attribute3Description = "Type or category of the product."; + final String attribute3DescriptionGUID = null; + final String attribute4Name = "introductionDate"; + final String attribute4Description = "Date that the product was made available."; + final String attribute4DescriptionGUID = null; + final String attribute5Name = "maturity"; + final String attribute5Description = "Level of maturity for the product."; + final String attribute5DescriptionGUID = null; + final String attribute6Name = "serviceLife"; + final String attribute6Description = "Length of time that the product is expected to be in service."; + final String attribute6DescriptionGUID = null; + final String attribute7Name = "currentVersion"; + final String attribute7Description = "Which is the current supported version that is recommended for consumers."; + final String attribute7DescriptionGUID = null; + final String attribute8Name = "nextVersion"; + final String attribute8Description = "When is the next version expected to be released."; + final String attribute8DescriptionGUID = null; + final String attribute9Name = "withdrawDate"; + final String attribute9Description = "What date what the product withdrawn, preventing new consumers."; + final String attribute9DescriptionGUID = null; + final String attribute10Name = "additionalProperties"; + final String attribute10Description = "Any additional properties needed to describe the product."; + final String attribute10DescriptionGUID = null; + + property = archiveHelper.getMapStringLongTypeDefAttribute(attribute1Name, + attribute1Description, + attribute1DescriptionGUID); + + property.setAttributeStatus(TypeDefAttributeStatus.DEPRECATED_ATTRIBUTE); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute2Name, + attribute2Description, + attribute2DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute3Name, + attribute3Description, + attribute3DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute4Name, + attribute4Description, + attribute4DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute5Name, + attribute5Description, + attribute5DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute6Name, + attribute6Description, + attribute6DescriptionGUID); + properties.add(property); + property = archiveHelper.getStringTypeDefAttribute(attribute7Name, + attribute7Description, + attribute7DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute8Name, + attribute8Description, + attribute8DescriptionGUID); + properties.add(property); + property = archiveHelper.getDateTypeDefAttribute(attribute9Name, + attribute9Description, + attribute9DescriptionGUID); + properties.add(property); + property = archiveHelper.getMapStringStringTypeDefAttribute(attribute10Name, + attribute10Description, + attribute10DescriptionGUID); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void update0715DigitalServiceOwnership() + { + this.archiveBuilder.addTypeDefPatch(updateDigitalServiceOperatorRelationship()); + } + + private TypeDefPatch updateDigitalServiceOperatorRelationship() + { + /* + * Create the Patch + */ + final String typeName = "DigitalServiceOperator"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Set up end 2. + */ + final String end2EntityType = "Referenceable"; + final String end2AttributeName = "digitalServiceOperators"; + final String end2AttributeDescription = "The unit (team, capability, ...) responsible for managing this digital service."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + RelationshipEndDef relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + + + typeDefPatch.setEndDef2(relationshipEndDef); + + return typeDefPatch; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void update0735SolutionPortsAndWires() + { + this.archiveBuilder.addTypeDefPatch(updateSolutionLinkingWireRelationship()); + } + + private TypeDefPatch updateSolutionLinkingWireRelationship() + { + /* + * Create the Patch + */ + final String typeName = "DigitalServiceOperator"; + + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Set up end 2. + */ + final String end2EntityType = "Referenceable"; + final String end2AttributeName = "digitalServiceOperators"; + final String end2AttributeDescription = "The unit (team, capability, ...) responsible for managing this digital service."; + final String end2AttributeDescriptionGUID = null; + final RelationshipEndCardinality end2Cardinality = RelationshipEndCardinality.ANY_NUMBER; + + RelationshipEndDef relationshipEndDef = archiveHelper.getRelationshipEndDef(this.archiveBuilder.getEntityDef(end2EntityType), + end2AttributeName, + end2AttributeDescription, + end2AttributeDescriptionGUID, + end2Cardinality); + + + typeDefPatch.setEndDef2(relationshipEndDef); + + return typeDefPatch; + } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ +} + diff --git a/open-metadata-test/open-metadata-fvt/fvt-utilities/src/main/java/org/odpi/openmetadata/fvt/utilities/auditlog/FVTAuditLogDestination.java b/open-metadata-test/open-metadata-fvt/fvt-utilities/src/main/java/org/odpi/openmetadata/fvt/utilities/auditlog/FVTAuditLogDestination.java index 35502b9c006..408d1ed0f89 100644 --- a/open-metadata-test/open-metadata-fvt/fvt-utilities/src/main/java/org/odpi/openmetadata/fvt/utilities/auditlog/FVTAuditLogDestination.java +++ b/open-metadata-test/open-metadata-fvt/fvt-utilities/src/main/java/org/odpi/openmetadata/fvt/utilities/auditlog/FVTAuditLogDestination.java @@ -14,7 +14,7 @@ */ public class FVTAuditLogDestination extends AuditLogDestination { - private volatile List auditLogRecords = new ArrayList<>(); + private final List auditLogRecords = new ArrayList<>(); /** * Add the new log record to the audit log.