Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore CatalogTemplate relationships #8157

Merged
merged 2 commits into from
Apr 30, 2024
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 OpenConnectorsArchiveGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenConnectorsArchive.json

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,30 @@
*/
public enum FilesPlaceholderProperty
{
/**
* The name of the leaf directory, without its enclosing directories.
*/
FOLDER_NAME("folderName", "The name of the leaf directory, without its enclosing directories.", "string", "myFolder"),

/**
* The display name of the data set.
*/
DATA_SET_NAME("dataSetName", "The display name of the data set.", "string", "myDataSet"),

/**
* The formula used to populate the data set.
*/
FORMULA("formula", "The formula used to populate the data set.", "string", null),

/**
* The language/format used in the data set's formula.
*/
FORMULA_TYPE("formulaType", "The language/format used in the data set's formula.", "string", null),

/**
* The full pathname of the file including the directory names, file name and file extension.
*/
PATH_NAME ("pathName", "The full pathname of the file including the directory names, file name and file extension.", "string", "/a/b/c/myFile.txt"),
PATH_NAME ("pathName", "The full pathname of the file including the directory names, file name and optional file extension, if applicable.", "string", "/a/b/c/myFile.txt"),

/**
* The short name of the file with its extension but without the directory names.
Expand Down Expand Up @@ -49,7 +69,41 @@ public enum FilesPlaceholderProperty
"string",
"JSON"),

;
/**
* The deployed implementation type for the file.
*/
DEPLOYED_IMPLEMENTATION_TYPE ("deployedImplementationType",
"The deployed implementation type for the file.",
"string",
"Build File"),


/**
* The description of the resource to help a consumer understand its content and purpose.
*/
DESCRIPTION ("description",
"The description of the resource to help a consumer understand its content and purpose.",
"string",
"This file contains a moth-worth of patient data for the Teddy Bear Drop Foot clinical trial."),


/**
* The programming language used to encode the file.
*/
PROGRAMMING_LANGUAGE ("programmingLanguage",
"The programming language used to encode the file.",
"string",
"Java"),

/**
* Descriptive metadata values embedded within the file.
*/
EMBEDDED_METADATA ("embeddedMetadata",
"Descriptive metadata values embedded within the file.",
"map<string, string>",
null),

;

public final String name;
public final String description;
Expand Down Expand Up @@ -133,23 +187,101 @@ public String getExample()


/**
* Retrieve all the defined placeholder properties
* Retrieve all the defined placeholder properties for data files
*
* @return list of placeholder property types
*/
public static List<PlaceholderPropertyType> getFilesPlaceholderPropertyTypes()
public static List<PlaceholderPropertyType> getDataFilesPlaceholderPropertyTypes()
{
List<PlaceholderPropertyType> placeholderPropertyTypes = new ArrayList<>();

for (FilesPlaceholderProperty placeholderProperty : FilesPlaceholderProperty.values())
{
placeholderPropertyTypes.add(placeholderProperty.getPlaceholderType());
}
placeholderPropertyTypes.add(DEPLOYED_IMPLEMENTATION_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(PATH_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(FILE_EXTENSION.getPlaceholderType());
placeholderPropertyTypes.add(FILE_ENCODING.getPlaceholderType());

return placeholderPropertyTypes;
}


/**
* Retrieve all the defined placeholder properties for data files
*
* @return list of placeholder property types
*/
public static List<PlaceholderPropertyType> getMediaFilesPlaceholderPropertyTypes()
{
List<PlaceholderPropertyType> placeholderPropertyTypes = new ArrayList<>();

placeholderPropertyTypes.add(DEPLOYED_IMPLEMENTATION_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(PATH_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(FILE_EXTENSION.getPlaceholderType());
placeholderPropertyTypes.add(FILE_ENCODING.getPlaceholderType());
placeholderPropertyTypes.add(EMBEDDED_METADATA.getPlaceholderType());

return placeholderPropertyTypes;
}


/**
* Retrieve all the defined placeholder properties for directories (file folder)
*
* @return list of placeholder property types
*/
public static List<PlaceholderPropertyType> getFolderPlaceholderPropertyTypes()
{
List<PlaceholderPropertyType> placeholderPropertyTypes = new ArrayList<>();

placeholderPropertyTypes.add(DEPLOYED_IMPLEMENTATION_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(PATH_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FOLDER_NAME.getPlaceholderType());

return placeholderPropertyTypes;
}


/**
* Retrieve all the defined placeholder properties for directories (file folder)
*
* @return list of placeholder property types
*/
public static List<PlaceholderPropertyType> getDataSetPlaceholderPropertyTypes()
{
List<PlaceholderPropertyType> placeholderPropertyTypes = new ArrayList<>();

placeholderPropertyTypes.add(DEPLOYED_IMPLEMENTATION_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(DATA_SET_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FORMULA.getPlaceholderType());
placeholderPropertyTypes.add(FORMULA_TYPE.getPlaceholderType());

return placeholderPropertyTypes;
}


/**
* Retrieve all the defined placeholder properties for files associated with software
*
* @return list of placeholder property types
*/
public static List<PlaceholderPropertyType> getSoftwareFilesPlaceholderPropertyTypes()
{
List<PlaceholderPropertyType> placeholderPropertyTypes = new ArrayList<>();

placeholderPropertyTypes.add(DEPLOYED_IMPLEMENTATION_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(PATH_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_NAME.getPlaceholderType());
placeholderPropertyTypes.add(FILE_TYPE.getPlaceholderType());
placeholderPropertyTypes.add(FILE_EXTENSION.getPlaceholderType());
placeholderPropertyTypes.add(FILE_ENCODING.getPlaceholderType());
placeholderPropertyTypes.add(PROGRAMMING_LANGUAGE.getPlaceholderType());

return placeholderPropertyTypes;
}

/**
* Return a summary of this enum to use in a service provider.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public void start() throws ConnectorCheckedException
methodName);
return;
}
else if (! propertyHelper.isTypeOf(assetUniverse, OpenMetadataType.SOFTWARE_SERVER.typeName))
else if (! propertyHelper.isTypeOf(assetUniverse, OpenMetadataType.DATABASE_TYPE_NAME))
{
super.throwWrongTypeOfAsset(assetUniverse.getGUID(),
assetUniverse.getType().getTypeName(),
OpenMetadataType.SOFTWARE_SERVER.typeName,
OpenMetadataType.DATABASE_TYPE_NAME,
methodName);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,12 @@ private TemplateProgress addAttachmentsFromTemplate(String userId,
}

/*
* Skip "SourcedFrom" and "SpecificationPropertyAssignment" relationships since they are part of the template
* Skip "SourcedFrom", "CatalogTemplate" and "SpecificationPropertyAssignment" relationships since they are part of the template
* description rather than the template itself.
*/
if ((! repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.SOURCED_FROM_RELATIONSHIP.typeName)) &&
(! repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.SPECIFICATION_PROPERTY_ASSIGNMENT_RELATIONSHIP.typeName)))
(! repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.SPECIFICATION_PROPERTY_ASSIGNMENT_RELATIONSHIP.typeName)) &&
(! repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CATALOG_TEMPLATE_RELATIONSHIP.typeName)))
{
/*
* If the element is a template substitute then use the entity that it is sourced from.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

###
# Working with entities
@elementGUID=2864a998-61f6-4251-a619-c73e85559fd5
@elementGUID=add guid here


###
Expand Down Expand Up @@ -97,7 +97,7 @@ Content-Type: application/json
# @name getAllRelatedMetadataElements
# Retrieve the metadata elements connected to the supplied element.
GET {{baseURL}}/servers/{{serverName}}/open-metadata/framework-services/{{serviceURLMarker}}/open-metadata-store/users/{{userId}}/related-elements/{{elementGUID}}/any-type?
startingAtEnd=1&
startingAtEnd=0&
startFrom=0&
pageSize=0

Expand Down
Loading
Loading