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

More reference data #8145

Merged
merged 2 commits into from
Apr 16, 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.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@ public B getNewBean(Class<B> beanClass,
null,
methodName));

ElementProperties elementProperties;

/*
* The initial set of values come from the openMetadataElement.
* The initial set of values come from the relationship properties.
*/
if (relatedMetadataElement.getRelationshipProperties() != null)
{
elementProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties());
ElementProperties elementProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties());

membershipProperties.setMembershipRationale(this.removeMembershipRationale(elementProperties));
membershipProperties.setCreatedBy(this.removeCreatedBy(elementProperties));
Expand All @@ -95,10 +93,6 @@ public B getNewBean(Class<B> beanClass,
*/
membershipProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties));
}
else
{
handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName);
}

bean.setMember(super.getElementStub(beanClass, relatedMetadataElement.getElement(), methodName));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public String getDescription()
public String getQualifiedName()
{
return constructValidValueQualifiedName(null,
OpenMetadataProperty.PROJECT_PHASE.name,
OpenMetadataProperty.COLLECTION_TYPE.name,
null,
name);
}
Expand All @@ -116,7 +116,7 @@ public String getQualifiedName()
public String getCategory()
{
return constructValidValueCategory(null,
OpenMetadataProperty.PROJECT_PHASE.name,
OpenMetadataProperty.COLLECTION_TYPE.name,
null);
}

Expand All @@ -131,6 +131,6 @@ public String getCategory()
@Override
public String toString()
{
return "ProjectPhase{" + name + '}';
return "CollectionType{" + name + '}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,12 @@ public String getFileExtension()
*/
public List<FileType> getFileTypes()
{
return Arrays.asList(fileTypes);
if (fileTypes != null)
{
return Arrays.asList(fileTypes);
}

return null;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public String getColour()
return colour;
}


/**
* Return the qualified name for this value.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataProperty;

import java.util.List;
import java.util.Map;

import static org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataValidValues.constructValidValueCategory;
import static org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataValidValues.constructValidValueQualifiedName;

Expand All @@ -17,92 +20,120 @@ public enum ResourceUse
* Create a survey report that details the content of the real-world resource that is attached to an asset.
*/
SURVEY_RESOURCE("Survey Resource",
"Create a survey report that details the content of the real-world resource that is attached to an asset."),
"Create a survey report that details the content of the real-world resource that is attached to an asset.",
null),

/**
* Create a survey report that details the content of the real-world resource that is attached to an asset.
*/
CATALOG_RESOURCE("Catalog Resource",
"Extract metadata from the real-world resource and add it to the open metadata repositories. Ongoing monitoring means that any changes to the resource are reflected in the open metadata repositories."),
"Extract metadata from the real-world resource and add it to the open metadata repositories. Ongoing monitoring means that any changes to the resource are reflected in the open metadata repositories.",
null),

/**
* Make a change to the real-world resource such as add or copy data.
*/
PROVISION_RESOURCE("Provision Resource",
"Make a change to the real-world resource such as add or copy data."),
"Make a change to the real-world resource such as add or copy data.",
null),

/**
* Improve the information about an element in the open metadata repositories.
*/
IMPROVE_METADATA("Improve Metadata Element",
"Improve the information about an element in the open metadata repositories."),
"Improve the information about an element in the open metadata repositories.",
null),

/**
* Send notification to a steward.
*/
INFORM_STEWARD("Inform Steward",
"Send notification to a steward."),
"Send notification to a steward.",
null),

/**
* Choose the appropriate path to take.
*/
CHOOSE_PATH("Choose Path",
"Choose the appropriate path to take."),
"Choose the appropriate path to take.",
null),

/**
* Monitor for changes to a metadata element and its related elements and take action if required.
*/
WATCH_DOG("Watch Metadata Element",
"Monitor for changes to a metadata element and its related elements and take action if required."),
"Monitor for changes to a metadata element and its related elements and take action if required.",
null),

/**
* A team assigned to support the work associated with the element.
*/
SUPPORTING_PEOPLE("Supporting Team",
"A team assigned to support the work associated with the element."),
"A team assigned to support the work associated with the element.",
null),

/**
* A person assigned to support the work associated with the element.
*/
SUPPORTING_PERSON("Supporting Person",
"A person assigned to support the work associated with the element."),
"A person assigned to support the work associated with the element.",
null),

/**
* A type of service that can be hosted on a type of server.
*/
HOSTED_SERVICE("Hosted Service", "A type of service that can be hosted on this type of server."),
HOSTED_SERVICE("Hosted Service",
"A type of service that can be hosted on this type of server.",
null),

/**
* A type of connector that can be hosted by this type of service/engine..
* A type of connector that can be hosted by this type of service/engine.
*/
HOSTED_CONNECTOR("Hosted Connector", "A type of connector that can be hosted by this type of service/engine."),

