|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.jevio.EvioXMLDictionary
public class EvioXMLDictionary
This was developed to read the xml dictionary that Maurizio uses for GEMC. It implements INameProvider, just like all other dictionary readers. An assumption in the following class is that each unique tag/num pair corresponds to an equally unique name. In other words, 2 different tag/numm pairs cannot have the same name.
Field Summary |
---|
Fields inherited from interface org.jlab.coda.jevio.INameProvider |
---|
NO_NAME_STRING |
Constructor Summary | |
---|---|
EvioXMLDictionary(org.w3c.dom.Document domDocument)
Create an EvioXMLDictionary from an xml Document object. |
|
EvioXMLDictionary(org.w3c.dom.Document domDocument,
java.lang.String delimiter)
Create an EvioXMLDictionary from an xml Document object. |
|
EvioXMLDictionary(java.io.File file)
Create an EvioXMLDictionary from an xml file. |
|
EvioXMLDictionary(java.io.File file,
java.lang.String delimiter)
Create an EvioXMLDictionary from an xml file. |
|
EvioXMLDictionary(java.lang.String xmlString)
Create an EvioXMLDictionary from an xml string. |
|
EvioXMLDictionary(java.lang.String xmlString,
java.lang.String delimiter)
Create an EvioXMLDictionary from an xml string. |
Method Summary | |
---|---|
java.lang.String |
getDescription(int tag,
int num)
Returns the description, if any, associated with the given tag and num. |
java.lang.String |
getDescription(java.lang.String name)
Returns the description, if any, associated with the name of a dictionary entry. |
java.lang.String |
getFormat(int tag,
int num)
Returns the format, if any, associated with the given tag and num. |
java.lang.String |
getFormat(java.lang.String name)
Returns the format, if any, associated with the name of a dictionary entry. |
java.lang.String |
getName(BaseStructure structure)
Returns the name of a given evio structure. |
java.lang.String |
getName(int tag,
int num)
Returns the name associated with the given tag and num. |
int |
getNum(java.lang.String name)
Returns the num corresponding to the name of a dictionary entry. |
int |
getTag(java.lang.String name)
Returns the tag corresponding to the name of a dictionary entry. |
int[] |
getTagNum(java.lang.String name)
Returns the tag/num pair, in an int array, corresponding to the name of a dictionary entry. |
DataType |
getType(int tag,
int num)
Returns the type, if any, associated with the given tag and num. |
DataType |
getType(java.lang.String name)
Returns the type, if any, associated with the name of a dictionary entry. |
java.lang.String |
toString()
Get a string representation of the dictionary. |
java.lang.String |
toXML()
Get an xml representation of the dictionary. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EvioXMLDictionary(java.io.File file)
file
- file containing xml.public EvioXMLDictionary(java.io.File file, java.lang.String delimiter)
file
- file containing xml.delimiter
- character used to separate hierarchical parts of names.public EvioXMLDictionary(java.lang.String xmlString)
xmlString
- string containing xml.public EvioXMLDictionary(java.lang.String xmlString, java.lang.String delimiter)
xmlString
- string containing xml.delimiter
- character used to separate hierarchical parts of names.public EvioXMLDictionary(org.w3c.dom.Document domDocument)
domDocument
- DOM object representing xml dictionary.public EvioXMLDictionary(org.w3c.dom.Document domDocument, java.lang.String delimiter)
domDocument
- DOM object representing xml dictionary.delimiter
- character used to separate hierarchical parts of names.Method Detail |
---|
public java.lang.String getName(BaseStructure structure)
getName
in interface INameProvider
structure
- the structure to find the name of.
public java.lang.String getName(int tag, int num)
tag
- to find the name ofnum
- to find the name of
public java.lang.String getDescription(int tag, int num)
tag
- to find the description ofnum
- to find the description of
public java.lang.String getDescription(java.lang.String name)
name
- dictionary name
public java.lang.String getFormat(int tag, int num)
tag
- to find the format ofnum
- to find the format of
public java.lang.String getFormat(java.lang.String name)
name
- dictionary name
public DataType getType(int tag, int num)
tag
- to find the type ofnum
- to find the type of
public DataType getType(java.lang.String name)
name
- dictionary name
public int[] getTagNum(java.lang.String name)
name
- dictionary name
public int getTag(java.lang.String name)
name
- dictionary name
public int getNum(java.lang.String name)
name
- dictionary name
public java.lang.String toXML()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |