public class DictionaryParser extends Object
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 and Description |
---|
DictionaryParser() |
Modifier and Type | Method and Description |
---|---|
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) |
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
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 dictionaryLabelParserException
- thrown when dictionary can not be parsed correctlyIOException
- 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 inLabelParserException
- thrown when dictionary can not be parsed correctlyIOException
- thrown when dictionary can not be accessedCopyright © 2005–2015 Planetary Data System. All rights reserved.