Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java
PREV | NEXT | SHOW LISTS | HIDE LISTS |

# Class com.ibm.xml.parser.DefaultElementFactory

    java.lang.Object
        |
        +----com.ibm.xml.parser.DefaultElementFactory

Subclasses:
  SAXDriver, TreeFactory, XHFactory

public class DefaultElementFactory
extends java.lang.Object
implements ElementFactory, java.io.Serializable

An implementation of `ElementFactory`.

Version:
  1.1

Constructor Summary
DefaultElementFactory() Make new `DefaultElementFactory` instance.

Method Summary
AttDef | createAttDef(java.lang.String attributename) Create `AttDef` instance.
Attlist | createAttlist(java.lang.String elementname) Create `Attlist` instance.
TXAttribute | createAttribute(java.lang.String name, java.lang.String value) Create `TXAttribute` instance.
TXAttributeList | createAttributeList() Create `TXAttributeList` instance.
TXCDATASection | createCDATA(java.lang.String data) Create `TXCDATASection` instance.
TXComment | createComment(java.lang.String data) Create `TXComment` instance.
ContentModel | createContentModel(int type) Create `ContentModel` instance.
ContentModel | createContentModel(CMNode cn) Create `ContentModel` instance.
TXDocument | createDocument() Create `TXDocument` instance.
DTD | createDTD() Create `DTD` instance.
DTD | createDTD(java.lang.String rootname, ExternalID eid) Create `DTD` instance.
TXElement | createElement(java.lang.String name) Create `TXElement` instance.
ElementDecl | createElementDecl(java.lang.String elementname, ContentModel cs) Create `ElementDecl` instance.
Entity | createEntity(java.lang.String name, java.lang.String value, boolean parameter) Create `Entity` instance.
Entity | createEntity(java.lang.String name, ExternalID eid, boolean isParameter, java.lang.String ndata) Create `Entity` instance.
GeneralReference | createGeneralReference(java.lang.String name) Create `GeneralReference` instance.
java.security.MessageDigest | createMessageDigest() Return `MessageDigest` instance.
NamespacePI | createNamespacePI(java.lang.String name, java.lang.String data, java.lang.String ns, java.lang.String prefix, java.lang.String src) Create `NamespacePI` instance.
TXNotation | createNotation(java.lang.String name, ExternalID eid) Create `TXNotation` instance.
TXPI | createPI(java.lang.String name, java.lang.String data) Create `TXPI` instance.
StylesheetPI | createStylesheetPI(java.lang.String name, java.lang.String data, java.lang.String type, java.lang.String href, java.lang.String title) Create `StylesheetPI` instance.
TXText | createText(java.lang.String data) Create `TXText` instance.
TXText | createText(java.lang.String data, boolean ignorable) Create `TXText` instance.
TXText | createText(char[] chararray, int offset, int length, boolean isIgnorableWhitespace) Create `TXText` instance.
static DefaultElementFactory | getInstance() Return `DefaultElementFactory` instance.
byte[] | makeDigest(Child ch) Calculate a digest value of specified Child instance.
void | print(Child ch, java.io.PrintWriter pw, java.lang.String encoding) Print a child to a stream.
void | printAttDef(AttDef ad, java.io.PrintWriter pw, java.lang.String encoding)
void | printAttlist(Attlist al, java.io.PrintWriter pw, java.lang.String encoding)
void | printComment(Comment com, java.io.PrintWriter pw, java.lang.String encoding)
void | printDocument(TXDocument doc, java.io.PrintWriter pw, java.lang.String encoding)
void | printDTD(DTD dtd, java.io.PrintWriter pw, java.lang.String encoding)
void | printElement(TXElement el, java.io.PrintWriter pw, java.lang.String encoding)
void | printElementDecl(ElementDecl ed, java.io.PrintWriter pw, java.lang.String encoding)
void | printEntity(Entity ent, java.io.PrintWriter pw, java.lang.String encoding)
void | printGeneralReference(GeneralReference gr, java.io.PrintWriter pw, java.lang.String encoding)
void | printNotation(TXNotation no, java.io.PrintWriter pw, java.lang.String encoding)
void | printPI(PI pi, java.io.PrintWriter pw, java.lang.String encoding) Printer for `TXPI` and `NamespacePI` and `StylesheetPI`.
void | printPseudoNode(PseudoNode pn, java.io.PrintWriter pw, java.lang.String encoding)
void | printText(Text text, java.io.PrintWriter pw, java.lang.String encoding) Printer for `TXText` and `TXCDATASection`.
void | setDigestAlgorithm(java.lang.String arg) Change digest algoritm for `createMessageDigest()`
java.lang.String | toString(Child ch, java.lang.String encoding) Make String representation of specified Child instance.
java.lang.String | toStringAttDef(AttDef ad, java.lang.String encoding)
java.lang.String | toStringAttlist(Attlist al, java.lang.String encoding)
java.lang.String | toStringAttribute(TXAttribute attr, java.lang.String encoding)
java.lang.String | toStringComment(Comment com, java.lang.String encoding)
java.lang.String | toStringDocument(TXDocument doc, java.lang.String encoding)
java.lang.String | toStringDTD(DTD dtd, java.lang.String encoding)
java.lang.String | toStringElement(TXElement el, java.lang.String encoding)
java.lang.String | toStringElementDecl(ElementDecl ed, java.lang.String encoding)
java.lang.String | toStringEntity(Entity ent, java.lang.String encoding)
java.lang.String | toStringGeneralReference(GeneralReference gr, java.lang.String encoding)
java.lang.String | toStringNotation(TXNotation no, java.lang.String encoding)
java.lang.String | toStringPI(PI pi, java.lang.String encoding)
java.lang.String | toStringPseudoNode(PseudoNode pn, java.lang.String encoding)
java.lang.String | toStringText(Text text, java.lang.String encoding)

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

