|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.tools.dict.parser.DictionaryParser
public class DictionaryParser
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("
Constructor Summary | |
---|---|
DictionaryParser()
|
Method Summary | |
---|---|
static void |
main(String[] args)
|
static Dictionary |
parse(File file)
|
static Dictionary |
parse(File file,
boolean aliasing)
|
static Dictionary |
parse(File file,
boolean aliasing,
boolean storeProblems)
|
static Dictionary |
parse(InputStream input,
Dictionary dictionary,
boolean aliasing,
boolean storeProblems)
Parses a URL that is compliant with the PDS Data Dictionary
document and formulates a Dictionary with a flag to indicated
whether aliases should be read in. |
static Dictionary |
parse(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(URL url,
boolean aliasing)
|
static Dictionary |
parse(URL url,
boolean aliasing,
boolean storeProblems)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final DictIdentifier OBJECT_TYPE_ID
protected static final DictIdentifier DESCRIPTION_ID
protected static final DictIdentifier STATUS_TYPE_ID
protected static final DictIdentifier REQUIRED_OBJECTS_ID
protected static final DictIdentifier OPTIONAL_OBJECTS_ID
protected static final DictIdentifier REQUIRED_ELEMENTS_ID
protected static final DictIdentifier OPTIONAL_ELEMENTS_ID
protected static final DictIdentifier NAME_ID
protected static final DictIdentifier DATA_TYPE_ID
protected static final DictIdentifier UNITS_ID
protected static final DictIdentifier MIN_LENGTH_ID
protected static final DictIdentifier MAX_LENGTH_ID
protected static final DictIdentifier VALUES_ID
protected static final DictIdentifier VALUE_TYPE_ID
protected static final DictIdentifier MINIMUM_ID
protected static final DictIdentifier MAXIMUM_ID
protected static final DictIdentifier UNIT_SEQUENCE_ID
protected static final DictIdentifier OBJECT_ALIASES_ID
protected static final DictIdentifier ELEMENT_ALIASES_ID
protected static final DictIdentifier ALIAS_LIST_ID
protected static final DictIdentifier UNIT_LIST_ID
protected static final DictIdentifier GENERIC_OBJECT_ID
protected static final DictIdentifier SPECIFIC_OBJECT_ID
protected static final DictIdentifier ELEMENT_DEFINITION_ID
Constructor Detail |
---|
public DictionaryParser()
Method Detail |
---|
public static Dictionary parse(URL url) throws LabelParserException, IOException
URL
that is compliant with the PDS Data Dictionary
document and formulates a Dictionary
with aliases turned off.
url
- points to the location of the dictionary
LabelParserException
- thrown when dictionary can not be parsed correctly
IOException
- thrown when dictionary can not be accessedpublic static Dictionary parse(URL url, boolean aliasing) throws LabelParserException, IOException
LabelParserException
IOException
public static Dictionary parse(URL url, boolean aliasing, boolean storeProblems) throws LabelParserException, IOException
LabelParserException
IOException
public static Dictionary parse(File file) throws LabelParserException, IOException
LabelParserException
IOException
public static Dictionary parse(File file, boolean aliasing) throws LabelParserException, IOException
LabelParserException
IOException
public static Dictionary parse(File file, boolean aliasing, boolean storeProblems) throws LabelParserException, IOException
LabelParserException
IOException
public static Dictionary parse(InputStream input, Dictionary dictionary, boolean aliasing, boolean storeProblems) throws LabelParserException, IOException
URL
that is compliant with the PDS Data Dictionary
document and formulates a Dictionary
with a flag to indicated
whether aliases should be read in.
input
- input stream to dictionaryaliasing
- indicates if aliases should be read in
LabelParserException
- thrown when dictionary can not be parsed correctly
IOException
- thrown when dictionary can not be accessedpublic static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |