Class DefinitionFactory


  • public class DefinitionFactory
    extends Object
    This class builds definitions from ObjectStatements. The format of the object statement should be in compliance standard PDS dictionary. These definitions can then be added to a Dictionary.
    Version:
    $Revision$
    Author:
    pramirez, jagander
    • Constructor Detail

      • DefinitionFactory

        public DefinitionFactory()
    • Method Detail

      • createDefinition

        public static Definition createDefinition​(Dictionary sourceDictionary,
                                                  ObjectStatement object)
                                           throws UnknownDefinitionException
        This method will determine the type of definition and created it. If it can not determine the type of definition that should be generated an error will be thrown.
        Parameters:
        sourceDictionary - with which this definition will be associated with. This call will NOT add the definition to the given source dictionary as Aliases have not been added to the definition at this point.
        object - from which the definition will be created
        Returns:
        a Definition that represents an entry in a PDS data dictionary
        Throws:
        UnknownDefinitionException - thrown when the type of definition can not be recognized.
      • createGroupDefinition

        public static GroupDefinition createGroupDefinition​(Dictionary sourceDictionary,
                                                            ObjectStatement object)
                                                     throws UnknownDefinitionException
        This method creates an GroupDefinition by gathering the attributes required from the ObjectStatement as specified in the PDS Data Dictionary document.
        Parameters:
        sourceDictionary - with which this definition will be associated with. This call will NOT add the definition to the given source dictionary as Aliases have not been added to the definition at this point.
        object - that has the information to form an GroupDefinition
        Returns:
        a Definition that represents an entry in a PDS data dictionary
        Throws:
        UnknownDefinitionException - thrown when the type of definition can not be recognized.