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

Add 4.4 open metadata types #7895

Merged
merged 6 commits into from
Oct 18, 2023
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
1 change: 1 addition & 0 deletions open-metadata-distribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This module collects together the Egeria artifacts for different scenarios. This includes:

* The **[OMAG Server Platform Assembly](omag-server-platform)** assembles the libraries and files for the OMAG Server Platform plus optional resources for use with the platform.
* The **[Egeria UI Application](egeria-ui-application)** contains the runtime for the Egeria's General User UI backend services.
* The **[Open Metadata Assembly](open-metadata-assemblies)** provides a combination of the OMAG Server Platform and the Egeria UI Application. This is a legacy and is being replaced with the more specialized assemblies described above.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,16 @@ public void setCollectionOrderingProperty(String collectionOrderingProperty)
public String toString()
{
return "CollectionFolderProperties{" +
"collectionOrderingProperty='" + collectionOrderingProperty + '\'' +
", collectionOrdering=" + collectionOrdering +
", name='" + getName() + '\'' +
", description='" + getDescription() + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
", typeName='" + getTypeName() + '\'' +
", extendedProperties=" + getExtendedProperties() +
'}';
"collectionOrderingProperty='" + collectionOrderingProperty + '\'' +
", collectionOrdering=" + collectionOrdering +
", name='" + getName() + '\'' +
", description='" + getDescription() + '\'' +
", collectionType='" + getCollectionType() + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
", typeName='" + getTypeName() + '\'' +
", extendedProperties=" + getExtendedProperties() +
'}';
}

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

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* CollectionMemberStatus specifies the the status of the member in a collection.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public enum CollectionMemberStatus implements Serializable
{
/**
* The status of the member is not known or not specified. This is the default value.
*/
UNKNOWN (0, 0, "Unknown", "The status of the member is not known or not specified. This is the default value."),

/**
* The member was added by a discovery process.
*/
DISCOVERED (1, 1, "Discovered", "The member was added by a discovery process."),

/**
* The member was proposed by a consumer.
*/
PROPOSED (2, 2, "Proposed", "The member was proposed by a consumer."),

/**
* The member was imported from another system.
*/
IMPORTED (3, 3, "Imported", "The member was imported from another system."),

/**
* The member has been validated by a custodian/steward/approver and can be trusted.
*/
VALIDATED (4, 4, "Validated", "The member has been validated by a custodian/steward/approver and can be trusted."),

/**
* The membership has been deprecated. Consider stopping using it.
*/
DEPRECATED (5, 5, "Deprecated", "The membership has been deprecated. Consider stopping using it."),

/**
* The membership is obsolete and should not be used.
*/
OBSOLETE (6, 6, "Obsolete", "The membership is obsolete and should not be used."),

/**
* The membership has a different status not covered by the open metadata types.
*/
OTHER (99, 99, "Other", "The membership has a different status not covered by the open metadata types.");

private static final long serialVersionUID = 1L;

private static final String ENUM_TYPE_GUID = "a3bdb2ac-c28e-4e5a-8ab7-76aa01038832";
private static final String ENUM_TYPE_NAME = "MembershipStatus";

private final int openTypeOrdinal;

private final int ordinal;
private final String name;
private final String description;


/**
* Default constructor for the enumeration.
*
* @param ordinal numerical representation of the enumeration
* @param openTypeOrdinal code number from the equivalent Enum Type
* @param name default string name of the enumeration
* @param description default string description of the enumeration
*/
CollectionMemberStatus(int ordinal,
int openTypeOrdinal,
String name,
String description)
{
this.ordinal = ordinal;
this.openTypeOrdinal = openTypeOrdinal;
this.name = name;
this.description = description;
}


/**
* Return the numeric representation of the enumeration.
*
* @return int ordinal
*/
public int getOrdinal() { return ordinal; }


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


/**
* Return the default description of the enumeration.
*
* @return String description
*/
public String getDescription() { return description; }


/**
* Return the code for this enum that comes from the Open Metadata Type that this enum represents.
*
* @return int code number
*/
public int getOpenTypeOrdinal()
{
return openTypeOrdinal;
}


/**
* Return the unique identifier for the open metadata enum type that this enum class represents.
*
* @return string guid
*/
public String getOpenTypeGUID() { return ENUM_TYPE_GUID; }


/**
* Return the unique name for the open metadata enum type that this enum class represents.
*
* @return string name
*/
public String getOpenTypeName() { return ENUM_TYPE_NAME; }


/**
* toString() JSON-style
*
* @return string description
*/
@Override
public String toString()
{
return "CollectionMemberStatus : " + name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,34 @@
@JsonIgnoreProperties(ignoreUnknown=true)
public enum CollectionOrder implements Serializable
{
/**
* Order the collection by the names of the members in the collection.
*/
NAME (0, 0, "Name", "Order the collection by the names of the members in the collection."),
OWNER (1, 1, "Owner", "Order the collection by the owners of the members in the collection (assets only)."),

/**
* Order the collection by the owners of the members in the collection.
*/
OWNER (1, 1, "Owner", "Order the collection by the owners of the members in the collection."),

/**
* Order the collection by the date that the members were added to the collection.
*/
DATE_ADDED (2, 2, "Date Added", "Order the collection by the date that the members were added to the collection."),

/**
* Order the collection by the date that the members were updated in the collection.
*/
DATE_UPDATED (3, 3, "Date Updated", "Order the collection by the date that the members were updated in the collection."),

/**
* Order the collection by the date that the members were created in the collection.
*/
DATE_CREATED (4, 4, "Date Created", "Order the collection by the date that the members were created in the collection."),

/**
* Order the collection by another value.
*/
OTHER (99, 99, "Other", "Order the collection by another value.");

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* CollectionProperties describes the core properties of a collection.
* CollectionProperties describes the core properties of a collection. The collection is a managed list of elements.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
Expand All @@ -24,8 +24,9 @@
})
public class CollectionProperties extends ReferenceableProperties
{
private String name = null;
private String description = null;
private String name = null;
private String description = null;
private String collectionType = null;


/**
Expand All @@ -50,6 +51,7 @@ public CollectionProperties(CollectionProperties template)
{
this.name = template.getName();
this.description = template.getDescription();
this.collectionType = template.getCollectionType();
}
}

Expand Down Expand Up @@ -98,6 +100,28 @@ public void setDescription(String description)
}


/**
* Return a descriptive name for the collection's type.
*
* @return string name
*/
public String getCollectionType()
{
return collectionType;
}


/**
* Set up a descriptive name for the collection's type.
*
* @param collectionType string name
*/
public void setCollectionType(String collectionType)
{
this.collectionType = collectionType;
}


/**
* JSON-style toString
*
Expand All @@ -109,6 +133,7 @@ public String toString()
return "CollectionProperties{" +
"name='" + name + '\'' +
", description='" + description + '\'' +
", collectionType='" + collectionType + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
", typeName='" + getTypeName() + '\'' +
Expand Down Expand Up @@ -139,7 +164,7 @@ public boolean equals(Object objectToCompare)
return false;
}
CollectionProperties that = (CollectionProperties) objectToCompare;
return Objects.equals(getName(), that.getName()) &&
return Objects.equals(getName(), that.getName()) && Objects.equals(getCollectionType(), that.getCollectionType()) &&
Objects.equals(getDescription(), that.getDescription());
}

Expand All @@ -152,6 +177,6 @@ public boolean equals(Object objectToCompare)
@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), getName(), getDescription());
return Objects.hash(super.hashCode(), getName(), getDescription(), getCollectionType());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,19 @@ public void setCollectionOrderingProperty(String collectionOrderingProperty)
public String toString()
{
return "CollectionFolderProperties{" +
"collectionOrderingProperty='" + collectionOrderingProperty + '\'' +
", collectionOrdering=" + collectionOrdering +
", name='" + getName() + '\'' +
", description='" + getDescription() + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
", effectiveFrom=" + getEffectiveFrom() +
", effectiveTo=" + getEffectiveTo() +
", vendorProperties=" + getVendorProperties() +
", typeName='" + getTypeName() + '\'' +
", extendedProperties=" + getExtendedProperties() +
'}';
"collectionOrderingProperty='" + collectionOrderingProperty + '\'' +
", collectionOrdering=" + collectionOrdering +
", name='" + getName() + '\'' +
", description='" + getDescription() + '\'' +
", collectionType='" + getCollectionType() + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
", effectiveFrom=" + getEffectiveFrom() +
", effectiveTo=" + getEffectiveTo() +
", vendorProperties=" + getVendorProperties() +
", typeName='" + getTypeName() + '\'' +
", extendedProperties=" + getExtendedProperties() +
'}';
}

/**
Expand Down
Loading
Loading