|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.data.DataAlias
public class DataAlias
This class manages a set of data aliases - a mapping between
canonical names and a list of aliases for the canonical name.
This class is not instantiated - rather it provides a set of static
methods.
It is initialized by the IDV with an
XmlResourceCollection
that holds a set of aliases.xml files. The xml looks like:
<aliases> <alias name="TEMP" label="Temperature" aliases="T,t,Temperature,tdry" /> ... </aliases> </pre> Each alias tag holds a name (the canonical name), a label and a comma separated list of aliases for the name.
| Field Summary | |
|---|---|
static String |
ATTR_ALIASES
Xml attribute for aliases |
static String |
ATTR_LABEL
Xml attribute for label |
static String |
ATTR_NAME
Xml attribute for name |
static String |
TAG_ALIAS
Xml tag for canonical name |
static String |
TAG_ALIASES
Xml tag for aliases |
| Constructor Summary | |
|---|---|
DataAlias(String name,
String label)
Construct a new DataAlias with the given name and label. |
|
| Method Summary | |
|---|---|
protected void |
addAlias(String alias)
Add an alias for this object. |
protected void |
addAliases(List l)
Add alist of aliases to this DataAlias |
static String |
aliasToCanonical(String paramName)
Return the canonical name for the given alias. |
int |
compareTo(Object o)
_more_ |
static List |
createDataAliases(Element root)
Process the given xml and return a list of DataAlias objects defined within the xml. |
boolean |
equals(Object o)
See if o is equal to this. |
static DataAlias |
findAlias(String paramName)
Return the DataAlias object the given canonical name. |
List |
getAliases()
Get aliases for the name of this DataAlias |
static List |
getAliasesOf(String paramName)
Return the list of aliases (Strings) for the given canonical. |
static List |
getDataAliasList()
Return the list of canonical names ( String-s) |
String |
getLabel()
Get the label of this DataAlias |
static List |
getLabelIdList()
Return the list of name/label pairs ( TwoFacedObject-s) |
String |
getName()
Get the name of this DataAlias |
int |
hashCode()
Override of hashCode method. |
static void |
init(XmlResourceCollection resources)
Initialize the DataAlias-es with the given collection of xml resources, XmlResourceCollection |
static void |
reInit(XmlResourceCollection resources)
Reinitialize the data structures and reprocess the xml. |
void |
setLabel(String value)
Set the label of this DataAlias |
void |
setName(String value)
Set the name of this DataAlias |
String |
toString()
Returns a string representation of this DataAlias. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG_ALIAS
public static final String TAG_ALIASES
public static final String ATTR_ALIASES
public static final String ATTR_NAME
public static final String ATTR_LABEL
| Constructor Detail |
|---|
public DataAlias(String name,
String label)
name - name of this DataAliaslabel - label of this DataAlias. Used for displaying
a "nice" string for this DataAlias.| Method Detail |
|---|
protected void addAlias(String alias)
alias - alias to add.protected void addAliases(List l)
DataAlias
l - List of names (String-s)public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
o is equal to this.
equals in class Objecto - object in question
o is a DataAlias and they have the same
name.public void setName(String value)
DataAlias
value - new name.public String getName()
DataAlias
public void setLabel(String value)
DataAlias
value - new label.public String getLabel()
DataAlias
public List getAliases()
DataAlias
List of names.public static List createDataAliases(Element root)
root - root element of the XML
public int compareTo(Object o)
compareTo in interface Comparableo - _more_
public static void reInit(XmlResourceCollection resources)
AliasEditor
when aliases have been changed.
resources - collection of XML resourcespublic static void init(XmlResourceCollection resources)
XmlResourceCollection
resources - collection of XML resourcespublic static List getDataAliasList()
String-s)
List of namespublic static List getLabelIdList()
TwoFacedObject-s)
List of namespublic static String aliasToCanonical(String paramName)
paramName - alias to look for
DataAlias corresponding to
name or null if no match is found.public static List getAliasesOf(String paramName)
paramName - canonical name (name) to look for
List of aliases for the canonical name.public static DataAlias findAlias(String paramName)
paramName - alias to look for
DataAlias corresponding to
name or null if no match is found.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||