gov.nasa.pds.tools.dict.parser
Class DictionaryParser
java.lang.Object
gov.nasa.pds.tools.dict.parser.DictionaryParser
public class DictionaryParser
- extends java.lang.Object
This class provides the means to parse a PDS compliant data dictionary. The
Dictionary
created can be used for validation purposes or just to
examine the contents programmatically. To parse a dictionary use the
following:
Dictionary dictionary = DictionaryParser.parse(new URL(""));
If you wanted to turn of aliases the alternative parse method could be used:
Dictionary dictionary = DictionaryParser.parse(new URL(""), false);
- Version:
- $Revision: 4967 $
- Author:
- pramirez, jagander
Method Summary |
static void |
main(java.lang.String[] args)
|
static Dictionary |
parse(java.io.File file)
|
static Dictionary |
parse(java.io.File file,
boolean aliasing)
|
static Dictionary |
parse(java.io.File file,
boolean aliasing,
boolean storeProblems)
|
static Dictionary |
parse(java.net.URL url)
Parses a URL that is compliant with the PDS Data Dictionary
document and formulates a Dictionary with aliases turned off. |
static Dictionary |
parse(java.net.URL url,
boolean aliasing)
|
static Dictionary |
parse(java.net.URL url,
boolean aliasing,
boolean storeProblems)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OBJECT_TYPE_ID
protected static final DictIdentifier OBJECT_TYPE_ID
DESCRIPTION_ID
protected static final DictIdentifier DESCRIPTION_ID
STATUS_TYPE_ID
protected static final DictIdentifier STATUS_TYPE_ID
REQUIRED_OBJECTS_ID
protected static final DictIdentifier REQUIRED_OBJECTS_ID
OPTIONAL_OBJECTS_ID
protected static final DictIdentifier OPTIONAL_OBJECTS_ID
REQUIRED_ELEMENTS_ID
protected static final DictIdentifier REQUIRED_ELEMENTS_ID
OPTIONAL_ELEMENTS_ID
protected static final DictIdentifier OPTIONAL_ELEMENTS_ID
NAME_ID
protected static final DictIdentifier NAME_ID
DATA_TYPE_ID
protected static final DictIdentifier DATA_TYPE_ID
UNITS_ID
protected static final DictIdentifier UNITS_ID
MIN_LENGTH_ID
protected static final DictIdentifier MIN_LENGTH_ID
MAX_LENGTH_ID
protected static final DictIdentifier MAX_LENGTH_ID
VALUES_ID
protected static final DictIdentifier VALUES_ID
VALUE_TYPE_ID
protected static final DictIdentifier VALUE_TYPE_ID
MINIMUM_ID
protected static final DictIdentifier MINIMUM_ID
MAXIMUM_ID
protected static final DictIdentifier MAXIMUM_ID
UNIT_SEQUENCE_ID
protected static final DictIdentifier UNIT_SEQUENCE_ID
OBJECT_ALIASES_ID
protected static final DictIdentifier OBJECT_ALIASES_ID
ELEMENT_ALIASES_ID
protected static final DictIdentifier ELEMENT_ALIASES_ID
ALIAS_LIST_ID
protected static final DictIdentifier ALIAS_LIST_ID
UNIT_LIST_ID
protected static final DictIdentifier UNIT_LIST_ID
GENERIC_OBJECT_ID
protected static final DictIdentifier GENERIC_OBJECT_ID
SPECIFIC_OBJECT_ID
protected static final DictIdentifier SPECIFIC_OBJECT_ID
ELEMENT_DEFINITION_ID
protected static final DictIdentifier ELEMENT_DEFINITION_ID
DictionaryParser
public DictionaryParser()
parse
public static Dictionary parse(java.net.URL url)
throws LabelParserException,
java.io.IOException
- Parses a
URL
that is compliant with the PDS Data Dictionary
document and formulates a Dictionary
with aliases turned off.
- Parameters:
url
- points to the location of the dictionary
- Returns:
- a data dictionary with element, group, and object definitions
- Throws:
LabelParserException
- thrown when dictionary can not be parsed correctly
java.io.IOException
- thrown when dictionary can not be accessed
parse
public static Dictionary parse(java.net.URL url,
boolean aliasing)
throws LabelParserException,
java.io.IOException
- Throws:
LabelParserException
java.io.IOException
parse
public static Dictionary parse(java.net.URL url,
boolean aliasing,
boolean storeProblems)
throws LabelParserException,
java.io.IOException
- Throws:
LabelParserException
java.io.IOException
parse
public static Dictionary parse(java.io.File file)
throws LabelParserException,
java.io.IOException
- Throws:
LabelParserException
java.io.IOException
parse
public static Dictionary parse(java.io.File file,
boolean aliasing)
throws LabelParserException,
java.io.IOException
- Throws:
LabelParserException
java.io.IOException
parse
public static Dictionary parse(java.io.File file,
boolean aliasing,
boolean storeProblems)
throws LabelParserException,
java.io.IOException
- Throws:
LabelParserException
java.io.IOException
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2005-2009 Planetary Data System. All Rights Reserved.