com.simonstl.moe.visitor
Class MOEtoXML

java.lang.Object
  |
  +--com.simonstl.moe.visitor.MOEtoXML
All Implemented Interfaces:
MOEtoTextI

public class MOEtoXML
extends java.lang.Object
implements MOEtoTextI

The MOEtoXML class provides a basic set of methods which can be used to convert any MOE object into XML. Unordered content is assumed to be attributes, while ordered content may be elements, CDATA, etc. (Any attributes which find their way into ordered content will be treated as elements.)

Needs:

version 0.01 is the initial release.

Version:
0.01 5 November 2001
Author:
Simon St.Laurent

Constructor Summary
MOEtoXML()
           
 
Method Summary
 java.lang.StringBuffer attributeText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer cdataText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer charsText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer commentText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer elementText(CoreComponentI component, NamespaceContext namespace)
          Doesn't currently do empty tags.
 java.lang.StringBuffer endAttributeText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer endCdataText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer endCommentText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer endElementText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer endNamespaceText(CoreComponentI component, NamespaceContext namespace)
          Will need to check at the end of an element to see if this has happened.
 java.lang.StringBuffer endPiText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer igWhitespaceText(CoreComponentI component, NamespaceContext namespace)
           
static void main(java.lang.String[] args)
           
 java.lang.StringBuffer namespaceText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.StringBuffer piText(CoreComponentI component, NamespaceContext namespace)
           
 java.lang.String toString(CoreComponentI host)
           
 java.lang.String toString(CoreComponentI host, NamespaceContext context)
           
 java.lang.StringBuffer toStringBuffer(CoreComponentI host)
           
 java.lang.StringBuffer toStringBuffer(CoreComponentI component, NamespaceContext namespace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MOEtoXML

public MOEtoXML()
Method Detail

toString

public java.lang.String toString(CoreComponentI host)
Specified by:
toString in interface MOEtoTextI

toString

public java.lang.String toString(CoreComponentI host,
                                 NamespaceContext context)
Specified by:
toString in interface MOEtoTextI

toStringBuffer

public java.lang.StringBuffer toStringBuffer(CoreComponentI host)
Specified by:
toStringBuffer in interface MOEtoTextI

toStringBuffer

public java.lang.StringBuffer toStringBuffer(CoreComponentI component,
                                             NamespaceContext namespace)
Specified by:
toStringBuffer in interface MOEtoTextI

elementText

public java.lang.StringBuffer elementText(CoreComponentI component,
                                          NamespaceContext namespace)
Doesn't currently do empty tags.

endElementText

public java.lang.StringBuffer endElementText(CoreComponentI component,
                                             NamespaceContext namespace)

attributeText

public java.lang.StringBuffer attributeText(CoreComponentI component,
                                            NamespaceContext namespace)

endAttributeText

public java.lang.StringBuffer endAttributeText(CoreComponentI component,
                                               NamespaceContext namespace)

namespaceText

public java.lang.StringBuffer namespaceText(CoreComponentI component,
                                            NamespaceContext namespace)

endNamespaceText

public java.lang.StringBuffer endNamespaceText(CoreComponentI component,
                                               NamespaceContext namespace)
Will need to check at the end of an element to see if this has happened.

cdataText

public java.lang.StringBuffer cdataText(CoreComponentI component,
                                        NamespaceContext namespace)

endCdataText

public java.lang.StringBuffer endCdataText(CoreComponentI component,
                                           NamespaceContext namespace)

commentText

public java.lang.StringBuffer commentText(CoreComponentI component,
                                          NamespaceContext namespace)

endCommentText

public java.lang.StringBuffer endCommentText(CoreComponentI component,
                                             NamespaceContext namespace)

piText

public java.lang.StringBuffer piText(CoreComponentI component,
                                     NamespaceContext namespace)

endPiText

public java.lang.StringBuffer endPiText(CoreComponentI component,
                                        NamespaceContext namespace)

charsText

public java.lang.StringBuffer charsText(CoreComponentI component,
                                        NamespaceContext namespace)

igWhitespaceText

public java.lang.StringBuffer igWhitespaceText(CoreComponentI component,
                                               NamespaceContext namespace)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception