Class OMRSArchiveHelper
java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.utilities.OMRSRepositoryPropertiesUtilities
org.odpi.openmetadata.repositoryservices.archiveutilities.OMRSArchiveHelper
- All Implemented Interfaces:
OMRSRepositoryPropertiesHelper
OMRSArchiveHelper provides utility methods to help in the construction of open metadata archives.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.utilities.OMRSRepositoryPropertiesUtilities
METADATA_COLLECTION_ID_PROPERTY_NAME, METADATA_COLLECTION_NAME_PROPERTY_NAME
-
Constructor Summary
ConstructorDescriptionOMRSArchiveHelper
(OpenMetadataArchiveBuilder archiveBuilder, String archiveGUID, String archiveName, String originatorName, Date creationDate, long versionNumber, String versionName, InstanceProvenanceType instanceProvenanceType, String license) Constructor receives information about the archive being built.OMRSArchiveHelper
(OpenMetadataArchiveBuilder archiveBuilder, String archiveGUID, String originatorName, Date creationDate, long versionNumber, String versionName) Constructor receives information about the archive being built. -
Method Summary
Modifier and TypeMethodDescriptiongetArrayCollectionDef
(String guid, String description, String descriptionGUID, PrimitiveDefCategory arrayType) Create a CollectionDef for an Array.getArrayEnumTypeDefAttribute
(String enumArrayTypeName, String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name, type and description.getArrayIntTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is an array of strings.getArrayStringTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is an array of strings.getBasicRelationshipDef
(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, String descriptionWiki, ClassificationPropagationRule propagationRule) Returns a basic RelationshipDef without any attributes or ends set up.getBasicRelationshipDef
(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, ClassificationPropagationRule propagationRule) Returns a basic RelationshipDef without any attributes or ends set up.getBasicRelationshipDef
(OpenMetadataType type, TypeDefLink superType, ClassificationPropagationRule propagationRule) Returns a basic RelationshipDef without any attributes or ends set up.getBooleanTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type boolean.getClassification
(String typeName, InstanceProperties properties, InstanceStatus status) Return a specific classification instance.getClassificationDef
(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, String descriptionWiki, List<TypeDefLink> validEntityDefs, boolean propagatable) Returns a basic ClassificationDef without any attributes.getClassificationDef
(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, String descriptionWiki, TypeDefLink validEntityDef, boolean propagatable) Returns a basic ClassificationDef without any attributes.getClassificationDef
(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, List<TypeDefLink> validEntityDefs, boolean propagatable) Returns a basic ClassificationDef without any attributes.getClassificationDef
(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, TypeDefLink validEntityDef, boolean propagatable) Returns a basic ClassificationDef without any attributes.getClassificationDef
(OpenMetadataType type, TypeDefLink superType, TypeDefLink validEntityDef, boolean propagatable) Returns a basic ClassificationDef without any attributes.getClassificationEntityExtension
(EntityProxy entity, Classification classification) Build a classification entity extension that is used to pass a classification in an archive.getDateTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type date.getDefaultEntityDef
(String guid, String name, TypeDefLink superType, String description, String descriptionGUID) Sets up a default EntityDef.getDefaultEntityDef
(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, String descriptionWiki) Sets up a default EntityDef.getDefaultEntityDef
(OpenMetadataType type, TypeDefLink superType) Sets up a default EntityDef.getEmptyEnumDef
(String guid, String name, String description, String descriptionGUID) Create an EnumDef that has no valid values defined.getEmptyEnumDef
(String guid, String name, String description, String descriptionGUID, String descriptionWiki) Create an EnumDef that has no valid values defined.getEntityDetail
(String typeName, String guid, InstanceProperties properties, InstanceStatus status, List<Classification> classifications) Return a specific entity detail instance.getEntityProxy
(String typeName, String guid, InstanceProperties properties, InstanceStatus status, List<Classification> classifications) Return a specific entity proxy instance.getEntityProxy
(EntityDetail entity) Build an entity proxy from an entity.getEnumElement
(String enumTypeName, int ordinal) Extract the enum value definition based on the ordinal.getEnumElementDef
(int ordinal, String value, String description, String descriptionGUID) Create an EnumElementDef that carries one of the valid values for an Enum.getEnumTypeDefAttribute
(String enumTypeName, String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name, type and description.getEnumTypeDefAttribute
(OpenMetadataProperty propertyDescription) Return an attribute with the supplied name, type and description.getFloatTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type long.getIntTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type int.getLongTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type long.getMapCollectionDef
(String guid, String description, String descriptionGUID, PrimitiveDefCategory propertyKeyType, PrimitiveDefCategory propertyValueType) Create a CollectionDef for a map.getMapStringBooleanTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to boolean.getMapStringDateTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to date.getMapStringDoubleTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to double.getMapStringIntTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to integer.getMapStringLongTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to long.getMapStringObjectTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to string.getMapStringStringTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to string.getPrimitiveDef
(PrimitiveDefCategory primitiveDefCategory) Set up an individual primitive definitiongetRelationship
(String typeName, String guid, InstanceProperties properties, InstanceStatus status, EntityProxy end1, EntityProxy end2) Return a specific relationship instance.getRelationshipEndDef
(TypeDefLink entityType, String attributeName, String attributeDescription, String attributeDescriptionGUID, RelationshipEndCardinality attributeCardinality) Returns a RelationshipEndDef object that sets up details of an entity at one end of a relationship.getStringTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type String.getTypeDefAttribute
(String attributeName, String attributeDescription, String attributeDescriptionGUID, PrimitiveDefCategory primitiveDefCategory) Return an attribute with the supplied name and description that is of type String.getTypeDefAttribute
(OpenMetadataProperty propertyDefinition) Return an attribute with the name and description that is of type identified by the supplied definition.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.utilities.OMRSRepositoryPropertiesUtilities
addBooleanMapPropertyToInstance, addBooleanPropertyMapToInstance, addBooleanPropertyToInstance, addDateMapPropertyToInstance, addDatePropertyMapToInstance, addDatePropertyToInstance, addDoubleMapPropertyToInstance, addDoublePropertyMapToInstance, addDoublePropertyToInstance, addEnumPropertyToInstance, addFloatPropertyToInstance, addIntMapPropertyToInstance, addIntPropertyMapToInstance, addIntPropertyToInstance, addLongMapPropertyToInstance, addLongPropertyMapToInstance, addLongPropertyToInstance, addMapPropertyToInstance, addObjectPropertyToInstance, addPropertyMapToInstance, addStringArrayPropertyToInstance, addStringArrayStringMapPropertyToInstance, addStringMapPropertyToInstance, addStringPropertyMapToInstance, addStringPropertyToInstance, applyPatch, getBooleanMapFromProperty, getBooleanProperty, getDateMapFromProperty, getDateProperty, getDoubleMapFromProperty, getEnumPropertyOrdinal, getInstancePropertiesAsMap, getIntegerMapFromProperty, getIntProperty, getLongMapFromProperty, getLongProperty, getMapFromProperty, getMapProperty, getSearchPropertiesFromInstanceProperties, getStringArrayProperty, getStringArrayStringMapFromProperty, getStringMapFromProperty, getStringProperty, getUniquePropertiesList, removeBooleanMapFromProperty, removeBooleanProperty, removeDateMapFromProperty, removeDateProperty, removeDoubleMapFromProperty, removeEnumPropertyOrdinal, removeIntegerMapFromProperty, removeIntProperty, removeLongMapFromProperty, removeLongProperty, removeMapFromProperty, removeProperty, removeStringArrayProperty, removeStringArrayStringMapFromProperty, removeStringMapFromProperty, removeStringProperty, validateTypeDefPatch
-
Constructor Details
-
OMRSArchiveHelper
public OMRSArchiveHelper(OpenMetadataArchiveBuilder archiveBuilder, String archiveGUID, String originatorName, Date creationDate, long versionNumber, String versionName) Constructor receives information about the archive being built. This constructor is suitable if only creating typeDefs.- Parameters:
archiveBuilder
- archive builder with the archive contents in it.archiveGUID
- unique identifier for the archive.originatorName
- name of the person / process creating the archive.creationDate
- date that the archive was first built.versionNumber
- version number of the archive.versionName
- version name for the archive.
-
OMRSArchiveHelper
public OMRSArchiveHelper(OpenMetadataArchiveBuilder archiveBuilder, String archiveGUID, String archiveName, String originatorName, Date creationDate, long versionNumber, String versionName, InstanceProvenanceType instanceProvenanceType, String license) Constructor receives information about the archive being built. This constructor is suitable for creating TypeDefs and instances.- Parameters:
archiveBuilder
- archive builder with the archive contents in it.archiveGUID
- unique identifier for the archive.archiveName
- unique name for the archive.originatorName
- name of the person / process creating the archive.creationDate
- date that the archive was first built.versionNumber
- version number of the archive.versionName
- version name for the archive.instanceProvenanceType
- type of archive.license
- license for the archive contents.
-
-
Method Details
-
getPrimitiveDef
Set up an individual primitive definition- Parameters:
primitiveDefCategory
- category of the primitive def defines the unique information about this primitive type.- Returns:
- initialized PrimitiveDef object ready for the archive
-
getArrayCollectionDef
public CollectionDef getArrayCollectionDef(String guid, String description, String descriptionGUID, PrimitiveDefCategory arrayType) Create a CollectionDef for an Array. A new CollectionDef is required for each combination of primitive types used to initialize the collection. Each CollectionDef has its own unique identifier (guid) and its name is a combination of the collection type and the primitives use to initialize it.- Parameters:
guid
- unique identifier for the CollectionDefdescription
- short default description of the enum typedescriptionGUID
- guid of the valid value describing this collection typearrayType
- type of the array.- Returns:
- Filled out CollectionDef
-
getMapCollectionDef
public CollectionDef getMapCollectionDef(String guid, String description, String descriptionGUID, PrimitiveDefCategory propertyKeyType, PrimitiveDefCategory propertyValueType) Create a CollectionDef for a map. A new CollectionDef is required for each combination of primitive types used to initialize the collection. Each CollectionDef has its own unique identifier (guid) and its name is a combination of the collection type and the primitives use to initialize it.- Parameters:
guid
- unique identifier for the CollectionDefdescription
- short default description of the enum typedescriptionGUID
- guid of the valid value describing this collection typepropertyKeyType
- type of the key for the map.propertyValueType
- type of map value.- Returns:
- Filled out CollectionDef
-
getEmptyEnumDef
public EnumDef getEmptyEnumDef(String guid, String name, String description, String descriptionGUID) Create an EnumDef that has no valid values defined. These are added by the caller.- Parameters:
guid
- unique identifier for the CollectionDefname
- unique name for the CollectionDefdescription
- short default description of the enum typedescriptionGUID
- guid of the valid value describing this enum type- Returns:
- basic EnumDef without valid values
-
getEmptyEnumDef
public EnumDef getEmptyEnumDef(String guid, String name, String description, String descriptionGUID, String descriptionWiki) Create an EnumDef that has no valid values defined. These are added by the caller.- Parameters:
guid
- unique identifier for the CollectionDefname
- unique name for the CollectionDefdescription
- short default description of the enum typedescriptionGUID
- guid of the valid value describing this enum typedescriptionWiki
- link to the url for documentation of this type- Returns:
- basic EnumDef without valid values
-
getEnumElementDef
public EnumElementDef getEnumElementDef(int ordinal, String value, String description, String descriptionGUID) Create an EnumElementDef that carries one of the valid values for an Enum.- Parameters:
ordinal
- code numbervalue
- namedescription
- short descriptiondescriptionGUID
- guid of the valid value describing this enum element- Returns:
- Fully filled out EnumElementDef
-
getDefaultEntityDef
public EntityDef getDefaultEntityDef(String guid, String name, TypeDefLink superType, String description, String descriptionGUID) Sets up a default EntityDef. Calling methods can override the default values. This EntityDef has no attribute defined.- Parameters:
guid
- unique identifier for the entityname
- name of the entitysuperType
- Super type for this entity (null for top-level)description
- short description of the entitydescriptionGUID
- guid of the valid value describing this entity type- Returns:
- Initialized EntityDef
-
getDefaultEntityDef
Sets up a default EntityDef. Calling methods can override the default values. This EntityDef has no attribute defined.- Parameters:
type
- type description enumsuperType
- Super type for this entity (null for top-level)- Returns:
- Initialized EntityDef
-
getDefaultEntityDef
public EntityDef getDefaultEntityDef(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, String descriptionWiki) Sets up a default EntityDef. Calling methods can override the default values. This EntityDef has no attribute defined.- Parameters:
guid
- unique identifier for the entityname
- name of the entitysuperType
- Super type for this entity (null for top-level)description
- short description of the entitydescriptionGUID
- guid of the valid value definition describing this entity typedescriptionWiki
- url to wiki page describing this type- Returns:
- Initialized EntityDef
-
getTypeDefAttribute
Return an attribute with the name and description that is of type identified by the supplied definition. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
propertyDefinition
- details of the attribute- Returns:
- TypeDefAttribute
-
getTypeDefAttribute
public TypeDefAttribute getTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID, PrimitiveDefCategory primitiveDefCategory) Return an attribute with the supplied name and description that is of type String. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getStringTypeDefAttribute
public TypeDefAttribute getStringTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type String. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getIntTypeDefAttribute
public TypeDefAttribute getIntTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type int. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getBooleanTypeDefAttribute
public TypeDefAttribute getBooleanTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type boolean. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getDateTypeDefAttribute
public TypeDefAttribute getDateTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type date. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getLongTypeDefAttribute
public TypeDefAttribute getLongTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type long. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getFloatTypeDefAttribute
public TypeDefAttribute getFloatTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of type long. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getArrayStringTypeDefAttribute
public TypeDefAttribute getArrayStringTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is an array of strings. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getArrayIntTypeDefAttribute
public TypeDefAttribute getArrayIntTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is an array of strings. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getMapStringStringTypeDefAttribute
public TypeDefAttribute getMapStringStringTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to string. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getMapStringObjectTypeDefAttribute
public TypeDefAttribute getMapStringObjectTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to string. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getMapStringBooleanTypeDefAttribute
public TypeDefAttribute getMapStringBooleanTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to boolean. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getMapStringLongTypeDefAttribute
public TypeDefAttribute getMapStringLongTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to long. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getMapStringDoubleTypeDefAttribute
public TypeDefAttribute getMapStringDoubleTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to double. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getMapStringDateTypeDefAttribute
public TypeDefAttribute getMapStringDateTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to date. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getMapStringIntTypeDefAttribute
public TypeDefAttribute getMapStringIntTypeDefAttribute(String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name and description that is of a map from string to integer. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
attributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getEnumTypeDefAttribute
Return an attribute with the supplied name, type and description. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
propertyDescription
- details of the attribute- Returns:
- TypeDefAttribute of type enum
-
getEnumTypeDefAttribute
public TypeDefAttribute getEnumTypeDefAttribute(String enumTypeName, String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name, type and description. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
enumTypeName
- name of the enum type for this attributeattributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type enum
-
getArrayEnumTypeDefAttribute
public TypeDefAttribute getArrayEnumTypeDefAttribute(String enumArrayTypeName, String attributeName, String attributeDescription, String attributeDescriptionGUID) Return an attribute with the supplied name, type and description. It is set up to be optional, indexable (useful for searches) but the value does not need to be unique. These are the typical values used for most open metadata attribute. They can be changed by the caller once the TypeDefAttribute is returned.- Parameters:
enumArrayTypeName
- name of the enum type for this attributeattributeName
- name of the attributeattributeDescription
- short description for the attributeattributeDescriptionGUID
- guid of the glossary term that describes this attribute.- Returns:
- TypeDefAttribute of type string
-
getBasicRelationshipDef
public RelationshipDef getBasicRelationshipDef(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, ClassificationPropagationRule propagationRule) Returns a basic RelationshipDef without any attributes or ends set up. The caller is responsible for adding the attributes and ends definition.- Parameters:
guid
- unique identifier for the relationshipname
- name of the relationshipsuperType
- Super type for this relationship (null for top-level)description
- short default description of the relationshipdescriptionGUID
- guid of the valid value that describes this relationshippropagationRule
- should classifications propagate over this relationship?- Returns:
- RelationshipDef with no ends defined.
-
getBasicRelationshipDef
public RelationshipDef getBasicRelationshipDef(OpenMetadataType type, TypeDefLink superType, ClassificationPropagationRule propagationRule) Returns a basic RelationshipDef without any attributes or ends set up. The caller is responsible for adding the attributes and ends definition.- Parameters:
type
- type description for the relationshipsuperType
- Super type for this relationship (null for top-level)propagationRule
- should classifications propagate over this relationship?- Returns:
- RelationshipDef with no ends defined.
-
getBasicRelationshipDef
public RelationshipDef getBasicRelationshipDef(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, String descriptionWiki, ClassificationPropagationRule propagationRule) Returns a basic RelationshipDef without any attributes or ends set up. The caller is responsible for adding the attributes and ends definition.- Parameters:
guid
- unique identifier for the relationshipname
- name of the relationshipsuperType
- Super type for this relationship (null for top-level)description
- short default description of the relationshipdescriptionGUID
- guid of the valid value that describes this relationshippropagationRule
- should classifications propagate over this relationship?descriptionWiki
- url to docs- Returns:
- RelationshipDef with no ends defined.
-
getRelationshipEndDef
public RelationshipEndDef getRelationshipEndDef(TypeDefLink entityType, String attributeName, String attributeDescription, String attributeDescriptionGUID, RelationshipEndCardinality attributeCardinality) Returns a RelationshipEndDef object that sets up details of an entity at one end of a relationship.- Parameters:
entityType
- details of the type of entity connected to this end.attributeName
- name of the attribute that the entity at the other end uses to refer to this entity.attributeDescription
- description of this attributeattributeDescriptionGUID
- unique identifier of the glossary term describing this attribute.attributeCardinality
- cardinality of this end of the relationship.- Returns:
- the definition of one end of a Relationship.
-
getClassificationDef
public ClassificationDef getClassificationDef(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, TypeDefLink validEntityDef, boolean propagatable) Returns a basic ClassificationDef without any attributes. The caller is responsible for adding the attribute definitions.- Parameters:
guid
- unique identifier for the classificationname
- name of the classificationsuperType
- Super type for this classification (null for top-level)description
- short description of the classificationdescriptionGUID
- unique identifier of the valid value that describes this classification.validEntityDef
- which entities can this classification be linked to.propagatable
- can the classification propagate over relationships?- Returns:
- ClassificationDef with no attributes defined.
-
getClassificationDef
public ClassificationDef getClassificationDef(OpenMetadataType type, TypeDefLink superType, TypeDefLink validEntityDef, boolean propagatable) Returns a basic ClassificationDef without any attributes. The caller is responsible for adding the attribute definitions.- Parameters:
type
- type description of the classificationsuperType
- Super type for this classification (null for top-level)validEntityDef
- which entities can this classification be linked to.propagatable
- can the classification propagate over relationships?- Returns:
- ClassificationDef with no attributes defined.
-
getClassificationDef
public ClassificationDef getClassificationDef(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, String descriptionWiki, TypeDefLink validEntityDef, boolean propagatable) Returns a basic ClassificationDef without any attributes. The caller is responsible for adding the attribute definitions.- Parameters:
guid
- unique identifier for the classificationname
- name of the classificationsuperType
- Super type for this classification (null for top-level)description
- short description of the classificationdescriptionGUID
- unique identifier of the valid value that describes this classificationdescriptionWiki
- url to wikivalidEntityDef
- which entities can this classification be linked to.propagatable
- can the classification propagate over relationships?- Returns:
- ClassificationDef with no attributes defined.
-
getClassificationDef
public ClassificationDef getClassificationDef(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, List<TypeDefLink> validEntityDefs, boolean propagatable) Returns a basic ClassificationDef without any attributes. The caller is responsible for adding the attribute definitions.- Parameters:
guid
- unique identifier for the classificationname
- name of the classificationsuperType
- Super type for this classification (null for top-level)description
- short description of the classificationdescriptionGUID
- unique identifier of the valid value that describes this classification.validEntityDefs
- which entities can this classification be linked to.propagatable
- can the classification propagate over relationships?- Returns:
- ClassificationDef with no attributes defined.
-
getClassificationDef
public ClassificationDef getClassificationDef(String guid, String name, TypeDefLink superType, String description, String descriptionGUID, String descriptionWiki, List<TypeDefLink> validEntityDefs, boolean propagatable) Returns a basic ClassificationDef without any attributes. The caller is responsible for adding the attribute definitions.- Parameters:
guid
- unique identifier for the classificationname
- name of the classificationsuperType
- Super type for this classification (null for top-level)description
- short description of the classificationdescriptionGUID
- unique identifier of the valid value that describes this classificationdescriptionWiki
- url to wikivalidEntityDefs
- which entities can this classification be linked to.propagatable
- can the classification propagate over relationships?- Returns:
- ClassificationDef with no attributes defined.
-
getEntityDetail
public EntityDetail getEntityDetail(String typeName, String guid, InstanceProperties properties, InstanceStatus status, List<Classification> classifications) Return a specific entity detail instance.- Parameters:
typeName
- type name of the entityguid
- unique identifier of the entityproperties
- properties (attributes) for the entitystatus
- instance statusclassifications
- list of classifications- Returns:
- assembled entity
-
getRelationship
public Relationship getRelationship(String typeName, String guid, InstanceProperties properties, InstanceStatus status, EntityProxy end1, EntityProxy end2) Return a specific relationship instance.- Parameters:
typeName
- type name of the relationshipguid
- unique identifier of the relationshipproperties
- properties (attributes) for the relationshipstatus
- instance statusend1
- relationship end 1end2
- relationship end 2- Returns:
- relationship instance
-
getClassification
public Classification getClassification(String typeName, InstanceProperties properties, InstanceStatus status) Return a specific classification instance.- Parameters:
typeName
- type name of the classificationproperties
- properties (attributes) for the classificationstatus
- instance status- Returns:
- classification instance
-
getEntityProxy
public EntityProxy getEntityProxy(String typeName, String guid, InstanceProperties properties, InstanceStatus status, List<Classification> classifications) Return a specific entity proxy instance.- Parameters:
typeName
- type name of the entityguid
- unique identifier of the entityproperties
- unique properties (attributes) for the entitystatus
- instance statusclassifications
- list of classifications- Returns:
- classification instance
-
getEntityProxy
Build an entity proxy from an entity.- Parameters:
entity
- entity to use as a template- Returns:
- new entity proxy.
-
getClassificationEntityExtension
public ClassificationEntityExtension getClassificationEntityExtension(EntityProxy entity, Classification classification) Build a classification entity extension that is used to pass a classification in an archive.- Parameters:
entity
- entity proxy to shoe where the classification should be attachedclassification
- classification to attach- Returns:
- new object
-
getEnumElement
Extract the enum value definition based on the ordinal.- Parameters:
enumTypeName
- name of the enum typeordinal
- ordinal number for the enum value- Returns:
- enum element def or its default value
-