|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ix.iface.util.XML
A class that encapsulates the XML knowledge needed for sending and receiving Issues and Reports and that contains other useful static XML utilities.
Example issue:
<issue sender-id="ILEED" ref="ILEED-IDEEL-1" report-back="no"> <priority>high</priority> <statement>avoid elephants laki_safari_park</statement> </issue>Example report:
<report sender-id="MCA" ref="MCA-IDEEL-1"> done - no conflicts </report>
Inner Class Summary | |
static class |
XML.XMLException
Thrown to indicate a problem converting to or from XML. |
Field Summary | |
static java.util.Set |
chatMessageAttributes
|
static java.util.Set |
issueAttributes
A Set containing the attribute names that are valid in "issue" elements. |
static org.jdom.output.XMLOutputter |
prettyXMLOutputter
An XML outputter created by makePrettyXMLOutputter(). |
static java.util.Set |
reportAttributes
A Set containing the attribute names that are valid in "report" elements. |
(package private) static java.lang.String |
SAXDriverClass
The class of the SAX parser used by the parseXML
method. |
static java.util.Set |
serviceAddressAttributes
|
Method Summary | |
static ix.ichat.ChatMessage |
chatMessageFromXML(org.jdom.Element elt)
Converts a JDOM Element to a ChatMessage |
static java.lang.String |
chatMessageToXML(ix.ichat.ChatMessage message)
|
static java.lang.String |
issueDescription(Issue i)
|
static Issue |
issueFromXML(org.jdom.Element issueElt)
Converts a JDOM Element to an Issue. |
static java.lang.String |
issueToXML(Issue issue)
|
static org.jdom.output.XMLOutputter |
makePrettyXMLOutputter()
Constructs a JDOM XMLOutputter that outputs a JDOM Document in a nicely indented fashion. |
static java.lang.Object |
objectFromXML(java.lang.String text)
Converts a string of XML to an object such as an Issue or Report. |
static java.lang.String |
objectToXML(java.lang.Object contents)
Converts an object, such as an Issue or Report, to a string of XML. |
static org.jdom.Document |
parseXML(java.lang.String text)
Converts a string of XML to a JDOM Document. |
static int |
priorityFromXML(org.jdom.Element priorityElt)
|
static java.lang.String |
priorityToXML(int priority)
|
static java.util.Map |
propertiesFromAttributes(org.jdom.Element elt,
java.util.Set validNames)
Converts XML attributes to a Map. |
static java.lang.String |
propertiesToAttributes(java.util.Map map,
java.util.Set validNames)
|
static Report |
reportFromXML(org.jdom.Element reportElt)
Converts a JDOM Element to a Report. |
static java.lang.String |
reportToXML(Report report)
|
static IPC.ServiceAddress |
serviceAddressFromXML(org.jdom.Element addrElt)
Converts a JDOM Element to an IPC.ServiceAddress. |
static java.lang.String |
serviceAddressToXML(IPC.ServiceAddress addr)
|
static java.lang.String |
statementFromXML(org.jdom.Element statementElt)
|
static java.lang.String |
statementToXML(java.lang.String statement)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
public static java.util.Set issueAttributes
public static java.util.Set reportAttributes
public static java.util.Set serviceAddressAttributes
public static java.util.Set chatMessageAttributes
static java.lang.String SAXDriverClass
parseXML
method.public static org.jdom.output.XMLOutputter prettyXMLOutputter
Method Detail |
public static java.lang.Object objectFromXML(java.lang.String text)
public static Issue issueFromXML(org.jdom.Element issueElt)
public static int priorityFromXML(org.jdom.Element priorityElt)
public static java.lang.String statementFromXML(org.jdom.Element statementElt)
public static Report reportFromXML(org.jdom.Element reportElt)
public static IPC.ServiceAddress serviceAddressFromXML(org.jdom.Element addrElt)
public static ix.ichat.ChatMessage chatMessageFromXML(org.jdom.Element elt)
public static java.util.Map propertiesFromAttributes(org.jdom.Element elt, java.util.Set validNames)
public static org.jdom.Document parseXML(java.lang.String text)
public static java.lang.String objectToXML(java.lang.Object contents)
public static java.lang.String issueToXML(Issue issue)
public static java.lang.String priorityToXML(int priority)
public static java.lang.String statementToXML(java.lang.String statement)
public static java.lang.String issueDescription(Issue i)
public static java.lang.String reportToXML(Report report)
public static java.lang.String propertiesToAttributes(java.util.Map map, java.util.Set validNames)
public static java.lang.String serviceAddressToXML(IPC.ServiceAddress addr)
public static java.lang.String chatMessageToXML(ix.ichat.ChatMessage message)
public static org.jdom.output.XMLOutputter makePrettyXMLOutputter()
XMLOutputter outputter = makePrettyXMLOutputter() outputter.output(doc, System.out); System.out.flush();
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |