gov.nasa.pds.tools.dict.parser
Class DefinitionFactory
java.lang.Object
gov.nasa.pds.tools.dict.parser.DefinitionFactory
- All Implemented Interfaces:
- DictionaryTokens, ODLTokenTypes
public class DefinitionFactory
- extends java.lang.Object
- implements ODLTokenTypes, DictionaryTokens
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: 2944 $
- Author:
- pramirez
Fields inherited from interface gov.nasa.pds.tools.label.antlr.ODLTokenTypes |
BASED_INTEGER, COMMENT, DATE, DATETIME, DAY, DIGIT, DIGITS, DOY, ELEMENT_IDENT, END, END_GROUP, END_OBJECT, EOF, EOL, EQUALS, EXP_OP, EXTENDED_DIGIT, FRACTION, HOUR, IDENTIFIER, IGNORE, INTEGER, LETTER, LIST_SEPARATOR, LITERAL_GROUP, LITERAL_OBJECT, MINUTE, MONTH, MULT_OP, NULL_TREE_LOOKAHEAD, NUMBER_OR_DATETIME, POINT_OPERATOR, QUOTED, REAL, SECOND, SEQUENCE_CLOSING, SEQUENCE_OPENING, SET_CLOSING, SET_OPENING, SIGN, SPECIALCHAR, SYMBOL, TIME, UNITS, UNITS_FACTOR, WS, YEAR |
Fields inherited from interface gov.nasa.pds.tools.dict.DictionaryTokens |
ALIAS_LIST, DATA_TYPE, DEFINITION, DESCRIPTION, ELEMENT_ALIASES, ELEMENT_DEFINITION, ELEMENT_IDENT_LENGTH, GENERIC_GROUP, GENERIC_OBJECT, MAX_LENGTH, MAXIMUM, MIN_LENGTH, MINIMUM, NAME, NAMESPACE_LENGTH, NOT_APPLICABLE, OBJECT_ALIASES, OBJECT_TYPE, OBJECT_TYPE_GENERIC, OBJECT_TYPE_GENERIC_GROUP, OBJECT_TYPE_SPECIFIC, OBJECT_TYPE_SPECIFIC_GROUP, OPTIONAL_ELEMENTS, OPTIONAL_OBJECTS, REQUIRED_ELEMENTS, REQUIRED_OBJECTS, SPECIFIC_GROUP, SPECIFIC_OBJECT, STATUS_TYPE, UNIT_LIST, UNIT_SEQUENCE, UNITS, VALUE_TYPE, VALUE_TYPE_STATIC, VALUE_TYPE_SUGGESTED, VALUES |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefinitionFactory
public DefinitionFactory()
createDefinition
public static Definition createDefinition(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:
object
- from which the defintion 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(ObjectStatement object)
throws UnknownDefinitionException
- This method creates an
ObjectDefinition
by gathering the attributes required
from the ObjectStatement
as specified in the PDS Data Dictionary document.
- Parameters:
object
- that has the information to form an ObjectDefinition
- 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(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:
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.
createElementDefinition
public static ElementDefinition createElementDefinition(ObjectStatement object)
throws UnknownDefinitionException
- This method creates an
ElementDefinition
by gathering the attributes required
from the ObjectStatement
as specified in the PDS Data Dictionary document.
- Parameters:
object
- that has the information to form an ElementDefinition
- Returns:
- a
Definition
that represents an entry in a PDS data dictionary
- Throws:
UnknownDefinitionException
- thrown when the type of definition can not be recognized.
Copyright © 2005-2009 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.