Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content-packs/APIsContentPack.omarchive

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException;
import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus;
import org.odpi.openmetadata.frameworks.openmetadata.client.OpenMetadataClient;
import org.odpi.openmetadata.frameworks.openmetadata.properties.*;
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.actions.ToDoProperties;
Expand Down Expand Up @@ -1348,7 +1347,7 @@ public OpenMetadataRelationshipList getRelationshipHistory(String
*/
@Override
public String createMetadataElementInStore(String userId,
String metadataElementTypeName,
String metadataElementTypeName,
NewElementOptions newElementOptions,
Map<String, NewElementProperties> initialClassifications,
NewElementProperties properties,
Expand Down Expand Up @@ -2221,7 +2220,6 @@ public String createIncidentReport(String user

NewElementOptions newElementOptions = new NewElementOptions(makeAnchorOptions);

newElementOptions.setInitialStatus(ElementStatus.ACTIVE);
newElementOptions.setIsOwnAnchor(true);
newElementOptions.setParentAtEnd1(true);
newElementOptions.setParentGUID(originatorGUID);
Expand Down Expand Up @@ -2404,8 +2402,6 @@ private String createAction(String userId,

NewElementOptions newElementOptions = new NewElementOptions(makeAnchorOptions);

newElementOptions.setInitialStatus(ElementStatus.ACTIVE);

if (actionSourceGUID != null)
{
newElementOptions.setIsOwnAnchor(false);
Expand Down Expand Up @@ -2543,7 +2539,6 @@ public String openToDo(String userId,
*/
NewElementOptions newElementOptions = new NewElementOptions(makeAnchorOptions);

newElementOptions.setInitialStatus(ElementStatus.ACTIVE);
newElementOptions.setIsOwnAnchor(true);
newElementOptions.setParentAtEnd1(true);
newElementOptions.setParentGUID(assignToGUID);
Expand Down Expand Up @@ -2688,7 +2683,6 @@ public String registerContextEvent(String
properties = propertyHelper.addStringMapProperty(properties, OpenMetadataProperty.ADDITIONAL_PROPERTIES.name, contextEventProperties.getAdditionalProperties());

NewElementOptions newElementOptions = new NewElementOptions(metadataSourceOptions);
newElementOptions.setInitialStatus(ElementStatus.ACTIVE);
newElementOptions.setAnchorGUID(anchorGUID);
newElementOptions.setIsOwnAnchor((anchorGUID == null));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public class MetadataElementBuilder extends OpenMetadataAPIGenericBuilder
* @param metadataElementTypeGUID type identifier
* @param metadataElementTypeName type name
* @param propertyMap map of property names to values
* @param initialStatus initial status of the element
* @param effectiveFrom date to make the element active in the governance program (null for now)
* @param effectiveTo date to remove the element from the governance program (null = until deleted)
* @param repositoryHelper helper methods
Expand All @@ -38,7 +37,6 @@ public class MetadataElementBuilder extends OpenMetadataAPIGenericBuilder
MetadataElementBuilder(String metadataElementTypeGUID,
String metadataElementTypeName,
Map<String, InstancePropertyValue> propertyMap,
InstanceStatus initialStatus,
Date effectiveFrom,
Date effectiveTo,
OMRSRepositoryHelper repositoryHelper,
Expand All @@ -48,7 +46,6 @@ public class MetadataElementBuilder extends OpenMetadataAPIGenericBuilder
super(metadataElementTypeGUID,
metadataElementTypeName,
null,
initialStatus,
effectiveFrom,
effectiveTo,
null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,6 @@ public List<OpenMetadataRelationship> convertOpenMetadataRelationships(List<Rela
* @param externalSourceGUID unique identifier of the software capability that owns this element
* @param externalSourceName unique name of the software capability that owns this element
* @param metadataElementTypeName type name of the new metadata element
* @param initialStatus initial status of the metadata element
* @param initialClassifications map of classification names to classification properties to include in the entity creation request
* @param anchorGUID unique identifier of the element that should be the anchor for the new element. Set to null if no anchor,
* or the Anchors classification is included in the initial classifications.
Expand All @@ -1613,7 +1612,6 @@ public String createMetadataElementInStore(String use
String externalSourceGUID,
String externalSourceName,
String metadataElementTypeName,
ElementStatus initialStatus,
Map<String, NewElementProperties> initialClassifications,
String anchorGUID,
boolean isOwnAnchor,
Expand Down Expand Up @@ -1673,7 +1671,6 @@ public String createMetadataElementInStore(String use
builder = new MetadataElementBuilder(metadataElementTypeGUID,
metadataElementTypeName,
getElementPropertiesAsOMRSMap(properties),
this.getInstanceStatus(initialStatus),
properties.getEffectiveFrom(),
properties.getEffectiveTo(),
repositoryHelper,
Expand All @@ -1685,7 +1682,6 @@ public String createMetadataElementInStore(String use
builder = new MetadataElementBuilder(metadataElementTypeGUID,
metadataElementTypeName,
null,
this.getInstanceStatus(initialStatus),
null,
null,
repositoryHelper,
Expand Down Expand Up @@ -2011,7 +2007,6 @@ public String createMetadataElementFromTemplate(String u
MetadataElementBuilder builder = new MetadataElementBuilder(metadataElementTypeGUID,
metadataElementTypeName,
getElementPropertiesAsOMRSMap(templateProperties),
null,
effectiveFrom,
effectiveTo,
repositoryHelper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2470,7 +2470,6 @@ public GUIDResponse createMetadataElementInStore(String
requestBody.getExternalSourceGUID(),
requestBody.getExternalSourceName(),
requestBody.getTypeName(),
requestBody.getInitialStatus(),
requestBody.getInitialClassifications(),
requestBody.getAnchorGUID(),
requestBody.getIsOwnAnchor(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.odpi.openmetadata.frameworks.opengovernance.properties.CatalogTarget;
import org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.OpenMetadataStore;
import org.odpi.openmetadata.frameworks.openmetadata.enums.CapabilityAssetUseType;
import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException;
Expand Down Expand Up @@ -211,7 +210,6 @@ private String getDatabaseManagerGUID(String databaseServerGUID

NewElementOptions newElementOptions = new NewElementOptions(openMetadataStore.getMetadataSourceOptions());

newElementOptions.setInitialStatus(ElementStatus.ACTIVE);
newElementOptions.setAnchorGUID(databaseServerGUID);
newElementOptions.setIsOwnAnchor(false);
newElementOptions.setAnchorScopeGUID(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException;
import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus;
import org.odpi.openmetadata.frameworks.openmetadata.controls.PlaceholderProperty;
import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipBeanProperties;
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties;
Expand Down Expand Up @@ -529,8 +528,6 @@ private void createSchemaAttributesForUCFunction(String functionGUID,

NewElementOptions newElementOptions = new NewElementOptions(assetClient.getMetadataSourceOptions());

newElementOptions.setInitialStatus(ElementStatus.ACTIVE);

newElementOptions.setAnchorGUID(functionGUID);
newElementOptions.setIsOwnAnchor(false);
newElementOptions.setAnchorScopeGUID(UnityCatalogDeployedImplementationType.OSS_UNITY_CATALOG_SERVER.getGUID());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,29 @@
import org.odpi.openmetadata.adapters.connectors.unitycatalog.controls.UnityCatalogDeployedImplementationType;
import org.odpi.openmetadata.adapters.connectors.unitycatalog.controls.UnityCatalogPlaceholderProperty;
import org.odpi.openmetadata.adapters.connectors.unitycatalog.ffdc.UCAuditCode;
import org.odpi.openmetadata.adapters.connectors.unitycatalog.properties.*;
import org.odpi.openmetadata.adapters.connectors.unitycatalog.properties.ColumnInfo;
import org.odpi.openmetadata.adapters.connectors.unitycatalog.properties.SchemaInfo;
import org.odpi.openmetadata.adapters.connectors.unitycatalog.properties.TableInfo;
import org.odpi.openmetadata.adapters.connectors.unitycatalog.resource.OSSUnityCatalogResourceConnector;
import org.odpi.openmetadata.frameworks.auditlog.AuditLog;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException;
import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext;
import org.odpi.openmetadata.frameworks.integration.iterator.*;
import org.odpi.openmetadata.frameworks.integration.iterator.IntegrationIterator;
import org.odpi.openmetadata.frameworks.integration.iterator.MemberAction;
import org.odpi.openmetadata.frameworks.integration.iterator.MemberElement;
import org.odpi.openmetadata.frameworks.integration.iterator.RelatedElementsIterator;
import org.odpi.openmetadata.frameworks.openmetadata.controls.PlaceholderProperty;
import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException;
import org.odpi.openmetadata.frameworks.openmetadata.mapper.PropertyFacetValidValues;
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedMetadataElementSummary;
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedMetadataHierarchySummary;
import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus;
import org.odpi.openmetadata.frameworks.openmetadata.controls.PlaceholderProperty;
import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipBeanProperties;
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetEncodingProperties;
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.reports.VirtualRelationalTableProperties;
import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.RelationalTableProperties;
import org.odpi.openmetadata.frameworks.openmetadata.search.*;
import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization;
import org.odpi.openmetadata.frameworks.openmetadata.mapper.PropertyFacetValidValues;
import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty;
import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType;

Expand Down Expand Up @@ -611,8 +614,6 @@ private void createSchemaAttributesForUCTable(String tableGUID,
newElementOptions.setExternalSourceGUID(catalogGUID);
newElementOptions.setExternalSourceName(metadataCollectionQualifiedName);

newElementOptions.setInitialStatus(ElementStatus.ACTIVE);

newElementOptions.setAnchorGUID(tableGUID);
newElementOptions.setIsOwnAnchor(false);
newElementOptions.setAnchorScopeGUID(UnityCatalogDeployedImplementationType.OSS_UNITY_CATALOG_SERVER.getGUID());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException;
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.OpenMetadataRootElement;
import org.odpi.openmetadata.frameworks.openmetadata.properties.EntityProperties;
import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties;
import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipBeanProperties;
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties;
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.connectors.CatalogTargetProperties;
Expand Down Expand Up @@ -352,7 +354,7 @@ private void createElementInEgeria(CatalogInfo catalogInfo,

ucCatalogGUID = assetClient.createAssetFromTemplate(templateOptions,
templateGUID,
this.getElementProperties(qualifiedName, catalogInfo),
this.getReplacementProperties(qualifiedName, catalogInfo),
this.getPlaceholderProperties(catalogInfo),
relationshipProperties);

Expand Down Expand Up @@ -494,6 +496,28 @@ private Map<String, String> getPlaceholderProperties(CatalogInfo info)
}


/**
* Set up the element properties for an asset from the info object.
*
* @param info information extracted from UC
*
* @return element properties suitable for create or update
*/
private ReferenceableProperties getReplacementProperties(CatalogInfo info)
{
DatabaseProperties catalogProperties = new DatabaseProperties();

catalogProperties.setDisplayName(info.getName());
catalogProperties.setDescription(info.getComment());
catalogProperties.setDeployedImplementationType(UnityCatalogDeployedImplementationType.OSS_UC_CATALOG.getDeployedImplementationType());

// catalogProperties.setAdditionalProperties(info.getProperties());

return catalogProperties;
}



/**
* Set up the element properties for an asset from the info object.
*
Expand Down Expand Up @@ -532,14 +556,12 @@ private ElementProperties getElementProperties(CatalogInfo info)
*
* @return element properties suitable for create or update
*/
private ElementProperties getElementProperties(String qualifiedName,
CatalogInfo info)
private EntityProperties getReplacementProperties(String qualifiedName,
CatalogInfo info)
{
ElementProperties elementProperties = this.getElementProperties(info);
ReferenceableProperties elementProperties = this.getReplacementProperties(info);

elementProperties = propertyHelper.addStringProperty(elementProperties,
OpenMetadataProperty.QUALIFIED_NAME.name,
qualifiedName);
elementProperties.setQualifiedName(qualifiedName);

return elementProperties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException;
import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus;
import org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.OpenMetadataStore;
import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty;
import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType;
Expand Down Expand Up @@ -439,7 +438,6 @@ private String createSchemaType(OpenMetadataStore openMetadataStore,
assetProperties.getQualifiedName() + "_rootSchemaType");

String schemaTypeGUID = openMetadataStore.createMetadataElementInStore(schemaType,
ElementStatus.ACTIVE,
new NewElementProperties(elementProperties));
if (schemaTypeGUID != null)
{
Expand Down Expand Up @@ -506,7 +504,6 @@ private String addSchemaAttributeToSchemaType(OpenMetadataStore openMetada

NewElementOptions newElementOptions = new NewElementOptions(openMetadataStore.getMetadataSourceOptions());

newElementOptions.setInitialStatus(ElementStatus.ACTIVE);
newElementOptions.setAnchorGUID(assetElement.getElementHeader().getGUID());
newElementOptions.setIsOwnAnchor(false);
newElementOptions.setAnchorScopeGUID(null);
Expand Down
Loading
Loading