Qizx/Open v0.4p2

net.xfra.qizxopen.xquery.dm
Class EventDrivenBuilder

java.lang.Object
  |
  +--net.xfra.qizxopen.dm.XMLEventReceiverBase
        |
        +--net.xfra.qizxopen.xquery.dm.EventDrivenBuilder
All Implemented Interfaces:
XMLEventReceiver

public class EventDrivenBuilder
extends XMLEventReceiverBase

An implementation of XMLEventReceiver that builds a CoreDataModel tree.

Used in XQ node constructors.


Constructor Summary
EventDrivenBuilder()
           
 
Method Summary
 void atom(java.lang.String value)
          Text of an atom.
 void attribute(QName name, java.lang.String value)
          Adds an attribute on the current element.
 void comment(java.lang.String value)
          A comment node.
 Node crop()
          extends XMLEventReceiverBase only for traverse.
 void endDocument()
          Ends a document.
 void endElement(QName name)
          Ends an element.
 void flushElement(boolean empty)
           
 void namespace(java.lang.String prefix, java.lang.String uri)
          Adds a namespace node on the current element.
 void pi(java.lang.String target, java.lang.String value)
          A processing-instruction node.
 void reset()
          Resets the state prior to use startDocument() or startElement().
 java.lang.String resolvePrefix(java.lang.String prefix)
          Resolves a prefix to an URI in the context of the current node.
 void startDocument()
          Starts a document.
 void startElement(QName name)
          Starts an element.
 void terminate()
          Terminates a document or simple subtree.
 void text(java.lang.String value)
          Text chunk inside an element.
 
Methods inherited from class net.xfra.qizxopen.dm.XMLEventReceiverBase
definePrefixHints, maxVolumeReached, setMaxVolume, setTrace, traverse
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventDrivenBuilder

public EventDrivenBuilder()
Method Detail

crop

public Node crop()
extends XMLEventReceiverBase only for traverse. Doesnt use its prefix map.


resolvePrefix

public java.lang.String resolvePrefix(java.lang.String prefix)
Description copied from interface: XMLEventReceiver
Resolves a prefix to an URI in the context of the current node.

Specified by:
resolvePrefix in interface XMLEventReceiver
Overrides:
resolvePrefix in class XMLEventReceiverBase
Returns:
null if the prefix cannot be resolved.

reset

public void reset()
Description copied from interface: XMLEventReceiver
Resets the state prior to use startDocument() or startElement().

Specified by:
reset in interface XMLEventReceiver
Overrides:
reset in class XMLEventReceiverBase

terminate

public void terminate()
Description copied from interface: XMLEventReceiver
Terminates a document or simple subtree. May perform consistency checks.

Specified by:
terminate in interface XMLEventReceiver
Overrides:
terminate in class XMLEventReceiverBase

startDocument

public void startDocument()
                   throws DataModelException
Description copied from interface: XMLEventReceiver
Starts a document.

It is not called in the case only a fragment is generated.

Specified by:
startDocument in interface XMLEventReceiver
Overrides:
startDocument in class XMLEventReceiverBase
DataModelException

endDocument

public void endDocument()
                 throws DataModelException
Description copied from interface: XMLEventReceiver
Ends a document. Must be balanced by a matching startDocument().

Specified by:
endDocument in interface XMLEventReceiver
Overrides:
endDocument in class XMLEventReceiverBase
DataModelException

startElement

public void startElement(QName name)
                  throws DataModelException
Description copied from interface: XMLEventReceiver
Starts an element. Must be balanced by a matching endElement().

Specified by:
startElement in interface XMLEventReceiver
Overrides:
startElement in class XMLEventReceiverBase
DataModelException

endElement

public void endElement(QName name)
                throws DataModelException
Description copied from interface: XMLEventReceiver
Ends an element. Discards prefix/namespace mappings possibly defined by the element.

Specified by:
endElement in interface XMLEventReceiver
Overrides:
endElement in class XMLEventReceiverBase
DataModelException

namespace

public void namespace(java.lang.String prefix,
                      java.lang.String uri)
               throws DataModelException
Description copied from interface: XMLEventReceiver
Adds a namespace node on the current element. Must follow startElement and precede any child. May be interleaved with attribute().

Specified by:
namespace in interface XMLEventReceiver
Overrides:
namespace in class XMLEventReceiverBase
DataModelException

attribute

public void attribute(QName name,
                      java.lang.String value)
               throws DataModelException
Description copied from interface: XMLEventReceiver
Adds an attribute on the current element. Must follow startElement and precede any child. May be interleaved with namespace().

Specified by:
attribute in interface XMLEventReceiver
Overrides:
attribute in class XMLEventReceiverBase
DataModelException

text

public void text(java.lang.String value)
          throws DataModelException
Description copied from interface: XMLEventReceiver
Text chunk inside an element. No space is generated before or after.

DataModelException

atom

public void atom(java.lang.String value)
          throws DataModelException
Description copied from interface: XMLEventReceiver
Text of an atom. The difference with text() is that a space in requested between two atoms.

DataModelException

pi

public void pi(java.lang.String target,
               java.lang.String value)
        throws DataModelException
Description copied from interface: XMLEventReceiver
A processing-instruction node.

DataModelException

comment

public void comment(java.lang.String value)
             throws DataModelException
Description copied from interface: XMLEventReceiver
A comment node.

DataModelException

flushElement

public void flushElement(boolean empty)
Overrides:
flushElement in class XMLEventReceiverBase

 Copyright Xavier FRANC 2003-2004