diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwner.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwner.java index f5554b3e5b1..ead9bd5c4c6 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwner.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwner.java @@ -1870,7 +1870,7 @@ public List findSchemaAttributes(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/by-search-string?startFrom={2}&pageSize={3}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + SchemaAttributesResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -1913,14 +1913,14 @@ public List getNestedSchemaAttributes(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-elements/{2}/schema-attributes/retrieve?startFrom={3}&pageSize={4}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, - urlTemplate, - new EffectiveTimeQueryRequestBody(), - serverName, - userId, - parentSchemaElementGUID, - startFrom, - validatedPageSize); + SchemaAttributesResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + urlTemplate, + new EffectiveTimeQueryRequestBody(), + serverName, + userId, + parentSchemaElementGUID, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -1964,13 +1964,13 @@ public List getSchemaAttributesByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/by-name?startFrom={2}&pageSize={3}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + SchemaAttributesResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -2002,7 +2002,7 @@ public SchemaAttributeElement getSchemaAttributeByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/{2}/retrieve"; - SchemaAttributeElementResponse restResult = restClient.callSchemaAttributePostRESTCall(methodName, + SchemaAttributeResponse restResult = restClient.callSchemaAttributePostRESTCall(methodName, urlTemplate, new EffectiveTimeQueryRequestBody(), serverName, diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerRESTServices.java index c8032808ca9..97d9fab8f17 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerRESTServices.java @@ -3356,19 +3356,19 @@ public VoidResponse removeSchemaAttribute(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SchemaAttributeElementsResponse findSchemaAttributes(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public SchemaAttributesResponse findSchemaAttributes(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findSchemaAttributes"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SchemaAttributeElementsResponse response = new SchemaAttributeElementsResponse(); - AuditLog auditLog = null; + SchemaAttributesResponse response = new SchemaAttributesResponse(); + AuditLog auditLog = null; try { @@ -3423,20 +3423,20 @@ public SchemaAttributeElementsResponse findSchemaAttributes(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SchemaAttributeElementsResponse getNestedAttributes(String serverName, - String userId, - String schemaTypeGUID, - int startFrom, - int pageSize, - EffectiveTimeQueryRequestBody requestBody) + public SchemaAttributesResponse getNestedAttributes(String serverName, + String userId, + String schemaTypeGUID, + int startFrom, + int pageSize, + EffectiveTimeQueryRequestBody requestBody) { final String methodName = "getNestedAttributes"; final String elementGUIDParameterName = "schemaAttributeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SchemaAttributeElementsResponse response = new SchemaAttributeElementsResponse(); - AuditLog auditLog = null; + SchemaAttributesResponse response = new SchemaAttributesResponse(); + AuditLog auditLog = null; try { @@ -3488,18 +3488,18 @@ public SchemaAttributeElementsResponse getNestedAttributes(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SchemaAttributeElementsResponse getSchemaAttributesByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public SchemaAttributesResponse getSchemaAttributesByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getSchemaAttributesByName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SchemaAttributeElementsResponse response = new SchemaAttributeElementsResponse(); - AuditLog auditLog = null; + SchemaAttributesResponse response = new SchemaAttributesResponse(); + AuditLog auditLog = null; try { @@ -3551,18 +3551,18 @@ public SchemaAttributeElementsResponse getSchemaAttributesByName(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SchemaAttributeElementResponse getSchemaAttributeByGUID(String serverName, - String userId, - String schemaAttributeGUID, - EffectiveTimeQueryRequestBody requestBody) + public SchemaAttributeResponse getSchemaAttributeByGUID(String serverName, + String userId, + String schemaAttributeGUID, + EffectiveTimeQueryRequestBody requestBody) { final String methodName = "getSchemaAttributeByGUID"; final String guidParameterName = "schemaAttributeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SchemaAttributeElementResponse response = new SchemaAttributeElementResponse(); - AuditLog auditLog = null; + SchemaAttributeResponse response = new SchemaAttributeResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetOwnerResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetOwnerResource.java index 75dde2eb505..03dfb499b45 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetOwnerResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetOwnerResource.java @@ -1059,11 +1059,11 @@ public VoidResponse removeSchemaAttribute(@PathVariable String server */ @PostMapping(path = "/schema-attributes/by-search-string") - public SchemaAttributeElementsResponse findSchemaAttributes(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public SchemaAttributesResponse findSchemaAttributes(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findSchemaAttributes(serverName, userId, startFrom, pageSize, requestBody); } @@ -1086,12 +1086,12 @@ public SchemaAttributeElementsResponse findSchemaAttributes(@PathVariable String */ @PostMapping(path = "/schema-elements/{parentSchemaElementGUID}/schema-attributes/retrieve") - public SchemaAttributeElementsResponse getNestedAttributes(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String parentSchemaElementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody EffectiveTimeQueryRequestBody requestBody) + public SchemaAttributesResponse getNestedAttributes(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String parentSchemaElementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.getNestedAttributes(serverName, userId, parentSchemaElementGUID, startFrom, pageSize, requestBody); } @@ -1114,11 +1114,11 @@ public SchemaAttributeElementsResponse getNestedAttributes(@PathVariable String */ @PostMapping(path = "/schema-attributes/by-name") - public SchemaAttributeElementsResponse getSchemaAttributesByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public SchemaAttributesResponse getSchemaAttributesByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getSchemaAttributesByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -1139,10 +1139,10 @@ public SchemaAttributeElementsResponse getSchemaAttributesByName(@PathVariable S */ @PostMapping(path = "/schema-attributes/{schemaAttributeGUID}/retrieve") - public SchemaAttributeElementResponse getSchemaAttributeByGUID(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String schemaAttributeGUID, - @RequestBody EffectiveTimeQueryRequestBody requestBody) + public SchemaAttributeResponse getSchemaAttributeByGUID(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String schemaAttributeGUID, + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.getSchemaAttributeByGUID(serverName, userId, schemaAttributeGUID, requestBody); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/SchemaManagerClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/SchemaManagerClient.java index aeaa27122f9..8adb02368fd 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/SchemaManagerClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/SchemaManagerClient.java @@ -1400,7 +1400,7 @@ public List findSchemaAttributes(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + SchemaAttributesResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -1503,7 +1503,7 @@ public List getSchemaAttributesByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + SchemaAttributesResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, urlTemplate, requestBody, serverName, diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerServicesInstance.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerServicesInstance.java index e434567b2dd..7bab1c7d7db 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerServicesInstance.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerServicesInstance.java @@ -32,7 +32,7 @@ public class DataManagerServicesInstance extends OMASServiceInstance DatabaseTableElement, DatabaseViewElement, DatabaseColumnElement, - SchemaTypeElement> relationalDataHandler; + SchemaTypeElement> relationalDataHandler; private final FilesAndFoldersHandler filesAndFoldersHandler; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCRESTClient.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCRESTClient.java index df95f910644..3b4a446d04f 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCRESTClient.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCRESTClient.java @@ -3696,7 +3696,7 @@ public LicenseTypesResponse callLicenseTypeListPostRESTCall(String methodName /** - * Issue a POST REST call that returns a SchemaAttributeElementResponse object. + * Issue a POST REST call that returns a SchemaAttributeResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -3708,14 +3708,14 @@ public LicenseTypesResponse callLicenseTypeListPostRESTCall(String methodName * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public SchemaAttributeElementResponse callSchemaAttributePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public SchemaAttributeResponse callSchemaAttributePostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - SchemaAttributeElementResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeElementResponse.class, urlTemplate, requestBody, params); + SchemaAttributeResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -3724,7 +3724,7 @@ public SchemaAttributeElementResponse callSchemaAttributePostRESTCall(String /** - * Issue a POST REST call that returns a SchemaAttributeElementsResponse object. + * Issue a POST REST call that returns a SchemaAttributesResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -3736,14 +3736,14 @@ public SchemaAttributeElementResponse callSchemaAttributePostRESTCall(String * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public SchemaAttributeElementsResponse callSchemaAttributesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public SchemaAttributesResponse callSchemaAttributesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - SchemaAttributeElementsResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeElementsResponse.class, urlTemplate, requestBody, params); + SchemaAttributesResponse restResult = this.callPostRESTCall(methodName, SchemaAttributesResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeElementResponse.java deleted file mode 100644 index d4b0fc6e94b..00000000000 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeElementResponse.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.commonservices.ffdc.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SchemaAttributeElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeElementResponse extends FFDCResponseBase -{ - private SchemaAttributeElement element = null; - - - /** - * Default constructor - */ - public SchemaAttributeElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaAttributeElementResponse(SchemaAttributeElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public SchemaAttributeElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(SchemaAttributeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributeElementResponse{" + - "element=" + element + - "} " + super.toString(); - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof SchemaAttributeElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeElementResponse that = (SchemaAttributeElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeElementsResponse.java deleted file mode 100644 index dc65e983e34..00000000000 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeElementsResponse.java +++ /dev/null @@ -1,125 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.commonservices.ffdc.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaAttributeElementsResponse is a response object for passing back a a list of glossaries - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeElementsResponse extends FFDCResponseBase -{ - private List elements = null; - - - /** - * Default constructor - */ - public SchemaAttributeElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaAttributeElementsResponse(SchemaAttributeElementsResponse template) - { - super(template); - - if (template != null) - { - elements = template.getElements(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElements() - { - return elements; - } - - - /** - * Set up the metadata element to return. - * - * @param elements result object - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributeElementsResponse{" + - "elements=" + elements + - "} " + super.toString(); - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeElementsResponse that = (SchemaAttributeElementsResponse) objectToCompare; - return Objects.equals(elements, that.elements); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseColumnConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseColumnConverter.java index 27b0221ce7f..691899a4dae 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseColumnConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseColumnConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; + import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DerivedSchemaTypeQueryTargetProperties; @@ -83,7 +83,6 @@ public B getNewSchemaAttributeBean(Class beanClass, if (schemaType instanceof SchemaTypeElement schemaTypeElement) { - super.addSchemaTypeToAttribute(schemaTypeElement, properties); properties.setFormula(schemaTypeElement.getFormula()); diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java index b9964b6e33c..401597eda3e 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java @@ -1183,7 +1183,10 @@ public void setUpSchemaAttribute(EntityDetail schemaAttributeEntity /** - * Set up the properties that can be extracted form the schema type. + * Set up the properties that can be extracted form the schema type. There are two strategies to try. + * The Schema Type Converter in the OCF creates a bean of a specific type to reflect the type of schema. + * The Schema Type Converter in the generic handler always creates a bean of type SchemaTypeProperties with the + * subtype's properties in extendedProperties. * * @param schemaTypeElement schema type properties * @param attributeProperties output column properties @@ -1211,11 +1214,37 @@ else if (schemaTypeProperties instanceof EnumSchemaTypeProperties) } else if (schemaTypeProperties instanceof ExternalSchemaTypeProperties) { - attributeProperties.setDataType(((ExternalSchemaTypeProperties) schemaTypeProperties).getDataType()); - SchemaTypeElement externalSchemaType = schemaTypeElement.getExternalSchemaType(); attributeProperties.setExternalTypeGUID(externalSchemaType.getElementHeader().getGUID()); } + else + { + /* + * The schema type is unspecialized, so just pull any additional properties out of extended properties. + */ + if (schemaTypeProperties.getExtendedProperties() != null) + { + Map extendedProperties = schemaTypeProperties.getExtendedProperties(); + + Object propertyObject = extendedProperties.get(OpenMetadataProperty.DATA_TYPE.name); + if (propertyObject != null) + { + attributeProperties.setDataType(propertyObject.toString()); + } + + propertyObject = extendedProperties.get(OpenMetadataProperty.FIXED_VALUE.name); + if (propertyObject != null) + { + attributeProperties.setFixedValue(propertyObject.toString()); + } + + propertyObject = extendedProperties.get(OpenMetadataProperty.DEFAULT_VALUE.name); + if (propertyObject != null) + { + attributeProperties.setDefaultValue(propertyObject.toString()); + } + } + } attributeProperties.setSchemaType(schemaTypeProperties); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/RelationshipProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/RelationshipProperties.java index 2d2959d5896..baf0bf4140d 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/RelationshipProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/RelationshipProperties.java @@ -41,6 +41,7 @@ import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeRelationshipProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseForeignKeyProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.CapabilityDeploymentProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; @@ -103,6 +104,7 @@ @JsonSubTypes.Type(value = ProjectTeamProperties.class, name = "ProjectTeamProperties"), @JsonSubTypes.Type(value = ReferenceValueAssignmentProperties.class, name = "ReferenceValueAssignmentProperties"), @JsonSubTypes.Type(value = ResourceListProperties.class, name = "ResourceListProperties"), + @JsonSubTypes.Type(value = SchemaAttributeRelationshipProperties.class, name = "SchemaAttributeRelationshipProperties"), @JsonSubTypes.Type(value = SemanticAssignmentProperties.class, name = "SemanticAssignmentProperties"), @JsonSubTypes.Type(value = StakeholderProperties.class, name = "StakeholderProperties"), @JsonSubTypes.Type(value = ServerAssetUseProperties.class, name = "ServerAssetUseProperties"), diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataAssetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataAssetProperties.java index ea53c30ae45..be6e378763b 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataAssetProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataAssetProperties.java @@ -25,8 +25,8 @@ include = JsonTypeInfo.As.PROPERTY, property = "class") @JsonSubTypes({ - @JsonSubTypes.Type(value = DataStoreProperties.class, name = "DataFileProperties"), - @JsonSubTypes.Type(value = DatabaseProperties.class, name = "DatabaseProperties"), + @JsonSubTypes.Type(value = DataStoreProperties.class, name = "DataStoreProperties"), + @JsonSubTypes.Type(value = DataSetProperties.class, name = "DataSetProperties"), }) diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ComplexSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ComplexSchemaTypeProperties.java index 98e47a81dea..cc6eaedb7f9 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ComplexSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ComplexSchemaTypeProperties.java @@ -23,9 +23,9 @@ include = JsonTypeInfo.As.PROPERTY, property = "class") @JsonSubTypes({ - @JsonSubTypes.Type(value = APIParameterListProperties.class, name = "APIParameterListProperties"), - @JsonSubTypes.Type(value = StructSchemaTypeProperties.class, name = "StructSchemaTypeProperties"), - @JsonSubTypes.Type(value = TabularSchemaTypeProperties.class, name = "TabularSchemaTypeProperties"), + @JsonSubTypes.Type(value = RootSchemaTypeProperties.class, name = "RootSchemaTypeProperties"), + @JsonSubTypes.Type(value = StructSchemaTypeProperties.class, name = "StructSchemaTypeProperties"), + @JsonSubTypes.Type(value = APIParameterListProperties.class, name = "APIParameterListProperties"), }) public class ComplexSchemaTypeProperties extends SchemaTypeProperties { @@ -57,20 +57,6 @@ public ComplexSchemaTypeProperties(ComplexSchemaTypeProperties template) @Override public String toString() { - return "ComplexSchemaTypeProperties{" + - "versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "ComplexSchemaTypeProperties{} " + super.toString(); } } \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldQueryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldQueryProperties.java index 3c9399a36b7..447b231a725 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldQueryProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldQueryProperties.java @@ -153,14 +153,13 @@ public void setNamePattern(List namePattern) public String toString() { return "DataFieldQueryProperties{" + - "defaultValue='" + defaultValue + '\'' + - ", sampleValues=" + sampleValues + - ", dataPattern=" + dataPattern + - ", namePattern=" + namePattern + - '}'; + "defaultValue='" + defaultValue + '\'' + + ", sampleValues=" + sampleValues + + ", dataPattern=" + dataPattern + + ", namePattern=" + namePattern + + "} " + super.toString(); } - /** * Compare the values of the supplied object with those stored in the current object. * diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldValuesProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldValuesProperties.java index 8378946f237..8b6736d8216 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldValuesProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldValuesProperties.java @@ -154,14 +154,11 @@ public void setNamePattern(List namePattern) public String toString() { return "DataFieldValuesProperties{" + - "defaultValue='" + defaultValue + '\'' + - ", sampleValues=" + sampleValues + - ", dataPattern='" + dataPattern + '\'' + - ", namePattern='" + namePattern + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "defaultValue='" + defaultValue + '\'' + + ", sampleValues=" + sampleValues + + ", dataPattern=" + dataPattern + + ", namePattern=" + namePattern + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DerivedSchemaTypeQueryTargetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DerivedSchemaTypeQueryTargetProperties.java index b0e7c979e6b..3bd637a6ca0 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DerivedSchemaTypeQueryTargetProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DerivedSchemaTypeQueryTargetProperties.java @@ -168,11 +168,10 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof DerivedSchemaTypeQueryTargetProperties)) + if (!(objectToCompare instanceof DerivedSchemaTypeQueryTargetProperties that)) { return false; } - DerivedSchemaTypeQueryTargetProperties that = (DerivedSchemaTypeQueryTargetProperties) objectToCompare; return Objects.equals(getQueryId(), that.getQueryId()) && Objects.equals(getQuery(), that.getQuery()) && Objects.equals(getQueryType(), that.getQueryType()) && diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/EnumSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/EnumSchemaTypeProperties.java index c1539b99303..826c3cac698 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/EnumSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/EnumSchemaTypeProperties.java @@ -39,6 +39,11 @@ public EnumSchemaTypeProperties() public EnumSchemaTypeProperties(EnumSchemaTypeProperties template) { super(template); + + if (template != null) + { + validValueSetGUID = template.getValidValueSetGUID(); + } } @@ -73,22 +78,8 @@ public void setValidValueSetGUID(String validValueSetGUID) public String toString() { return "EnumSchemaTypeProperties{" + - "validValueSet='" + validValueSetGUID + '\'' + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "validValueSetGUID='" + validValueSetGUID + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ExternalSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ExternalSchemaTypeProperties.java index affaf7cc93a..2d42ba51de9 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ExternalSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ExternalSchemaTypeProperties.java @@ -16,7 +16,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalSchemaTypeProperties extends SimpleSchemaTypeProperties +public class ExternalSchemaTypeProperties extends SchemaTypeProperties { /** * Default constructor @@ -46,22 +46,6 @@ public ExternalSchemaTypeProperties(ExternalSchemaTypeProperties template) @Override public String toString() { - return "ExternalSchemaTypeProperties{" + - " dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "ExternalSchemaTypeProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/LiteralSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/LiteralSchemaTypeProperties.java index 89481881335..1e776e4f927 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/LiteralSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/LiteralSchemaTypeProperties.java @@ -17,7 +17,6 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) - public class LiteralSchemaTypeProperties extends SchemaTypeProperties { private String dataType = null; @@ -100,18 +99,7 @@ public String toString() return "LiteralSchemaTypeProperties{" + "dataType='" + dataType + '\'' + ", fixedValue='" + fixedValue + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/MapSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/MapSchemaTypeProperties.java index 6a9d8340dbe..e6f7874aa8b 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/MapSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/MapSchemaTypeProperties.java @@ -47,19 +47,6 @@ public MapSchemaTypeProperties(MapSchemaTypeProperties template) @Override public String toString() { - return "MapSchemaTypeProperties{" + - "versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "MapSchemaTypeProperties{} " + super.toString(); } } \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimitiveSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimitiveSchemaTypeProperties.java index 1cf3869045d..183c0fc2200 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimitiveSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimitiveSchemaTypeProperties.java @@ -44,22 +44,6 @@ public PrimitiveSchemaTypeProperties(PrimitiveSchemaTypeProperties template) @Override public String toString() { - return "PrimitiveSchemaTypeProperties{" + - "dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "PrimitiveSchemaTypeProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/RootSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/RootSchemaTypeProperties.java new file mode 100644 index 00000000000..7fe6bb6d3a9 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/RootSchemaTypeProperties.java @@ -0,0 +1,81 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APISchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularSchemaTypeProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ComplexSchemaTypeProperties describes a schema with multiple attributes. Notice it does not contain the attributes. + * This is because a complex schema type may have literally thousands of attributes + * and so the attribute contents are retrieved separated through calls that support paging. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = APISchemaTypeProperties.class, name = "APISchemaTypeProperties"), + @JsonSubTypes.Type(value = TabularSchemaTypeProperties.class, name = "TabularSchemaTypeProperties"), + @JsonSubTypes.Type(value = DatabaseSchemaTypeProperties.class, name = "DatabaseSchemaTypeProperties"), + @JsonSubTypes.Type(value = EventTypeProperties.class, name = "EventTypeProperties"), + }) +public class RootSchemaTypeProperties extends ComplexSchemaTypeProperties +{ + /** + * Default constructor used by subclasses + */ + public RootSchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public RootSchemaTypeProperties(RootSchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ComplexSchemaTypeProperties{" + + "versionNumber='" + getVersionNumber() + '\'' + + ", author='" + getAuthor() + '\'' + + ", usage='" + getUsage() + '\'' + + ", encodingStandard='" + getEncodingStandard() + '\'' + + ", namespace='" + getNamespace() + '\'' + + ", isDeprecated=" + getIsDeprecated() + + ", displayName='" + getDisplayName() + '\'' + + ", description='" + getDescription() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", vendorProperties=" + getVendorProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeProperties.java index 882555befab..2e28359e0f7 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeProperties.java @@ -5,6 +5,9 @@ import com.fasterxml.jackson.annotation.*; import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseTableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventSchemaAttributeProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularColumnProperties; import java.util.ArrayList; @@ -25,6 +28,9 @@ @JsonSubTypes( { @JsonSubTypes.Type(value = TabularColumnProperties.class, name = "TabularColumnProperties"), + @JsonSubTypes.Type(value = DatabaseTableProperties.class, name = "DatabaseTableProperties"), + @JsonSubTypes.Type(value = EventSchemaAttributeProperties.class, name = "EventSchemaAttributeProperties"), + @JsonSubTypes.Type(value = APIParameterProperties.class, name = "APIParameterProperties"), }) public class SchemaAttributeProperties extends SchemaElementProperties { @@ -390,16 +396,7 @@ public void setNativeJavaClass(String nativeJavaClass) */ public List getAliases() { - if (aliases == null) - { - return null; - } - else if (aliases.isEmpty()) - { - return null; - } - - return new ArrayList<>(aliases); + return aliases; } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeRelationshipProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeRelationshipProperties.java index 86439666a4e..a133737a224 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeRelationshipProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeRelationshipProperties.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.HashMap; import java.util.Map; @@ -21,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeRelationshipProperties +public class SchemaAttributeRelationshipProperties extends RelationshipProperties { private String linkGUID = null; private String linkType = null; @@ -130,18 +131,7 @@ public void setLinkedAttributeName(String linkedAttributeName) */ public Map getLinkProperties() { - if (linkProperties == null) - { - return null; - } - else if (linkProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(linkProperties); - } + return linkProperties; } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeProperties.java index 42e71c6b852..4b20c0130ba 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeProperties.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularSchemaTypeProperties; import java.util.ArrayList; import java.util.List; @@ -17,6 +19,18 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = ComplexSchemaTypeProperties.class, name = "ComplexSchemaTypeProperties"), + @JsonSubTypes.Type(value = ExternalSchemaTypeProperties.class, name = "ExternalSchemaTypeProperties"), + @JsonSubTypes.Type(value = LiteralSchemaTypeProperties.class, name = "LiteralSchemaTypeProperties"), + @JsonSubTypes.Type(value = MapSchemaTypeProperties.class, name = "MapSchemaTypeProperties"), + @JsonSubTypes.Type(value = SchemaTypeChoiceProperties.class, name = "SchemaTypeChoiceProperties"), + @JsonSubTypes.Type(value = SimpleSchemaTypeProperties.class, name = "SimpleSchemaTypeProperties"), +}) public class SchemaTypeProperties extends SchemaElementProperties { private String versionNumber = null; @@ -214,18 +228,7 @@ public void setFormulaType(String formulaType) */ public List getQueries() { - if (queries == null) - { - return null; - } - else if (queries.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(queries); - } + return queries; } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SimpleSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SimpleSchemaTypeProperties.java index 09a24ef29a4..0c976c9e8f4 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SimpleSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SimpleSchemaTypeProperties.java @@ -23,7 +23,6 @@ { @JsonSubTypes.Type(value = PrimitiveSchemaTypeProperties.class, name = "PrimitiveSchemaTypeProperties"), @JsonSubTypes.Type(value = EnumSchemaTypeProperties.class, name = "EnumSchemaTypeProperties"), - @JsonSubTypes.Type(value = ExternalSchemaTypeProperties.class, name = "ExternalSchemaTypeProperties"), }) public class SimpleSchemaTypeProperties extends SchemaTypeProperties { diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIOperationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIOperationProperties.java index b928cbf8c5c..4b857395a68 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIOperationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIOperationProperties.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ComplexSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import java.util.Objects; @@ -19,7 +19,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class APIOperationProperties extends ComplexSchemaTypeProperties +public class APIOperationProperties extends SchemaTypeProperties { private String path = null; private String command = null; @@ -104,22 +104,9 @@ public void setCommand(String command) public String toString() { return "APIOperationProperties{" + - "path='" + path + '\'' + - ", command='" + command + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "path='" + path + '\'' + + ", command='" + command + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterListProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterListProperties.java index 722ca653f68..3e432a2f2bc 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterListProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterListProperties.java @@ -79,21 +79,8 @@ public void setRequired(boolean required) public String toString() { return "APIParameterListProperties{" + - "required='" + required + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "required=" + required + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APISchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APISchemaTypeProperties.java new file mode 100644 index 00000000000..14c2fab0533 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APISchemaTypeProperties.java @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.RootSchemaTypeProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APISchemaTypeProperties provides the root schema type for an API specification that includes the operations, + * and their parameters, headers and responses. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APISchemaTypeProperties extends RootSchemaTypeProperties +{ + /** + * Default constructor used by subclasses + */ + public APISchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public APISchemaTypeProperties(APISchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "APISchemaTypeProperties{} " + super.toString(); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseColumnProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseColumnProperties.java index 9daf695cf5d..ce1f18658a1 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseColumnProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseColumnProperties.java @@ -103,38 +103,9 @@ public void setQueries(List queries) public String toString() { return "DatabaseColumnProperties{" + - "formula='" + formula + '\'' + - ", queries=" + queries + - ", elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", allowsDuplicateValues=" + getAllowsDuplicateValues() + - ", orderedValues=" + getOrderedValues() + - ", sortOrder=" + getSortOrder() + - ", minimumLength=" + getMinimumLength() + - ", length=" + getLength() + - ", precision=" + getPrecision() + - ", significantDigits=" + getSignificantDigits() + - ", isNullable=" + getIsNullable() + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", nativeJavaClass='" + getNativeJavaClass() + '\'' + - ", aliases=" + getAliases() + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", externalTypeGUID='" + getExternalTypeGUID() + '\'' + - ", validValuesSetGUID='" + getValidValuesSetGUID() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "formula='" + formula + '\'' + + ", queries=" + queries + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseForeignKeyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseForeignKeyProperties.java index cd978cbecb1..e0b5f641b9c 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseForeignKeyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseForeignKeyProperties.java @@ -179,15 +179,12 @@ public String getSource() public String toString() { return "DatabaseForeignKeyProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", confidence=" + confidence + - ", steward='" + steward + '\'' + - ", source='" + source + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "name='" + name + '\'' + + ", description='" + description + '\'' + + ", confidence=" + confidence + + ", steward='" + steward + '\'' + + ", source='" + source + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabasePrimaryKeyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabasePrimaryKeyProperties.java index 8605888bc5f..16975502f83 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabasePrimaryKeyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabasePrimaryKeyProperties.java @@ -129,7 +129,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof DatabasePrimaryKeyProperties)) + if (! (objectToCompare instanceof DatabasePrimaryKeyProperties that)) { return false; } @@ -137,7 +137,6 @@ public boolean equals(Object objectToCompare) { return false; } - DatabasePrimaryKeyProperties that = (DatabasePrimaryKeyProperties) objectToCompare; return Objects.equals(name, that.name) && keyPattern == that.keyPattern; } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseSchemaTypeProperties.java index b6fe9e23a69..b77f1d06a5b 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseSchemaTypeProperties.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.RootSchemaTypeProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -18,7 +19,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseSchemaTypeProperties extends ReferenceableProperties +public class DatabaseSchemaTypeProperties extends RootSchemaTypeProperties { /** * Default constructor @@ -47,14 +48,6 @@ public DatabaseSchemaTypeProperties(DatabaseSchemaTypeProperties template) @Override public String toString() { - return "DatabaseSchemaTypeProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "DatabaseSchemaTypeProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseTableProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseTableProperties.java index 9c6e73f6dca..53ed356e0b0 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseTableProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseTableProperties.java @@ -4,6 +4,7 @@ package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaElementProperties; import java.util.ArrayList; @@ -24,11 +25,8 @@ { @JsonSubTypes.Type(value = DatabaseViewProperties.class, name = "DatabaseViewProperties"), }) -public class DatabaseTableProperties extends SchemaElementProperties +public class DatabaseTableProperties extends SchemaAttributeProperties { - private List aliases = null; - - /** * Default constructor */ @@ -46,41 +44,8 @@ public DatabaseTableProperties() public DatabaseTableProperties(DatabaseTableProperties template) { super(template); - } - - /** - * Return a list of alternative names for the table. - * - * @return list of names - */ - public List getAliases() - { - if (aliases == null) - { - return null; - } - else if (aliases.isEmpty()) - { - return null; - } - - return new ArrayList<>(aliases); - } - - - /** - * Set up a list of alternative names for the table. - * - * @param aliases list of names - */ - public void setAliases(List aliases) - { - this.aliases = aliases; - } - - /** * Standard toString method. * @@ -89,16 +54,6 @@ public void setAliases(List aliases) @Override public String toString() { - return "DatabaseTableProperties{" + - "aliases=" + aliases + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "DatabaseTableProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseViewProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseViewProperties.java index c1d02c3b9f4..393fb41687d 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseViewProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseViewProperties.java @@ -103,18 +103,9 @@ public void setQueries(List queries) public String toString() { return "DatabaseViewProperties{" + - "formula='" + formula + '\'' + - ", queries=" + queries + - ", deprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", aliases='" + getAliases() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "formula='" + formula + '\'' + + ", queries=" + queries + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataContainerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataContainerProperties.java index c120178bf88..fa2d7a726db 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataContainerProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataContainerProperties.java @@ -4,7 +4,7 @@ package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaElementProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; import java.util.Objects; @@ -17,7 +17,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class DataContainerProperties extends SchemaElementProperties +public class DataContainerProperties extends SchemaAttributeProperties { private int elementPosition = 0; private int minCardinality = 0; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventSchemaAttributeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventSchemaAttributeProperties.java index 515d8629451..1b3a28b59dd 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventSchemaAttributeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventSchemaAttributeProperties.java @@ -10,8 +10,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * TabularColumnProperties is a class for representing a column within a table type structure. - * Tabular columns are schema attributes with a simple type attached + * EventSchemaAttributeProperties is a class for representing a field within an event structure. + * They are schema attributes and can have either a simple or complex type attached. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeListProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeListProperties.java index abd09455abe..9defcbd6970 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeListProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeListProperties.java @@ -47,20 +47,6 @@ public EventTypeListProperties(EventTypeListProperties template) @Override public String toString() { - return "EventTypeListProperties{" + - "versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "EventTypeListProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeProperties.java index 9d127ad78e6..d1176100eda 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeProperties.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ComplexSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.RootSchemaTypeProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -17,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class EventTypeProperties extends ComplexSchemaTypeProperties +public class EventTypeProperties extends RootSchemaTypeProperties { /** * Default constructor diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularSchemaTypeProperties.java index a90bd9be672..07ab02668dd 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularSchemaTypeProperties.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.*; import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ComplexSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.RootSchemaTypeProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -17,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class TabularSchemaTypeProperties extends ComplexSchemaTypeProperties +public class TabularSchemaTypeProperties extends RootSchemaTypeProperties { /** * Default constructor used by subclasses diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/types/OpenMetadataProperty.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/types/OpenMetadataProperty.java index 13b08a82d02..482a21ec706 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/types/OpenMetadataProperty.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/types/OpenMetadataProperty.java @@ -363,6 +363,16 @@ public enum OpenMetadataProperty */ DATA_TYPE("dataType", "string", "The name of a primitive data type.", null, "50e73f9f-10a0-4b41-9cb6-bf55630f3734"), + /** + * The default value of a primitive data type. + */ + DEFAULT_VALUE("defaultValue", "string", "The default value of a primitive data type.", null, "e2ac5648-054c-492f-9818-bb1c55554bd6"), + + /** + * The value of a literal data type. + */ + FIXED_VALUE("fixedValue", "string", "The value of a literal data type.", null, "bd0b89c3-d865-4b62-bd86-a06b3fad08fb"), + /** * Position of the element in a collection of relationships. */ diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/databases/CreateDatabaseTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/databases/CreateDatabaseTest.java index 7786f435b92..462c680bb10 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/databases/CreateDatabaseTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/databases/CreateDatabaseTest.java @@ -276,6 +276,7 @@ private static void runIt(String serverPlatformRootURL, if (! databaseColumnTwoType.equals(afterElement.getDatabaseColumnProperties().getDataType())) { + System.out.println("AfterElement: " + afterElement); throw new FVTUnexpectedCondition(testCaseName, activityName + "(data type should be " + databaseColumnTwoType + " rather than " + afterElement.getDatabaseColumnProperties().getDataType() + ")"); }