Skip to content

Commit

Permalink
Merge pull request #8252 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Add implementation of UC Server Integration Connector
  • Loading branch information
mandy-chessell authored Jun 25, 2024
2 parents ffe6a75 + c5e59ff commit ced1233
Show file tree
Hide file tree
Showing 120 changed files with 3,882 additions and 479 deletions.
2 changes: 1 addition & 1 deletion CoreContentPackGUIDMap.json

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import static org.odpi.openmetadata.accessservices.assetlineage.util.AssetLineageConstants.FILE_FOLDER;
import static org.odpi.openmetadata.accessservices.assetlineage.util.AssetLineageConstants.FOLDER_HIERARCHY;
import static org.odpi.openmetadata.accessservices.assetlineage.util.AssetLineageConstants.GLOSSARY_TERM;
import static org.odpi.openmetadata.accessservices.assetlineage.util.AssetLineageConstants.DATA_FLOW;
import static org.odpi.openmetadata.accessservices.assetlineage.util.AssetLineageConstants.LINEAGE_MAPPING;
import static org.odpi.openmetadata.accessservices.assetlineage.util.AssetLineageConstants.NESTED_FILE;
import static org.odpi.openmetadata.accessservices.assetlineage.util.AssetLineageConstants.NESTED_SCHEMA_ATTRIBUTE;
Expand Down Expand Up @@ -64,6 +63,7 @@ public class AssetLineageTypesValidator {
* @param repositoryHelper helper used by the converters
* @param accessServiceOptions access service options
*/
@SuppressWarnings(value = "unchecked")
public AssetLineageTypesValidator(OMRSRepositoryHelper repositoryHelper, Map<String, Object> accessServiceOptions) {
this.repositoryHelper = repositoryHelper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ public B getNewBean(Class<B> beanClass,
*/
B returnBean = beanClass.getDeclaredConstructor().newInstance();

if (returnBean instanceof ConnectorTypeElement)
if (returnBean instanceof ConnectorTypeElement bean)
{
ConnectorTypeElement bean = (ConnectorTypeElement) returnBean;
ConnectorTypeProperties connectorTypeProperties = new ConnectorTypeProperties();

if (entity != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,7 @@ public String createConnectorType(String userId,
connectorTypeProperties.getDisplayName(),
connectorTypeProperties.getDescription(),
connectorTypeProperties.getSupportedAssetTypeName(),
null,
connectorTypeProperties.getExpectedDataFormat(),
connectorTypeProperties.getConnectorProviderClassName(),
connectorTypeProperties.getConnectorFrameworkName(),
Expand Down Expand Up @@ -2094,6 +2095,7 @@ public void updateConnectorType(String userId,
connectorTypeProperties.getDisplayName(),
connectorTypeProperties.getDescription(),
connectorTypeProperties.getSupportedAssetTypeName(),
null,
connectorTypeProperties.getExpectedDataFormat(),
connectorTypeProperties.getConnectorProviderClassName(),
connectorTypeProperties.getConnectorFrameworkName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
})
public class DataStoreProperties extends AssetProperties
{
private String deployedImplementationType = null;
private String pathName = null;
private Date createTime = null;
private Date modifiedTime = null;
Expand Down Expand Up @@ -65,6 +66,7 @@ public DataStoreProperties(DataStoreProperties template)
encodingLanguage = template.getEncodingLanguage();
encodingDescription = template.getEncodingDescription();
encodingProperties = template.getEncodingProperties();
deployedImplementationType = template.getDeployedImplementationType();
}
}

Expand Down Expand Up @@ -244,6 +246,28 @@ public void setEncodingProperties(Map<String, String> encodingProperties)
}


/**
* Retrieve the name of the technology used for this data asset.
*
* @return string name
*/
public String getDeployedImplementationType()
{
return deployedImplementationType;
}


/**
* Set up the name of the technology used for this data asset.
*
* @param deployedImplementationType string name
*/
public void setDeployedImplementationType(String deployedImplementationType)
{
this.deployedImplementationType = deployedImplementationType;
}


/**
* Standard toString method.
*
Expand All @@ -265,6 +289,7 @@ public String toString()
", encodingLanguage='" + encodingLanguage + '\'' +
", encodingDescription='" + encodingDescription + '\'' +
", encodingProperties=" + encodingProperties +
", deployedImplementationType='" + deployedImplementationType + '\'' +
", typeName='" + getTypeName() + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
Expand Down Expand Up @@ -298,6 +323,7 @@ public boolean equals(Object objectToCompare)
return Objects.equals(pathName, that.pathName) &&
Objects.equals(createTime, that.createTime) &&
Objects.equals(modifiedTime, that.modifiedTime) &&
Objects.equals(deployedImplementationType, that.deployedImplementationType) &&
Objects.equals(encodingType, that.encodingType) &&
Objects.equals(encodingLanguage, that.encodingLanguage) &&
Objects.equals(encodingDescription, that.encodingDescription) &&
Expand All @@ -313,7 +339,7 @@ public boolean equals(Object objectToCompare)
@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), pathName, createTime, modifiedTime, encodingType,
return Objects.hash(super.hashCode(), pathName, createTime, modifiedTime, deployedImplementationType, encodingType,
encodingLanguage, encodingDescription, encodingProperties);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@
@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 = DataStoreProperties.class, name = "DataStoreProperties"),
})
public class FileProperties extends DataStoreProperties
{
private String fileType = null;

private String fileType = null;
private String fileName = null;
private String fileExtension = null;

/**
* Default constructor
Expand All @@ -48,7 +42,9 @@ public FileProperties(FileProperties template)

if (template != null)
{
fileType = template.getFileType();
fileType = template.getFileType();
fileName = template.getFileName();
fileExtension = template.getFileExtension();
}
}

Expand All @@ -75,33 +71,79 @@ public void setFileType(String fileType)
}


/**
* Return the name of the file (do not want to rely on Name).
*
* @return string
*/
public String getFileName()
{
return fileName;
}


/**
* Set up the name of the file (do not want to rely on Name).
*
* @param fileName string
*/
public void setFileName(String fileName)
{
this.fileName = fileName;
}


/**
* Return the file extension, if any.
*
* @return string
*/
public String getFileExtension()
{
return fileExtension;
}


/**
* Set up the file extension, if any.
*
* @param fileExtension string
*/
public void setFileExtension(String fileExtension)
{
this.fileExtension = fileExtension;
}

/**
* JSON-style toString
*
* @return return string containing the property names and values
*/
@SuppressWarnings(value = "deprecation")
@Override
public String toString()
{
return "FileProperties{" +
"name='" + getName() + '\'' +
", versionIdentifier='" + getVersionIdentifier() + '\'' +
", displayName='" + getDisplayName() + '\'' +
", description='" + getDescription() + '\'' +
", pathName='" + getPathName() + '\'' +
", createTime=" + getCreateTime() +
", modifiedTime=" + getModifiedTime() +
", encodingType='" + getEncodingType() + '\'' +
", encodingLanguage='" + getEncodingLanguage() + '\'' +
", encodingDescription='" + getEncodingDescription() + '\'' +
", encodingProperties=" + getEncodingProperties() +
", fileType='" + fileType + '\'' +
", typeName='" + getTypeName() + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
", extendedProperties=" + getExtendedProperties() +
'}';
"fileType='" + fileType + '\'' +
", fileName='" + fileName + '\'' +
", fileExtension='" + fileExtension + '\'' +
", deployedImplementationType='" + getDeployedImplementationType() + '\'' +
", pathName='" + getPathName() + '\'' +
", createTime=" + getCreateTime() +
", modifiedTime=" + getModifiedTime() +
", encodingType='" + getEncodingType() + '\'' +
", encodingLanguage='" + getEncodingLanguage() + '\'' +
", encodingDescription='" + getEncodingDescription() + '\'' +
", encodingProperties=" + getEncodingProperties() +
", name='" + getName() + '\'' +
", versionIdentifier='" + getVersionIdentifier() + '\'' +
", description='" + getDescription() + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
", effectiveFrom=" + getEffectiveFrom() +
", effectiveTo=" + getEffectiveTo() +
", typeName='" + getTypeName() + '\'' +
", extendedProperties=" + getExtendedProperties() +
'}';
}


Expand All @@ -114,23 +156,13 @@ public String toString()
@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;
}
if (this == objectToCompare) return true;
if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false;
if (!super.equals(objectToCompare)) return false;
FileProperties that = (FileProperties) objectToCompare;
return Objects.equals(fileType, that.fileType);
return Objects.equals(fileType, that.fileType) && Objects.equals(fileName, that.fileName) && Objects.equals(fileExtension, that.fileExtension);
}


/**
* Return hash code for this object
*
Expand All @@ -139,6 +171,6 @@ public boolean equals(Object objectToCompare)
@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), fileType);
return Objects.hash(super.hashCode(), fileType, fileName, fileExtension);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ public B getNewBean(Class<B> beanClass,
fileProperties.setQualifiedName(this.removeQualifiedName(instanceProperties));
fileProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties));
fileProperties.setName(this.removeName(instanceProperties));
fileProperties.setDisplayName(fileProperties.getName());
fileProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties));
fileProperties.setDescription(this.removeDescription(instanceProperties));
fileProperties.setPathName(this.removePathName(instanceProperties));
fileProperties.setCreateTime(this.removeStoreCreateTime(instanceProperties));
fileProperties.setModifiedTime(this.removeStoreUpdateTime(instanceProperties));
fileProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties));
fileProperties.setFileName(this.removeFileName(instanceProperties));
fileProperties.setFileType(this.removeFileType(instanceProperties));
fileProperties.setFileExtension(this.removeFileExtension(instanceProperties));

/*
* Any remaining properties are returned in the extended properties. They are
Expand Down
Loading

0 comments on commit ced1233

Please sign in to comment.