Class 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 Detail

      • 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 Detail

      • 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
      • getMetadataElementHeader

        public ElementHeader getMetadataElementHeader​(Class<B> beanClass,
                                                      InstanceHeader header,
                                                      String methodName)
                                               throws PropertyServerException
        Extract the properties from the entity or relationship.
        Parameters:
        beanClass - name of the class to create
        header - header from the entity containing the properties
        methodName - calling method
        Returns:
        filled out element header
        Throws:
        PropertyServerException - there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler
      • getElementStub

        public ElementStub getElementStub​(Class<B> beanClass,
                                          EntityProxy entityProxy,
                                          String methodName)
                                   throws PropertyServerException
        Extract the properties from the entity.
        Parameters:
        beanClass - name of the class to create
        entityProxy - entityProxy from the relationship containing the properties
        methodName - calling method
        Returns:
        filled out element header
        Throws:
        PropertyServerException - there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler