org.enhydra.xml.xmlc.dom.generic
Class NodeCreateGenerator

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.generic.NodeCreateGenerator
Direct Known Subclasses:
LazyDOMNodeCreateGenerator, XercesNodeCreateGenerator

public class NodeCreateGenerator
extends Object

Class used create DOM nodes. This maybe extended by a class needing to create nodes in a different. This is called by the document builder. The code to generate adds is also in here, as added certain type of data to the DOM is not specified in level 2.


Constructor Summary
NodeCreateGenerator(XMLCDocument xmlcDoc)
          Constructor.
 
Method Summary
 void genAddAttribute(String elementVar, String attrVar, JavaCode body)
          Generate code to add attribute to an element.
 void genAddEntity(String docTypeVar, String entityVar, Entity entity, JavaCode body)
          Add an entity to a DocumentType
 void genAddNotation(String docTypeVar, String notationVar, Notation notation, JavaCode body)
          Add an notation to a DocumentType
 void genAppendChild(String parentVar, String childVar, Node child, JavaCode body)
          Generate code to do an append child.
protected  void genAttrCreate(Attr attr, String docVar, String varName, JavaCode body)
          Generate Attr creation.
protected  void genCDATASectionCreate(CDATASection cdataSection, String docVar, String varName, JavaCode body)
          Generate CDATASection creation.
protected  void genCommentCreate(Comment comment, String docVar, String varName, JavaCode body)
          Generate Comment creation.
protected  void genDocumentCreate(Document document, String docVar, String docTypeVar, JavaCode body)
          Generate Document and DocumentType creation.
protected  void genDocumentTypeCreate(DocumentType docType, String docVar, String varName, JavaCode body)
          Generate DocumentType creation.
protected  void genElementCreate(Element element, String docVar, String varName, JavaCode body)
          Generate Element creation.
protected  void genEntityCreate(Entity entity, String docVar, String varName, JavaCode body)
          Generate Entity creation.
protected  void genEntityReferenceCreate(EntityReference entityRef, String docVar, String varName, JavaCode body)
          Generate EntityReference creation.
 void genNodeCreate(String docVar, String varName, Node node, JavaCode body)
          Generate code to construct a node, assigning it to the supplied variable, Can be overriden by derived class
protected  void genNotationCreate(Notation notation, String docVar, String varName, JavaCode body)
          Generate Notation creation.
protected  void genProcessInstructionCreate(ProcessingInstruction procInstr, String docVar, String varName, JavaCode body)
          Generate ProcessingInstruction creation.
protected  void genTextCreate(Text text, String docVar, String varName, JavaCode body)
          Generate Text creation.
protected  boolean isDocElement(Element element)
          Is this the document element?
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeCreateGenerator

public NodeCreateGenerator(XMLCDocument xmlcDoc)
Constructor.
Method Detail

isDocElement

protected boolean isDocElement(Element element)
Is this the document element?

genDocumentCreate

protected void genDocumentCreate(Document document,
                                 String docVar,
                                 String docTypeVar,
                                 JavaCode body)
Generate Document and DocumentType creation.

genDocumentTypeCreate

protected void genDocumentTypeCreate(DocumentType docType,
                                     String docVar,
                                     String varName,
                                     JavaCode body)
Generate DocumentType creation.

genEntityCreate

protected void genEntityCreate(Entity entity,
                               String docVar,
                               String varName,
                               JavaCode body)
Generate Entity creation.

genAttrCreate

protected void genAttrCreate(Attr attr,
                             String docVar,
                             String varName,
                             JavaCode body)
Generate Attr creation.

genCDATASectionCreate

protected void genCDATASectionCreate(CDATASection cdataSection,
                                     String docVar,
                                     String varName,
                                     JavaCode body)
Generate CDATASection creation.

genCommentCreate

protected void genCommentCreate(Comment comment,
                                String docVar,
                                String varName,
                                JavaCode body)
Generate Comment creation.

genElementCreate

protected void genElementCreate(Element element,
                                String docVar,
                                String varName,
                                JavaCode body)
Generate Element creation.

genEntityReferenceCreate

protected void genEntityReferenceCreate(EntityReference entityRef,
                                        String docVar,
                                        String varName,
                                        JavaCode body)
Generate EntityReference creation.

genNotationCreate

protected void genNotationCreate(Notation notation,
                                 String docVar,
                                 String varName,
                                 JavaCode body)
Generate Notation creation.

genProcessInstructionCreate

protected void genProcessInstructionCreate(ProcessingInstruction procInstr,
                                           String docVar,
                                           String varName,
                                           JavaCode body)
Generate ProcessingInstruction creation.

genTextCreate

protected void genTextCreate(Text text,
                             String docVar,
                             String varName,
                             JavaCode body)
Generate Text creation.

genNodeCreate

public void genNodeCreate(String docVar,
                          String varName,
                          Node node,
                          JavaCode body)
                   throws XMLCException
Generate code to construct a node, assigning it to the supplied variable, Can be overriden by derived class

genAppendChild

public void genAppendChild(String parentVar,
                           String childVar,
                           Node child,
                           JavaCode body)
Generate code to do an append child.

genAddAttribute

public void genAddAttribute(String elementVar,
                            String attrVar,
                            JavaCode body)
Generate code to add attribute to an element.

genAddEntity

public void genAddEntity(String docTypeVar,
                         String entityVar,
                         Entity entity,
                         JavaCode body)
Add an entity to a DocumentType

genAddNotation

public void genAddNotation(String docTypeVar,
                           String notationVar,
                           Notation notation,
                           JavaCode body)
Add an notation to a DocumentType


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.