org.jlab.coda.jevio
Class EvioXMLDictionary

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<EvioDictionaryEntry>
              extended by org.jlab.coda.jevio.EvioXMLDictionary
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<EvioDictionaryEntry>, java.util.Collection<EvioDictionaryEntry>, java.util.List<EvioDictionaryEntry>, java.util.RandomAccess, INameProvider

public class EvioXMLDictionary
extends java.util.Vector<EvioDictionaryEntry>
implements INameProvider

This was developed to read the xml dictionary that Maurizio uses for GEMC. It implements INameProvider, just like all other dictionary readers.

Author:
heddle
See Also:
Serialized Form

Constructor Summary
EvioXMLDictionary(org.w3c.dom.Document domDocument)
          Create an EvioXMLDictionary.
EvioXMLDictionary(java.io.File file)
          Create an EvioXMLDictionary.
EvioXMLDictionary(java.lang.String xmlString)
          Create an EvioXMLDictionary.
 
Method Summary
 java.lang.String getName(BaseStructure structure)
          Returns the pretty name of some evio structure.
 java.lang.String toString()
          Get a string representation of the dictionary.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

EvioXMLDictionary

public EvioXMLDictionary(java.io.File file)
Create an EvioXMLDictionary. This is not a standard CODA disctionary, but a format developed for use by GEMC.

Parameters:
file - file containing xml.

EvioXMLDictionary

public EvioXMLDictionary(java.lang.String xmlString)
Create an EvioXMLDictionary. This is not a standard CODA disctionary, but a format developed for use by GEMC.

Parameters:
xmlString - string containing xml.

EvioXMLDictionary

public EvioXMLDictionary(org.w3c.dom.Document domDocument)
Create an EvioXMLDictionary. This is not a standard CODA disctionary, but a format developed for use by GEMC.

Parameters:
domDocument - DOM object representing xml dictionary.
Method Detail

getName

public java.lang.String getName(BaseStructure structure)
Returns the pretty name of some evio structure. Typically this is involve the use of the "tag" and, if present, "num" fields. There may also be a hierarchical dependence.

Specified by:
getName in interface INameProvider
Parameters:
structure - the structure to find the name of.
Returns:
a descriptive name, e.g., "Edep".

toString

public java.lang.String toString()
Get a string representation of the dictionary.

Overrides:
toString in class java.util.Vector<EvioDictionaryEntry>
Returns:
a string representation of the dictionary.