com.simonstl.moe.factory
Class MutableFactory

java.lang.Object
  |
  +--com.simonstl.moe.factory.MutableFactory

public class MutableFactory
extends java.lang.Object

The MutableFactory class provides a relatively simple mechanism for creating new MOE Mutable components. I've kept the constructors on the Mutable class deliberately minimal, preferring to use factory classes to create particular objects.

Version:
0.01 18 September 2001
Author:
Simon St.Laurent

Constructor Summary
MutableFactory()
           
 
Method Summary
static MutableComponentI attribute(java.lang.String _nsURI, java.lang.String _localName, java.lang.String _prefix)
          Creates an empty attribute with a namespace URI, local name, and prefix.
static MutableComponentI attribute(java.lang.String _nsURI, java.lang.String _localName, java.lang.String _prefix, java.lang.String _text)
          Creates an attribute with a namespace URI, local name, prefix, and a text node.
static MutableComponentI attribute(java.lang.String _nsURI, java.lang.String _localName, java.lang.String _prefix, java.lang.String _text, boolean _complete)
          Creates an attribute with a namespace URI, local name, prefix, and a text node, and allows the caller to specify whether or not the element is complete.
static MutableComponentI cdataSect(java.lang.String _text)
          Creates a complete CDATA section with textual content.
static MutableComponentI cdataSect(java.lang.String _text, boolean _complete)
          Creates a CDATA section with textual content, allowing the code to specify whether or not it is complete.
static MutableComponentI characters(java.lang.String _text)
          Creates a text node with textual content.
static MutableComponentI comment(java.lang.String _text)
          Creates a complete Comment with textual content.
static MutableComponentI comment(java.lang.String _text, boolean _complete)
          Creates a comment with textual content, allowing the code to specify whether or not it is complete.
static MutableComponentI element(java.lang.String _nsURI, java.lang.String _localName, java.lang.String _prefix)
          Creates an empty element with a namespace URI, local name, and prefix.
static MutableComponentI element(java.lang.String _nsURI, java.lang.String _localName, java.lang.String _prefix, java.lang.String _text)
          Creates a complete element with a namespace URI, local name, prefix, and a text node.
static MutableComponentI element(java.lang.String _nsURI, java.lang.String _localName, java.lang.String _prefix, java.lang.String _text, boolean _complete)
          Creates an element with a namespace URI, local name, prefix, and a text node, and allows the caller to specify whether or not the element is complete.
static MutableComponentI endAttribute(java.lang.String _nsURI, java.lang.String _localName, java.lang.String _prefix)
          Creates an empty attribute with a namespace URI, local name, and prefix.
static MutableComponentI endCdataSect()
          Creates an end to a CDATA section.
static MutableComponentI endComment()
           
static MutableComponentI endElement(java.lang.String _nsURI, java.lang.String _localName, java.lang.String _prefix)
          Creates an end element with a namespace URI, local name, and prefix.
static MutableComponentI endNamespace(java.lang.String _nsURI, java.lang.String _prefix)
          Creates an end to a namespace.
static MutableComponentI endProcInst()
           
static void main(java.lang.String[] args)
          Need to update for this factory.
static MutableComponentI namespace(java.lang.String _nsURI)
          Creates a default.
static MutableComponentI namespace(java.lang.String _nsURI, java.lang.String _prefix)
          Creates a namespace.
static MutableComponentI procInst(java.lang.String _target, java.lang.String _text)
          Creates a complete Processing Instruction with target and textual content.
 MutableComponentI procInst(java.lang.String _target, java.lang.String _text, boolean _complete)
          Creates a Processing Instruction with target and textual content, allowing the code to specify whether or not it is complete.
static MutableComponentI whitespace(java.lang.String _text)
          Creates a whitespace node with content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableFactory

public MutableFactory()
Method Detail

element

public static MutableComponentI element(java.lang.String _nsURI,
                                        java.lang.String _localName,
                                        java.lang.String _prefix)
                                 throws MOEException
Creates an empty element with a namespace URI, local name, and prefix.

element