### DefaultElementFactory

    public DefaultElementFactory()

  Make new `DefaultElementFactory` instance.

Method Detail

### getInstance

    public static DefaultElementFactory getInstance()

  Return `DefaultElementFactory` instance.

### createElement

    public TXElement createElement(java.lang.String name)

  Create `TXElement` instance.
  Implements:
    createElement in interface ElementFactory

### createAttribute

    public TXAttribute createAttribute(java.lang.String name,
                                       java.lang.String value)

  Create `TXAttribute` instance.
  Implements:
    createAttribute in interface ElementFactory

### createText

    public TXText createText(java.lang.String data)

  Create `TXText` instance.
  Implements:
    createText in interface ElementFactory

### createText

    public TXText createText(java.lang.String data,
                             boolean ignorable)

  Create `TXText` instance.
  Implements:
    createText in interface ElementFactory

### createText

    public TXText createText(char[] chararray,
                             int offset,
                             int length,
                             boolean isIgnorableWhitespace)

  Create `TXText` instance.
  Implements:
    createText in interface ElementFactory

### createCDATA

    public TXCDATASection createCDATA(java.lang.String data)

  Create `TXCDATASection` instance.
  Implements:
    createCDATA in interface ElementFactory

### createComment

    public TXComment createComment(java.lang.String data)

  Create `TXComment` instance.
  Implements:
    createComment in interface ElementFactory

### createPI

    public TXPI createPI(java.lang.String name,
                         java.lang.String data)

  Create `TXPI` instance.
  Implements:
    createPI in interface ElementFactory

