gov.nasa.pds.tools.dict.parser
Class DefinitionFactory

java.lang.Object
  extended by 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 a Dictionary.

Version:
$Revision: 6087 $
Author:
pramirez, jagander

Constructor Summary
DefinitionFactory()
           
 
Method Summary
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 an ElementDefinition by gathering the attributes required from the ObjectStatement as specified in the PDS Data Dictionary document.
static GroupDefinition createGroupDefinition(Dictionary sourceDictionary, ObjectStatement object)
          This method creates an GroupDefinition by gathering the attributes required from the ObjectStatement as specified in the PDS Data Dictionary document.
static ObjectDefinition createObjectDefinition(Dictionary sourceDictionary, ObjectStatement object)
          This method creates an ObjectDefinition by gathering the attributes required from the ObjectStatement as specified in the PDS Data Dictionary document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

createObjectDefinition

public static ObjectDefinition createObjectDefinition(Dictionary sourceDictionary,
                                                      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:
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 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(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.

createElementDefinition

public static ElementDefinition createElementDefinition(Dictionary sourceDictionary,
                                                        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:
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 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-2011 Planetary Data System. All Rights Reserved.