|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hdfs.util.XMLUtils.Stanza
public static class XMLUtils.Stanza
Represents a bag of key-value pairs encountered during parsing an XML file.
| Constructor Summary | |
|---|---|
XMLUtils.Stanza()
|
|
| Method Summary | |
|---|---|
void |
addChild(String name,
XMLUtils.Stanza child)
Add an entry to a stanza. |
List<XMLUtils.Stanza> |
getChildren(String name)
Pull an entry from a stanza. |
String |
getValue()
|
String |
getValue(String name)
Pull a string entry from a stanza. |
String |
getValueOrNull(String name)
Pull a string entry from a stanza, or null. |
boolean |
hasChildren(String name)
Discover if a stanza has a given entry. |
void |
setValue(String value)
|
String |
toString()
Convert a stanza to a human-readable string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XMLUtils.Stanza()
| Method Detail |
|---|
public void setValue(String value)
public String getValue()
public boolean hasChildren(String name)
name - entry to look for
public List<XMLUtils.Stanza> getChildren(String name)
throws XMLUtils.InvalidXmlException
name - entry to look for
XMLUtils.InvalidXmlException
public String getValue(String name)
throws XMLUtils.InvalidXmlException
name - entry to look for
XMLUtils.InvalidXmlException
public String getValueOrNull(String name)
throws XMLUtils.InvalidXmlException
name - entry to look for
XMLUtils.InvalidXmlException
public void addChild(String name,
XMLUtils.Stanza child)
name - name of the entry to addchild - the entry to addpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||