|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.tools.dict.Dictionary
public class Dictionary
This class represents a PDS data dictionary.
Field Summary | |
---|---|
static Pattern |
VERSION_REGEX
|
Constructor Summary | |
---|---|
Dictionary()
|
|
Dictionary(File dictionaryFile)
|
|
Dictionary(URI dictionaryURI)
|
Method Summary | |
---|---|
void |
addDefinition(Definition definition)
Adds a definition to this dictionary. |
void |
addDefinitions(Collection<Definition> defs)
Adds a list of definitions to this dictionary. |
void |
addProblem(LabelParserException exception)
|
void |
addProblems(List<LabelParserException> exceptions)
|
void |
clearProblems()
|
boolean |
containsDefinition(DictIdentifier identifier)
Tests to see whether or not a definition exists |
boolean |
containsElementDefinition(DictIdentifier identifier)
Tests to see whether or not an element is defined |
boolean |
containsElementDefinition(String objectContext,
DictIdentifier identifier)
|
boolean |
containsGroupDefinition(DictIdentifier identifier)
Tests to see whether or not a group is defined |
boolean |
containsObjectDefinition(DictIdentifier identifier)
Tests to see whether or not an object is defined |
GroupDefinition |
findGroupClassDefinition(DictIdentifier identifier)
Retrieves the class definition for a group with the given identifier. |
ObjectDefinition |
findObjectClassDefinition(DictIdentifier identifier)
Retrieves the class definition for an object with the given identifier. |
Definition |
getDefinition(DictIdentifier identifier)
Retrieves the definition from the dictionary or null if not found |
protected Map<DictIdentifier,Definition> |
getDefinitions()
Retrieves the map of definitions |
File |
getDictionaryFile()
|
URI |
getDictionaryURI()
|
ElementDefinition |
getElementDefinition(DictIdentifier identifier)
Retrieves the element definition from the dictionary or null if not found. |
ElementDefinition |
getElementDefinition(String objectContext,
DictIdentifier identifier)
|
GroupDefinition |
getGroupDefinition(DictIdentifier identifier)
Retrieves the group definition from the dictionary or null if not found |
String |
getInformation()
Return the dictionary's descriptive information. |
List<SimpleDictionaryChange> |
getMergeChanges()
|
ObjectDefinition |
getObjectDefinition(DictIdentifier identifier)
Retrieves the object definition from the dictionary or null if not found |
List<LabelParserException> |
getProblems()
|
String |
getSourceString()
|
Map<String,String> |
getUnits()
|
String |
getVersion()
|
void |
merge(Dictionary dictionary)
Merges the definitions in the dictionaries |
void |
setInformation(String information)
Sets the description information for a dictionary. |
void |
setUnits(Map<String,String> units)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Pattern VERSION_REGEX
Constructor Detail |
---|
public Dictionary()
public Dictionary(URI dictionaryURI)
public Dictionary(File dictionaryFile)
Method Detail |
---|
public URI getDictionaryURI()
public File getDictionaryFile()
public String getSourceString()
public String getVersion()
public void merge(Dictionary dictionary)
dictionary
- to be merged into this dictionary. dictionary merged in will
override values in this dictionary if scalars or be added if
listspublic boolean containsDefinition(DictIdentifier identifier)
identifier
- of the definition
public boolean containsObjectDefinition(DictIdentifier identifier)
identifier
- of the object
public boolean containsGroupDefinition(DictIdentifier identifier)
identifier
- of the the group
public boolean containsElementDefinition(DictIdentifier identifier)
identifier
- of the element
public boolean containsElementDefinition(String objectContext, DictIdentifier identifier)
public Definition getDefinition(DictIdentifier identifier)
identifier
- of the definition
public ObjectDefinition getObjectDefinition(DictIdentifier identifier)
identifier
- of the definition
public GroupDefinition getGroupDefinition(DictIdentifier identifier)
identifier
- of the definition
public ElementDefinition getElementDefinition(DictIdentifier identifier)
identifier
- of the definition
public ElementDefinition getElementDefinition(String objectContext, DictIdentifier identifier)
public void addDefinition(Definition definition)
definition
- to be added to the dictionarypublic void setInformation(String information)
information
- public String getInformation()
public void addDefinitions(Collection<Definition> defs)
defs
- to be added to the dictionarypublic ObjectDefinition findObjectClassDefinition(DictIdentifier identifier)
identifier
- to lookup up class of
ObjectDefinition
of class that will constrain object with
given identifier. Returns null if not found.protected Map<DictIdentifier,Definition> getDefinitions()
public GroupDefinition findGroupClassDefinition(DictIdentifier identifier)
identifier
- to lookup up class of
GroupDefinition
of class that will constrain object with
given identifier. Returns null if not found.public List<SimpleDictionaryChange> getMergeChanges()
public void addProblem(LabelParserException exception)
public void addProblems(List<LabelParserException> exceptions)
public List<LabelParserException> getProblems()
public void clearProblems()
public Map<String,String> getUnits()
public void setUnits(Map<String,String> units)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |