diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/postgres-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/postgres/repositoryconnector/database/QueryBuilder.java b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/postgres-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/postgres/repositoryconnector/database/QueryBuilder.java index 317aed2025a..03cb8e46f34 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/postgres-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/postgres/repositoryconnector/database/QueryBuilder.java +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/postgres-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/postgres/repositoryconnector/database/QueryBuilder.java @@ -706,35 +706,30 @@ else if (matchClassifications.getMatchCriteria() == MatchCriteria.NONE) } StringBuilder stringBuilder = new StringBuilder(); - boolean firstCondition = true; - for (ClassificationCondition classificationCondition : matchClassifications.getConditions()) { if (classificationCondition != null) { - if (firstCondition) + stringBuilder.append(matchOperand); + stringBuilder.append(" ("); + stringBuilder.append(RepositoryColumn.CLASSIFICATION_NAME.getColumnName(RepositoryTable.CLASSIFICATION.getTableName())); + if (operator == PropertyComparisonOperator.EQ) { - firstCondition = false; + stringBuilder.append(" = '"); } else { - stringBuilder.append(matchOperand); + stringBuilder.append(" != '"); } - stringBuilder.append(" ("); - stringBuilder.append(RepositoryColumn.CLASSIFICATION_NAME.getColumnName()); - stringBuilder.append(operator); - stringBuilder.append(" '"); stringBuilder.append(classificationCondition.getName()); stringBuilder.append("' "); if (classificationCondition.getMatchProperties() != null) { - stringBuilder.append(" and ("); stringBuilder.append(this.getPropertyComparisonFromPropertyConditions(classificationCondition.getMatchProperties(), RepositoryTable.CLASSIFICATION_ATTRIBUTE_VALUE.getTableName(), null)); - stringBuilder.append(") "); } stringBuilder.append(") "); diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/VirtualConnectionProperties.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/VirtualConnectionProperties.java index 6efdcc3fc44..536aec7fc58 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/VirtualConnectionProperties.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/VirtualConnectionProperties.java @@ -18,7 +18,7 @@ * Connectors are uses to access the underlying assets. *

* The properties for VirtualConnectionProperties are those for ConnectionProperties plus a list of - * connections for the + * connections for the embedded connectors. */ public class VirtualConnectionProperties extends ConnectionProperties { @@ -70,6 +70,7 @@ public VirtualConnectionProperties(VirtualConnectionProperties templateConnectio * * @return connection bean */ + @Override protected VirtualConnection getConnectionBean() { return connectionBean; @@ -108,16 +109,15 @@ public List getEmbeddedConnections() * Returns a formatted string with the connection name. It is used in formatting error messages for the * exceptions thrown by consuming components. It is extremely cautious because most of the exceptions * are reporting a malformed connection object so who knows what else is wrong with it. - * * Within the connection are 2 possible properties that could * contain the connection name: * ** qualifiedName - this is a uniqueName and should be there * ** displayName - shorter simpler name but may not be unique - so may not identify the connection in error - * * This method inspects these properties and builds up a string to represent the connection name * * @return connection name */ + @Override public String getConnectionName() { String connectionName = ""; /* if all properties are blank */ @@ -127,14 +127,14 @@ public String getConnectionName() /* * The qualifiedName is preferred because it is unique. */ - if (qualifiedName != null && (!qualifiedName.equals(""))) + if (qualifiedName != null && (!qualifiedName.isEmpty())) { /* * Use qualified name. */ connectionName = qualifiedName; } - else if (displayName != null && (!displayName.equals(""))) + else if (displayName != null && (!displayName.isEmpty())) { /* * The qualifiedName is not set but the displayName is available so use it. @@ -152,6 +152,7 @@ else if (displayName != null && (!displayName.equals(""))) * * @return description */ + @Override public String getDescription() { return connectionBean.getDescription(); @@ -164,6 +165,7 @@ public String getDescription() * * @return connector type for the connection */ + @Override public ConnectorTypeProperties getConnectorType() { ConnectorType connectorType = connectionBean.getConnectorType(); @@ -185,6 +187,7 @@ public ConnectorTypeProperties getConnectorType() * * @return endpoint for the connection */ + @Override public EndpointProperties getEndpoint() { Endpoint endpoint = connectionBean.getEndpoint(); @@ -207,6 +210,7 @@ public EndpointProperties getEndpoint() * * @return secured properties typically user credentials for the connection */ + @Override public Map getSecuredProperties() { return connectionBean.getSecuredProperties(); diff --git a/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/archivemanager/OMRSArchiveManager.java b/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/archivemanager/OMRSArchiveManager.java index b3d99f68742..c6e9a07260f 100644 --- a/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/archivemanager/OMRSArchiveManager.java +++ b/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/archivemanager/OMRSArchiveManager.java @@ -129,7 +129,7 @@ public void setLocalRepository(String localMetadataCol * @throws RepositoryErrorException there is a problem accessing the archive */ public void addOpenMetadataArchive(OpenMetadataArchiveStore archiveStore, - String archiveSource) throws RepositoryErrorException + String archiveSource) throws RepositoryErrorException { this.processOpenMetadataArchiveStore(archiveStore, archiveSource, repositoryContentManager, localInstanceEventProcessor); this.openMetadataArchiveStores.add(archiveStore); 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 09e4774fb86..f4ef2a88ff9 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 @@ -123,10 +123,6 @@ public OpenMetadataArchive getOpenMetadataArchive() */ this.getOriginalTypes(); - this.add0265AnalyticsAssets(); - this.add0118ActorRoles(); - this.addLabelToLineage(); - /* * The completed archive is ready to be packaged up and returned */ @@ -158,7 +154,9 @@ public void getOriginalTypes() */ previousTypes.getOriginalTypes(); - + this.add0265AnalyticsAssets(); + this.add0118ActorRoles(); + this.addLabelToLineage(); } @@ -364,6 +362,7 @@ private void add0265AnalyticsAssets() { this.archiveBuilder.addEntityDef(getDeployedAnalyticsModelEntity()); this.archiveBuilder.addEntityDef(getAnalyticsModelRunEntity()); + this.archiveBuilder.addTypeDefPatch(updateTransientEmbeddedProcess()); } @@ -392,6 +391,28 @@ private EntityDef getAnalyticsModelRunEntity() } + private TypeDefPatch updateTransientEmbeddedProcess() + { + /* + * Create the Patch + */ + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(OpenMetadataType.TRANSIENT_EMBEDDED_PROCESS.typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + + properties.add(archiveHelper.getTypeDefAttribute(OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE)); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + /* * -------------------------------------------------------------------------------------------------------