public static MutableComponentI element(java.lang.String _nsURI,
                                        java.lang.String _localName,
                                        java.lang.String _prefix,
                                        java.lang.String _text)
                                 throws MOEException
Creates a complete element with a namespace URI, local name, prefix, and a text node.

element

public static MutableComponentI element(java.lang.String _nsURI,
                                        java.lang.String _localName,
                                        java.lang.String _prefix,
                                        java.lang.String _text,
                                        boolean _complete)
                                 throws MOEException
Creates an element with a namespace URI, local name, prefix, and a text node, and allows the caller to specify whether or not the element is complete.

attribute

public static MutableComponentI attribute(java.lang.String _nsURI,
                                          java.lang.String _localName,
                                          java.lang.String _prefix)
                                   throws MOEException
Creates an empty attribute with a namespace URI, local name, and prefix.

attribute

public static MutableComponentI attribute(java.lang.String _nsURI,
                                          java.lang.String _localName,
                                          java.lang.String _prefix,
                                          java.lang.String _text)
                                   throws MOEException
Creates an attribute with a namespace URI, local name, prefix, and a text node.

attribute

public static MutableComponentI attribute(java.lang.String _nsURI,
                                          java.lang.String _localName,
                                          java.lang.String _prefix,
                                          java.lang.String _text,
                                          boolean _complete)
                                   throws MOEException
Creates an attribute with a namespace URI, local name, prefix, and a text node, and allows the caller to specify whether or not the element is complete.

characters

public static MutableComponentI characters(java.lang.String _text)
                                    throws MOEException
Creates a text node with textual content.

procInst

public static MutableComponentI procInst(java.lang.String _target,
                                         java.lang.String _text)
                                  throws MOEException
Creates a complete Processing Instruction with target and textual content.

procInst

public MutableComponentI procInst(java.lang.String _target,
                                  java.lang.String _text,
                                  boolean _complete)
                           throws MOEException
Creates a Processing Instruction with target and textual content, allowing the code to specify whether or not it is complete.

comment

public static MutableComponentI comment(java.lang.String _text)
                                 throws MOEException
Creates a complete Comment with textual content.

comment

public static MutableComponentI comment(java.lang.String _text,
                                        boolean _complete)
                                 throws MOEException
Creates a comment with textual content, allowing the code to specify whether or not it is complete.

cdataSect

public static MutableComponentI cdataSect(java.lang.String _text)
                                   throws MOEException
Creates a complete CDATA section with textual content.

cdataSect

public static MutableComponentI cdataSect(java.lang.String _text,
                                          boolean _complete)
                                   throws MOEException
Creates a CDATA section with textual content, allowing the code to specify whether or not it is complete.

whitespace

public static MutableComponentI whitespace(java.lang.String _text)
                                    throws MOEException
Creates a whitespace node with content.

namespace

public static MutableComponentI namespace(java.lang.String _nsURI,
                                          java.lang.String _prefix)
                                   throws MOEException
Creates a namespace.

namespace

public static MutableComponentI namespace(java.lang.String _nsURI)
                                   throws MOEException
Creates a default.

endElement

public static MutableComponentI endElement(java.lang.String _nsURI,
                                           java.lang.String _localName,
                                           java.lang.String _prefix)
                                    throws MOEException
Creates an end element with a namespace URI, local name, and prefix.

endAttribute

public static MutableComponentI endAttribute(java.lang.String _nsURI,
                                             java.lang.String _localName,
                                             java.lang.String _prefix)
                                      throws MOEException
Creates an empty attribute with a namespace URI, local name, and prefix.

endNamespace

public static MutableComponentI endNamespace(java.lang.String _nsURI,
                                             java.lang.String _prefix)
                                      throws MOEException
Creates an end to a namespace.

endCdataSect

public static MutableComponentI endCdataSect()
                                      throws MOEException
Creates an end to a CDATA section.

endProcInst

public static MutableComponentI endProcInst()
                                     throws MOEException

endComment

public static MutableComponentI endComment()
                                    throws MOEException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Need to update for this factory.