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 Definition
createDefinition(Dictionary sourceDictionary, ObjectStatement object)
This method will determine the type of definition and created it.static ElementDefinition
createElementDefinition(Dictionary sourceDictionary, ObjectStatement object)
This method creates anElementDefinition
by gathering the attributes required from theObjectStatement
as specified in the PDS Data Dictionary document.static GroupDefinition
createGroupDefinition(Dictionary sourceDictionary, ObjectStatement object)
This method creates anGroupDefinition
by gathering the attributes required from theObjectStatement
as specified in the PDS Data Dictionary document.static ObjectDefinition
createObjectDefinition(Dictionary sourceDictionary, ObjectStatement object)
This method creates anObjectDefinition
by gathering the attributes required from theObjectStatement
as 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 asAlias
es 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.
-
createObjectDefinition
public static ObjectDefinition createObjectDefinition(Dictionary sourceDictionary, ObjectStatement object) throws UnknownDefinitionException
This method creates anObjectDefinition
by gathering the attributes required from theObjectStatement
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 asAlias
es have not been added to the definition at this point.object
- that has the information to form anObjectDefinition
- 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 anGroupDefinition
by gathering the attributes required from theObjectStatement
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 asAlias
es have not been added to the definition at this point.object
- that has the information to form anGroupDefinition
- Returns:
- a
Definition
that 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 anElementDefinition
by gathering the attributes required from theObjectStatement
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 asAlias
es have not been added to the definition at this point.object
- that has the information to form anElementDefinition
- Returns:
- a
Definition
that represents an entry in a PDS data dictionary - Throws:
UnknownDefinitionException
- thrown when the type of definition can not be recognized.
-
-