anon.pay.xml
Class XMLGenericText

java.lang.Object
  extended by anon.pay.xml.XMLGenericText
All Implemented Interfaces:
IXMLEncodable

public class XMLGenericText
extends java.lang.Object
implements IXMLEncodable

Wraps a String in an IXMLEncodable Can be used to send simple text over the biconnection Text can be plain text (which will be put into the top-level element) or HTML/XML (whose top-level element will be a child of the top-level element) HTML does not have to be a webpage, i.e. does not have to be wrapped in tags, but does have to be valid XML (e.g. closed tags), and has to start and end with a tag (i.e. "this is importantdata" would NOT be okay), otherwise it will be treated as plain text. This class will typically be used if you already have XML or HTML, but need to put it into an IXMLEncodable so PICommand will accept it blablablabla blabla bla

Some Headline

Author:
Elmar Schraml

Field Summary
private  org.w3c.dom.Document m_docTheText
           
private  java.lang.String m_text
           
static int TYPE_PLAINTEXT
           
static int TYPE_XML
           
static java.lang.String XML_ELEMENT_NAME
           
 
Fields inherited from interface anon.util.IXMLEncodable
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
 
Constructor Summary
XMLGenericText()
           
XMLGenericText(org.w3c.dom.Document doc)
           
XMLGenericText(org.w3c.dom.Element xml)
           
XMLGenericText(java.lang.String a_text)
           
 
Method Summary
 java.lang.String getText()
           
private  org.w3c.dom.Element internal_toXmlElement(org.w3c.dom.Document a_doc)
           
private  void setValues(org.w3c.dom.Element xml)
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
          Return an element that can be appended to the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_PLAINTEXT

public static final int TYPE_PLAINTEXT
See Also:
Constant Field Values

TYPE_XML

public static final int TYPE_XML
See Also:
Constant Field Values

m_text

private java.lang.String m_text

m_docTheText

private org.w3c.dom.Document m_docTheText

XML_ELEMENT_NAME

public static final java.lang.String XML_ELEMENT_NAME
See Also:
Constant Field Values
Constructor Detail

XMLGenericText

public XMLGenericText()

XMLGenericText

public XMLGenericText(java.lang.String a_text)

XMLGenericText

public XMLGenericText(org.w3c.dom.Element xml)
               throws java.lang.Exception
Throws:
java.lang.Exception

XMLGenericText

public XMLGenericText(org.w3c.dom.Document doc)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getText

public java.lang.String getText()

toXmlElement

public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document.

Specified by:
toXmlElement in interface IXMLEncodable
Parameters:
a_doc - a document
Returns:
the interface as xml element

internal_toXmlElement

private org.w3c.dom.Element internal_toXmlElement(org.w3c.dom.Document a_doc)

setValues

private void setValues(org.w3c.dom.Element xml)
                throws java.lang.Exception
Throws:
java.lang.Exception