### createNamespacePI

    public NamespacePI createNamespacePI(java.lang.String name,
                                         java.lang.String data,
                                         java.lang.String ns,
                                         java.lang.String prefix,
                                         java.lang.String src)

  Create `NamespacePI` instance.
  Implements:
    createNamespacePI in interface ElementFactory
  See Also:
    NamespacePI(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

### createStylesheetPI

    public StylesheetPI createStylesheetPI(java.lang.String name,
                                           java.lang.String data,
                                           java.lang.String type,
                                           java.lang.String href,
                                           java.lang.String title)

  Create `StylesheetPI` instance.
  Implements:
    createStylesheetPI in interface ElementFactory
  See Also:
    StylesheetPI(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

### createDocument

    public TXDocument createDocument()

  Create `TXDocument` instance.
  Implements:
    createDocument in interface ElementFactory

### createDTD

    public DTD createDTD()

  Create `DTD` instance.
  Implements:
    createDTD in interface ElementFactory

### createDTD

    public DTD createDTD(java.lang.String rootname,
                         ExternalID eid)

  Create `DTD` instance.
  Implements:
    createDTD in interface ElementFactory

### createElementDecl

    public ElementDecl createElementDecl(java.lang.String elementname,
                                         ContentModel cs)

  Create `ElementDecl` instance.
  Implements:
    createElementDecl in interface ElementFactory

### createContentModel

    public ContentModel createContentModel(int type)

  Create `ContentModel` instance.
  Implements:
    createContentModel in interface ElementFactory

### createContentModel

    public ContentModel createContentModel(CMNode cn)

  Create `ContentModel` instance.
  Implements:
    createContentModel in interface ElementFactory

### createAttlist

    public Attlist createAttlist(java.lang.String elementname)

  Create `Attlist` instance.
  Implements:
    createAttlist in interface ElementFactory

### createAttDef

    public AttDef createAttDef(java.lang.String attributename)

  Create `AttDef` instance.
  Implements:
    createAttDef in interface ElementFactory

### createEntity

    public Entity createEntity(java.lang.String name,
                               java.lang.String value,
                               boolean parameter)

  Create `Entity` instance.
  Implements:
    createEntity in interface ElementFactory

### createEntity

    public Entity createEntity(java.lang.String name,
                               ExternalID eid,
                               boolean isParameter,
                               java.lang.String ndata)

  Create `Entity` instance.
  Implements:
    createEntity in interface ElementFactory

### createNotation

    public TXNotation createNotation(java.lang.String name,
                                     ExternalID eid)

  Create `TXNotation` instance.
  Implements:
    createNotation in interface ElementFactory

### createGeneralReference

    public GeneralReference createGeneralReference(java.lang.String name)

  Create `GeneralReference` instance.
  Implements:
    createGeneralReference in interface ElementFactory

### createAttributeList

    public TXAttributeList createAttributeList()

  Create `TXAttributeList` instance.
  Implements:
    createAttributeList in interface ElementFactory

### createMessageDigest

    public java.security.MessageDigest createMessageDigest() throws java.security.NoSuchAlgorithmException

  Return `MessageDigest` instance. Default is MD5.
  Implements:
    createMessageDigest in interface ElementFactory

### setDigestAlgorithm

    public void setDigestAlgorithm(java.lang.String arg)

  Change digest algoritm for `createMessageDigest()`
  See Also:
    createMessageDigest, java.lang.security.MessageDigest#getInstance(java.lang.String)

### makeDigest

    public byte[] makeDigest(Child ch) throws LibraryException

  Calculate a digest value of specified Child instance.
  Implements:
    makeDigest in interface ElementFactory

### toString

    public java.lang.String toString(Child ch,
                           java.lang.String encoding) throws LibraryException

  Make String representation of specified Child instance.
  Implements:
    toString in interface ElementFactory
  Parameters:
    `encoding` - Java encoding name, or `null`

### toStringDocument

    public java.lang.String toStringDocument(TXDocument doc,
                                   java.lang.String encoding)

### toStringElement

    public java.lang.String toStringElement(TXElement el,
                                  java.lang.String encoding)

### toStringAttribute

    public java.lang.String toStringAttribute(TXAttribute attr,
                                    java.lang.String encoding)

### toStringPI

    public java.lang.String toStringPI(PI pi,
                             java.lang.String encoding)

### toStringComment

    public java.lang.String toStringComment(Comment com,
                                  java.lang.String encoding)

### toStringText

    public java.lang.String toStringText(Text text,
                               java.lang.String encoding)

### toStringDTD

    public java.lang.String toStringDTD(DTD dtd,
                              java.lang.String encoding)

### toStringElementDecl

    public java.lang.String toStringElementDecl(ElementDecl ed,
                                      java.lang.String encoding)

### toStringAttlist

    public java.lang.String toStringAttlist(Attlist al,
                                  java.lang.String encoding)

### toStringAttDef

    public java.lang.String toStringAttDef(AttDef ad,
                                 java.lang.String encoding)

### toStringEntity

    public java.lang.String toStringEntity(Entity ent,
                                 java.lang.String encoding)

### toStringNotation

    public java.lang.String toStringNotation(TXNotation no,
                                   java.lang.String encoding)

### toStringGeneralReference

    public java.lang.String toStringGeneralReference(GeneralReference gr,
                                           java.lang.String encoding)

### toStringPseudoNode

    public java.lang.String toStringPseudoNode(PseudoNode pn,
                                     java.lang.String encoding)

### print

    public void print(Child ch,
                      java.io.PrintWriter pw,
                      java.lang.String encoding) throws LibraryException

  Print a child to a stream.
  Implements:
    print in interface ElementFactory
  Parameters:
    `encoding` - Java encoding name, or `null`

### printDocument

    public void printDocument(TXDocument doc,
                              java.io.PrintWriter pw,
                              java.lang.String encoding)

### printElement

    public void printElement(TXElement el,
                             java.io.PrintWriter pw,
                             java.lang.String encoding)

### printPI

    public void printPI(PI pi,
                        java.io.PrintWriter pw,
                        java.lang.String encoding)

  Printer for `TXPI` and `NamespacePI` and `StylesheetPI`.

### printComment

    public void printComment(Comment com,
                             java.io.PrintWriter pw,
                             java.lang.String encoding)

### printText

    public void printText(Text text,
                          java.io.PrintWriter pw,
                          java.lang.String encoding)

  Printer for `TXText` and `TXCDATASection`.

### printDTD

    public void printDTD(DTD dtd,
                         java.io.PrintWriter pw,
                         java.lang.String encoding)

### printElementDecl

    public void printElementDecl(ElementDecl ed,
                                 java.io.PrintWriter pw,
                                 java.lang.String encoding)

### printAttlist

    public void printAttlist(Attlist al,
                             java.io.PrintWriter pw,
                             java.lang.String encoding)

### printAttDef

    public void printAttDef(AttDef ad,
                            java.io.PrintWriter pw,
                            java.lang.String encoding)

### printEntity

    public void printEntity(Entity ent,
                            java.io.PrintWriter pw,
                            java.lang.String encoding)

### printNotation

    public void printNotation(TXNotation no,
                              java.io.PrintWriter pw,
                              java.lang.String encoding)

### printGeneralReference

    public void printGeneralReference(GeneralReference gr,
                                      java.io.PrintWriter pw,
                                      java.lang.String encoding)

### printPseudoNode

    public void printPseudoNode(PseudoNode pn,
                                java.io.PrintWriter pw,
                                java.lang.String encoding)

Contents | Package | Class | Tree | Deprecated | Index | Help |
PREV | NEXT | SHOW LISTS | HIDE LISTS |