Package gov.nasa.pds.tools.dict.parser
Class DefinitionFactory
- java.lang.Object
-
- gov.nasa.pds.tools.dict.parser.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 aDictionary.- Version:
- $Revision$
- Author:
- pramirez, jagander
-
-
Constructor Summary
Constructors Constructor Description DefinitionFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DefinitioncreateDefinition(Dictionary sourceDictionary, ObjectStatement object)This method will determine the type of definition and created it.static ElementDefinitioncreateElementDefinition(Dictionary sourceDictionary, ObjectStatement object)This method creates anElementDefinitionby gathering the attributes required from theObjectStatementas specified in the PDS Data Dictionary document.static GroupDefinitioncreateGroupDefinition(Dictionary sourceDictionary, ObjectStatement object)This method creates anGroupDefinitionby gathering the attributes required from theObjectStatementas specified in the PDS Data Dictionary document.static ObjectDefinitioncreateObjectDefinition(Dictionary sourceDictionary, ObjectStatement object)This method creates anObjectDefinitionby gathering the attributes required from theObjectStatementas specified in the PDS Data Dictionary document.
-
-
-
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 asAliases have not been added to the definition at this point.object- from which the definition will be created- Returns:
- a
Definitionthat represents an entry in a PDS data dictionary - Throws:
UnknownDefinitionException- thrown when the type of definition can not be recognized.
-
createObjectDefinition
public static ObjectDefinition createObjectDefinition(Dictionary sourceDictionary, ObjectStatement object) throws UnknownDefinitionException
This method creates anObjectDefinitionby gathering the attributes required from theObjectStatementas 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 asAliases have not been added to the definition at this point.object- that has the information to form anObjectDefinition- Returns:
- a
Definitionthat 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 anGroupDefinitionby gathering the attributes required from theObjectStatementas 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 asAliases have not been added to the definition at this point.object- that has the information to form anGroupDefinition- Returns:
- a
Definitionthat represents an entry in a PDS data dictionary - Throws:
UnknownDefinitionException- thrown when the type of definition can not be recognized.
-
createElementDefinition
public static ElementDefinition createElementDefinition(Dictionary sourceDictionary, ObjectStatement object) throws UnknownDefinitionException
This method creates anElementDefinitionby gathering the attributes required from theObjectStatementas 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 asAliases have not been added to the definition at this point.object- that has the information to form anElementDefinition- Returns:
- a
Definitionthat represents an entry in a PDS data dictionary - Throws:
UnknownDefinitionException- thrown when the type of definition can not be recognized.
-
-