|
||||||||||
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 |
---|
Fields inherited from interface gov.nasa.pds.tools.label.validate.Status |
---|
FAIL, PASS, SKIP, UNKNOWN |
Constructor Summary | |
---|---|
Dictionary()
|
Method Summary | |
---|---|
void |
addDefinition(Definition definition)
Adds a definition to this dictionary to. |
void |
addDefinition(Definition definition,
boolean overwrite)
Adds a defintion to this dictionary. |
void |
addDefinitions(java.util.Collection definitions)
Adds a list of defintions to this dictionary. |
void |
addDefinitions(java.util.Collection definitions,
boolean overwrite)
Adds a list of defintions to this dictionary. |
boolean |
containsDefinition(java.lang.String identifier)
Tests to see whether or not a definition exists |
boolean |
containsElementDefinition(java.lang.String identifier)
Tests to see whether or not an element is defined |
boolean |
containsElementDefinition(java.lang.String objectContext,
java.lang.String identifier)
|
boolean |
containsGroupDefinition(java.lang.String identifier)
Tests to see whether or not a group is defined |
boolean |
containsObjectDefinition(java.lang.String identifier)
Tests to see whether or not an object is defined |
GroupDefinition |
findGroupClassDefinition(java.lang.String identifier)
Retrieves the class definition for a group with the given identifier. |
ObjectDefinition |
findObjectClassDefinition(java.lang.String identifier)
Retrieves the class definition for an object with the given identifier. |
Definition |
getDefinition(java.lang.String identifier)
Retrieves the definition from the dictionary or null if not found |
java.util.Map |
getDefinitions()
Retrieves the map of definitions |
ElementDefinition |
getElementDefinition(java.lang.String identifier)
Retrieves the element definition from the dictionary or null if not found. |
ElementDefinition |
getElementDefinition(java.lang.String objectContext,
java.lang.String identifier)
|
GroupDefinition |
getGroupDefinition(java.lang.String identifier)
Retrieves the group definition from the dictionary or null if not found |
java.lang.String |
getInformation()
Return the dictionary's descriptive information. |
ObjectDefinition |
getObjectDefinition(java.lang.String identifier)
Retrieves the object definition from the dictionary or null if not found |
java.lang.String |
getStatus()
|
java.util.Map |
getUnits()
Retrieves map of valid units. |
void |
merge(Dictionary dictionary)
Merges dictionary without overwriting |
void |
merge(Dictionary dictionary,
boolean overwrite)
Merges the definitions in the dictionaries |
void |
setInformation(java.lang.String information)
Sets the description information for a dictionary. |
void |
setStatus(java.lang.String status)
|
void |
setUnits(java.util.Map units)
Sets the valid units for use when performing validation against this dictionary |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Dictionary()
Method Detail |
---|
public void merge(Dictionary dictionary)
dictionary
- to be mergedpublic void merge(Dictionary dictionary, boolean overwrite)
dictionary
- to be mergedoverwrite
- flagpublic boolean containsDefinition(java.lang.String identifier)
identifier
- of the definition
public boolean containsObjectDefinition(java.lang.String identifier)
identifier
- of the object
public boolean containsGroupDefinition(java.lang.String identifier)
identifier
- of the the group
public boolean containsElementDefinition(java.lang.String identifier)
identifier
- of the element
public boolean containsElementDefinition(java.lang.String objectContext, java.lang.String identifier)
public Definition getDefinition(java.lang.String identifier)
identifier
- of the definition
public ObjectDefinition getObjectDefinition(java.lang.String identifier)
identifier
- of the definition
public GroupDefinition getGroupDefinition(java.lang.String identifier)
identifier
- of the definition
public ElementDefinition getElementDefinition(java.lang.String identifier)
identifier
- of the definition
public ElementDefinition getElementDefinition(java.lang.String objectContext, java.lang.String identifier)
public void addDefinition(Definition definition)
definition
- to be added to the dictionarypublic void addDefinition(Definition definition, boolean overwrite)
definition
- to be added to the dictionaryoverwrite
- indicates if definition should be overwritenpublic void setInformation(java.lang.String information)
information
- public java.lang.String getInformation()
public void addDefinitions(java.util.Collection definitions, boolean overwrite)
definitions
- to be added to the dictionaryoverwrite
- public void addDefinitions(java.util.Collection definitions)
definitions
- to be added to the dictionarypublic ObjectDefinition findObjectClassDefinition(java.lang.String identifier)
identifier
- to lookup up class of
ObjectDefinition
of class that will constrain object with
given identifier. Returns null if not found.public GroupDefinition findGroupClassDefinition(java.lang.String identifier)
identifier
- to lookup up class of
GroupDefinition
of class that will constrain object with
given identifier. Returns null if not found.public java.util.Map getDefinitions()
public java.util.Map getUnits()
public void setUnits(java.util.Map units)
units
- mapped set of units of the form UNIT_ID to units list
(A) -> ('A', 'AMPERE')public java.lang.String getStatus()
public void setStatus(java.lang.String status)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |