Class SchemaTypeConverter<B>


public class SchemaTypeConverter<B> extends OMFConverter<B>
SchemaTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) EntityDetail object into a SchemaTypeElement bean.
  • Constructor Details

    • SchemaTypeConverter

      public SchemaTypeConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
      Constructor
      Parameters:
      repositoryHelper - helper object to parse entity
      serviceName - name of this component
      serverName - local server name
  • Method Details

    • getNewSchemaTypeBean

      public B getNewSchemaTypeBean(Class<B> beanClass, InstanceHeader schemaRootHeader, String schemaTypeTypeName, InstanceProperties schemaRootProperties, List<Classification> schemaRootClassifications, int attributeCount, String validValueSetGUID, String externalSchemaTypeGUID, B externalSchemaType, String mapFromSchemaTypeGUID, B mapFromSchemaType, String mapToSchemaTypeGUID, B mapToSchemaType, List<String> schemaTypeOptionGUIDs, List<B> schemaTypeOptions, List<Relationship> queryTargetRelationships, String methodName) throws PropertyServerException
      Return the converted bean. This is a special method used for schema types since they are stored as a collection of instances. For external schema types and map elements, both the GUID and the bean are returned to allow the consuming OMAS to choose whether it is returning GUIDs of the linked to schema or the schema type bean itself.
      Overrides:
      getNewSchemaTypeBean in class OpenMetadataAPIGenericConverter<B>
      Parameters:
      beanClass - name of the class to create
      schemaRootHeader - header of the schema element that holds the root information
      schemaTypeTypeName - name of type of the schema type to create
      schemaRootProperties - properties describing the schema type
      schemaRootClassifications - classifications from the schema root entity
      attributeCount - number of attributes (for a complex schema type)
      validValueSetGUID - unique identifier of the set of valid values (for an enum schema type)
      externalSchemaTypeGUID - unique identifier of the external schema type
      externalSchemaType - unique identifier for the properties of the schema type that is shared by multiple attributes/assets
      mapFromSchemaTypeGUID - unique identifier of the mapFrom schema type
      mapFromSchemaType - bean containing the properties of the schema type that is part of a map definition
      mapToSchemaTypeGUID - unique identifier of the mapTo schema type
      mapToSchemaType - bean containing the properties of the schema type that is part of a map definition
      schemaTypeOptionGUIDs - list of unique identifiers for schema types that could be the type for this attribute
      schemaTypeOptions - list of schema types that could be the type for this attribute
      queryTargetRelationships - list of relationships to schema types that contain data values used to derive the schema type value(s)
      methodName - calling method
      Returns:
      bean populated with properties from the instances supplied
      Throws:
      PropertyServerException - there is a problem instantiating the bean