HOSTED_CONNECTOR("Hosted Connector",
"A type of connector that can be hosted by this type of service/engine.",
null),

/**
* A type of governance engine that can be hosted by this type of service.
*/
HOSTED_GOVERNANCE_ENGINE("Hosted Governance Engine", "A type of governance engine that can be hosted by this type of service."),
HOSTED_GOVERNANCE_ENGINE("Hosted Governance Engine",
"A type of governance engine that can be hosted by this type of service.",
null),

/**
* A type of service that may be called by this service.
*/
CALLED_SERVICE("Called Service", "A type of service that may be called by this service."),

CALLED_SERVICE("Called Service",
"A type of service that may be called by this service.",
null),

/**
* A connector type that can be used in a connection used to create a connector instance.
*/
CONFIGURE_CONNECTOR("Configure Connector", "A connector type that can be used in a connection used to create a connector instance."),
CONFIGURE_CONNECTOR("Configure Connector",
"A connector type that can be used in a connection used to create a connector instance.",
null),

/**
* A collection of guided activities either suggested, or taken, to complete a project.
*/
ACTIVITY_FOLDER("Activity Folder", "A collection of guided activities either suggested, or taken, to complete a project."),
ACTIVITY_FOLDER("Activity Folder",
"A collection of guided activities either suggested, or taken, to complete a project.",
new ResourceUseProperties[]{ResourceUseProperties.PARENT_RELATIONSHIP_TYPE_NAME}),

/**
* A template to create a member of the collection.
* A template to create a member of the linked collection.
*/
MEMBER_TEMPLATE("Member Template", "A template to create a member of the collection."),
MEMBER_TEMPLATE("Member Template",
"A template to create a member of the linked collection.",
new ResourceUseProperties[]{ResourceUseProperties.PARENT_RELATIONSHIP_TYPE_NAME}),

/**
* A template to create an element from the values in the linked element. The placeholder properties match the attribute names of the linked element.
*/
DERIVED_ELEMENT_TEMPLATE("Derived Element Template",
"A template to create an element from the values in the linked element. The placeholder properties match the attribute names of the linked element.",
new ResourceUseProperties[]{ResourceUseProperties.PARENT_RELATIONSHIP_TYPE_NAME}),

;

Expand All @@ -118,17 +149,23 @@ public enum ResourceUse
private final String description;


private final ResourceUseProperties[] resourceUseProperties;


/**
* Constructor for individual enum value.
*
* @param resourceUse the property value to use in resourceUse
* @param description description of the resource use property value
* @param resourceUseProperties resource use properties used with this resource use value
*/
ResourceUse(String resourceUse,
String description)
ResourceUse(String resourceUse,
String description,
ResourceUseProperties[] resourceUseProperties)
{
this.resourceUse = resourceUse;
this.description = description;
this.resourceUseProperties = resourceUseProperties;
}


Expand Down Expand Up @@ -182,6 +219,20 @@ public String getCategory()
}


/**
* Return the resource use properties associated with this resourceUse value
*
* @return null or list
*/
public List<ResourceUseProperties> getResourceUseProperties()
{
if (resourceUseProperties != null)
{
return List.of(resourceUseProperties);
}

return null;
}


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.frameworks.governanceaction.refdata;

import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataProperty;

import static org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataValidValues.constructValidValueCategory;
import static org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataValidValues.constructValidValueQualifiedName;

/**
* ResourceUseProperties lists common property values found in the resourceUseProperties attribute when a particular
* resourceUse value is in use.
*/
public enum ResourceUseProperties
{
/**
* The open metadata type name of a relationship to connect the linked element with a new element generated from the linked to template.
*/
PARENT_RELATIONSHIP_TYPE_NAME("parentRelationshipTypeName",
"The open metadata type name of a relationship to connect the linked element with a new element generated from the linked to template."),

;

/**
* Property value.
*/
private final String name;


/**
* Property value description.
*/
private final String description;


/**
* Constructor for individual enum value.
*
* @param name the property value to use in project status
* @param description description of the project status property value
*/
ResourceUseProperties(String name,
String description)
{
this.name = name;
this.description = description;
}


/**
* Return the name of the value.
*
* @return string
*/
public String getName()
{
return name;
}


/**
* Return the description for this value.
*
* @return string
*/
public String getDescription()
{
return description;
}



/**
* Return the qualified name for this value.
*
* @return string
*/
public String getQualifiedName()
{
return constructValidValueQualifiedName(null,
OpenMetadataProperty.RESOURCE_USE_PROPERTIES.name,
null,
name);
}


/**
* Return the category for this value.
*
* @return string
*/
public String getCategory()
{
return constructValidValueCategory(null,
OpenMetadataProperty.RESOURCE_USE_PROPERTIES.name,
null);
}




/**
* Output of this enum class and main value.
*
* @return string showing enum value
*/
@Override
public String toString()
{
return "ResourceUseProperties{" + name + '}';
}
}
Loading
Loading