Class SchemaAttributeConverter<B>

java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter<B>
org.odpi.openmetadata.accessservices.assetowner.converters.SchemaAttributeConverter<B>

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

    • SchemaAttributeConverter

      public SchemaAttributeConverter(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

    • getNewSchemaAttributeBean

      public <T> B getNewSchemaAttributeBean(Class<B> beanClass, EntityDetail schemaAttributeEntity, Class<T> typeClass, T schemaType, List<Relationship> schemaAttributeRelationships, String methodName) throws PropertyServerException
      Extract the properties from the schema attribute entity. Each API creates a specialization of this method for its beans.
      Overrides:
      getNewSchemaAttributeBean in class OpenMetadataAPIGenericConverter<B>
      Type Parameters:
      T - bean type used to create the schema type
      Parameters:
      beanClass - name of the class to create
      schemaAttributeEntity - entity containing the properties for the main schema attribute
      typeClass - name of type used to describe the schema type
      schemaType - bean containing the properties of the schema type - this is filled out by the schema type converter
      schemaAttributeRelationships - relationships containing the links to other schema attributes
      methodName - calling method
      Returns:
      bean populated with properties from the instances supplied
      Throws:
      PropertyServerException - there is a problem instantiating the bean
    • getRelatedElement

      public RelatedElement getRelatedElement(Class<B> beanClass, EntityDetail entity, Relationship relationship, String methodName) throws PropertyServerException
      Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that contain a combination of the properties from an entity and that of a connected relationship.
      Parameters:
      beanClass - name of the class to create
      entity - entity containing the properties
      relationship - relationship containing the properties
      methodName - calling method
      Returns:
      bean populated with properties from the instances supplied
      Throws:
      PropertyServerException - there is a problem instantiating the bean
    • getRelatedElement

      public RelatedElement getRelatedElement(Class<B> beanClass, Relationship relationship, EntityProxy entityProxy, String methodName) throws PropertyServerException
      Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that contain a combination of the properties from an entityProxy and that of a connected relationship.
      Parameters:
      beanClass - name of the class to create
      entityProxy - entityProxy containing the properties
      relationship - relationship containing the properties
      methodName - calling method
      Returns:
      bean populated with properties from the instances supplied
      Throws:
      PropertyServerException - there is a problem instantiating the bean