Class SchemaTypeBuilder
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder
org.odpi.openmetadata.commonservices.generichandlers.SchemaTypeBuilder
SchemaTypeBuilder manages the properties for a schema type. These properties may be stored in a schema type entity or
a type embedded attribute classification (linked off of schema attribute).
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder
qualifiedName
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
errorHandler, existingClassifications, extendedProperties, instanceStatus, newClassifications, repositoryHelper, serverName, serviceName, templateProperties, typeGUID, typeName
-
Constructor Summary
ConstructorDescriptionSchemaTypeBuilder
(String qualifiedName, String displayName, String description, String versionNumber, boolean isDeprecated, String author, String usage, String encodingStandard, String namespace, String formula, Map<String, String> additionalProperties, String typeId, String typeName, Map<String, Object> extendedProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor supporting all common properties and formula.SchemaTypeBuilder
(String qualifiedName, String displayName, String description, String versionNumber, boolean isDeprecated, String author, String usage, String encodingStandard, String namespace, Map<String, String> additionalProperties, String typeId, String typeName, Map<String, Object> extendedProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor supporting all common properties.SchemaTypeBuilder
(String qualifiedName, String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Simple typed constructorSchemaTypeBuilder
(String qualifiedName, String displayName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Minimal constructor -
Method Summary
Modifier and TypeMethodDescriptiongetCalculatedValueProperties
(String methodName) Return the schema type properties in an InstanceProperties object.Return the unique identifier for an external schema type.getInstanceProperties
(String methodName) Return the supplied bean properties in an InstanceProperties object.Return the builder for the type of the value that is in the domain of the map.Return the GUID for the type of the value that is in the domain of the map.getMapTo()
Return the builder for the type of the value that is in the range of the map.Return the GUID for the type of the value that is in the range of the map.Return the list of types that are represented by a schema option type.getTypeEmbeddedInstanceProperties
(String methodName) Return the supplied bean properties in an InstanceProperties object for a TypeEmbeddedAttribute classification.Return the unique identifier of the valid values set that lists the permitted values for the attached schema attribute.boolean
Return whether the schema has a derived value of not.void
setDataType
(String dataType) Set up the type of data (for simple and literal types)void
setDefaultValue
(String defaultValue) Set up the default value of a field (for simple types).void
setDerivedProperties
(String formula) Set up the properties that indicate that the schema element's value is not stored, it is derived from other values.void
Set up the unique identifier for an external schema type.void
setFixedValue
(String fixedValue) Set up the fixed data value (for literal types).void
setMapGUIDs
(String mapFromGUID, String mapToGUID) Set up the builder to support a map type.void
setMapTypes
(SchemaTypeBuilder mapFrom, SchemaTypeBuilder mapTo) Set up the builder to support a map type.void
setSchemaOptions
(List<SchemaTypeBuilder> schemaOptions) Set up the list of types that are represented by a schema option type.void
setValidValuesSetGUID
(String validValuesSetGUID) Set up the unique identifier of the valid values set that lists the permitted values for the attached schema attribute.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder
getMementoProperties, getQualifiedName, setMemento, setOwnershipClassification, setSecurityTags, setTemplate
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
getEntityClassifications, getInstanceProperties, getInstanceStatus, getTypeGUID, getTypeName, isClassificationSet, setAnchors, setClassification, setEffectivityDates, setEffectivityDates, setTemplateClassifications, setTemplateSubstitute, updateInstanceProperties
-
Constructor Details
-
SchemaTypeBuilder
public SchemaTypeBuilder(String qualifiedName, String displayName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Minimal constructor- Parameters:
qualifiedName
- unique namedisplayName
- new value for the display name.repositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
SchemaTypeBuilder
public SchemaTypeBuilder(String qualifiedName, String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Simple typed constructor- Parameters:
qualifiedName
- unique nametypeName
- name of the type for this schema elementtypeId
- unique identifier of the type for this schema elementrepositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
SchemaTypeBuilder
public SchemaTypeBuilder(String qualifiedName, String displayName, String description, String versionNumber, boolean isDeprecated, String author, String usage, String encodingStandard, String namespace, Map<String, String> additionalProperties, String typeId, String typeName, Map<String, Object> extendedProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor supporting all common properties.- Parameters:
qualifiedName
- unique name of schema type itselfdisplayName
- new value for the display name.description
- description of the schema type.versionNumber
- version of the schema type.isDeprecated
- is the schema type deprecatedauthor
- name of the authorusage
- guidance on how the schema should be used.encodingStandard
- format of the schema.namespace
- namespace where the schema is defined.additionalProperties
- additional propertiestypeName
- unique name of schema sub typetypeId
- unique identifier of the schema subtypeextendedProperties
- properties from the subtype.repositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
SchemaTypeBuilder
public SchemaTypeBuilder(String qualifiedName, String displayName, String description, String versionNumber, boolean isDeprecated, String author, String usage, String encodingStandard, String namespace, String formula, Map<String, String> additionalProperties, String typeId, String typeName, Map<String, Object> extendedProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor supporting all common properties and formula.- Parameters:
qualifiedName
- unique name of schema type itselfdisplayName
- new value for the display name.description
- description of the schema type.versionNumber
- version of the schema type.isDeprecated
- is the schema type deprecatedauthor
- name of the authorusage
- guidance on how the schema should be used.encodingStandard
- format of the schema.namespace
- namespace where the schema is defined.formula
- formula for derived propertiesadditionalProperties
- additional propertiestypeName
- unique name of schema sub typetypeId
- unique identifier of the schema subtypeextendedProperties
- properties from the subtype.repositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
-
Method Details
-
setDataType
Set up the type of data (for simple and literal types)- Parameters:
dataType
- string name
-
setDefaultValue
Set up the default value of a field (for simple types).- Parameters:
defaultValue
- string value
-
setFixedValue
Set up the fixed data value (for literal types).- Parameters:
fixedValue
- string value
-
setExternalSchemaTypeGUID
Set up the unique identifier for an external schema type.- Parameters:
guid
- string guid
-
getExternalSchemaTypeGUID
Return the unique identifier for an external schema type.- Returns:
- string guid
-
setValidValuesSetGUID
Set up the unique identifier of the valid values set that lists the permitted values for the attached schema attribute.- Parameters:
validValuesSetGUID
- string guid
-
getValidValuesSetGUID
Return the unique identifier of the valid values set that lists the permitted values for the attached schema attribute.- Returns:
- string guid
-
setMapTypes
Set up the builder to support a map type. This needs to point to two other schema types.- Parameters:
mapFrom
- the type of the value that is in the domain of the mapmapTo
- the type of the value that is in the rage of the map
-
setMapGUIDs
Set up the builder to support a map type. This needs to point to two other schema types.- Parameters:
mapFromGUID
- the GUID of the value that is in the domain of the mapmapToGUID
- the GUID of the value that is in the rage of the map
-
getMapFrom
Return the builder for the type of the value that is in the domain of the map.- Returns:
- builder for requested type
-
getMapTo
Return the builder for the type of the value that is in the range of the map.- Returns:
- builder for requested type
-
getMapFromGUID
Return the GUID for the type of the value that is in the domain of the map.- Returns:
- string
-
getMapToGUID
Return the GUID for the type of the value that is in the range of the map.- Returns:
- string
-
setSchemaOptions
Set up the list of types that are represented by a schema option type.- Parameters:
schemaOptions
- list of builders
-
getSchemaOptions
Return the list of types that are represented by a schema option type.- Returns:
- list of builders
-
setDerivedProperties
Set up the properties that indicate that the schema element's value is not stored, it is derived from other values. The formula is stored in the CalculatedValue classification. If it is null, the queries are ignored. The queries are each stored as a DerivedSchemaTypeQueryTarget.- Parameters:
formula
- expression, possibly with place holders to insert the values returned from the queries
-
isDerived
public boolean isDerived()Return whether the schema has a derived value of not. This is determined from the setting of formula- Returns:
- boolean
-
getCalculatedValueProperties
Return the schema type properties in an InstanceProperties object.- Parameters:
methodName
- name of the calling method- Returns:
- InstanceProperties object
-
getInstanceProperties
Return the supplied bean properties in an InstanceProperties object.- Overrides:
getInstanceProperties
in classReferenceableBuilder
- Parameters:
methodName
- name of the calling method- Returns:
- InstanceProperties object
- Throws:
InvalidParameterException
- there is a problem with the properties
-
getTypeEmbeddedInstanceProperties
public InstanceProperties getTypeEmbeddedInstanceProperties(String methodName) throws InvalidParameterException Return the supplied bean properties in an InstanceProperties object for a TypeEmbeddedAttribute classification. If the caller uses this when there are extended properties defined for the builder then the call to create or add the entity will fail with invalid properties.- Parameters:
methodName
- name of the calling method- Returns:
- InstanceProperties object
- Throws:
InvalidParameterException
- there is a problem with the properties
-