Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.xupdate
Class XUpdateProcessor

    java.lang.Object
      org.exist.xupdate.XUpdateProcessor

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

public class XUpdateProcessor
extends java.lang.Object
implements org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

Main class to pre-process an XUpdate request. XUpdateProcessor will parse the request via SAX and compile it into a set of `Modification` objects as returned by the `parse(org.xml.sax.InputSource)` method. The modifications can then be executed via `Modification.process(org.exist.storage.txn.Txn)`.

Author:
  Wolfgang Meier

Field Summary
`static java.lang.String` | `APPEND`
`static java.lang.String` | `ATTRIBUTE`
`static java.lang.String` | `COMMENT`
`static java.lang.String` | `ELEMENT`
`static java.lang.String` | `IF`
`static java.lang.String` | `INSERT_AFTER`
`static java.lang.String` | `INSERT_BEFORE`
`static java.lang.String` | `MODIFICATIONS`
`static java.lang.String` | `PROCESSING_INSTRUCTION`
`static java.lang.String` | `REMOVE`
`static java.lang.String` | `RENAME`
`static java.lang.String` | `REPLACE`
`static java.lang.String` | `TEXT`
`static java.lang.String` | `UPDATE`
`static java.lang.String` | `VALUE_OF`
`static java.lang.String` | `VARIABLE`
`static java.lang.String` | `XUPDATE_NS`

Constructor Summary
`XUpdateProcessor(DBBroker broker, DocumentSet docs, AccessContext accessCtx)` Constructor for XUpdateProcessor.

Method Summary
`void` | `characters(char[] ch, int start, int length)`
`void` | `comment(char[] ch, int start, int length)`
`void` | `endCDATA()`
`void` | `endDocument()`
`void` | `endDTD()`
`void` | `endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)`
`void` | `endEntity(java.lang.String name)`
`void` | `endPrefixMapping(java.lang.String prefix)`
`void` | `ignorableWhitespace(char[] ch, int start, int length)`
`Modification[]` | `parse(org.xml.sax.InputSource is)` Parse the input source into a set of modifications.
`void` | `processingInstruction(java.lang.String target, java.lang.String data)`
`void` | `reset()`
`void` | `setBroker(DBBroker broker)`
`void` | `setDocumentLocator(org.xml.sax.Locator locator)`
`void` | `setDocumentSet(DocumentSet docs)`
`void` | `skippedEntity(java.lang.String name)`
`void` | `startCDATA()`
`void` | `startDocument()`
`void` | `startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)`
`void` | `startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)`
`void` | `startEntity(java.lang.String name)`
`void` | `startPrefixMapping(java.lang.String prefix, java.lang.String uri)`

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

Field Detail

### MODIFICATIONS

    public static final java.lang.String MODIFICATIONS

See Also:
  Constant Field Values

### INSERT_AFTER

    public static final java.lang.String INSERT_AFTER

See Also:
  Constant Field Values

### INSERT_BEFORE

    public static final java.lang.String INSERT_BEFORE

See Also:
  Constant Field Values

### REPLACE

    public static final java.lang.String REPLACE

See Also:
  Constant Field Values

### RENAME

    public static final java.lang.String RENAME

See Also:
  Constant Field Values

### REMOVE

    public static final java.lang.String REMOVE

See Also:
  Constant Field Values

### APPEND

    public static final java.lang.String APPEND

See Also:
  Constant Field Values

### UPDATE

    public static final java.lang.String UPDATE

See Also:
  Constant Field Values

### COMMENT

    public static final java.lang.String COMMENT

See Also:
  Constant Field Values

### PROCESSING_INSTRUCTION

    public static final java.lang.String PROCESSING_INSTRUCTION

See Also:
  Constant Field Values

### TEXT

    public static final java.lang.String TEXT

See Also:
  Constant Field Values

### ATTRIBUTE

    public static final java.lang.String ATTRIBUTE

See Also:
  Constant Field Values

### ELEMENT

    public static final java.lang.String ELEMENT

See Also:
  Constant Field Values

### VALUE_OF

    public static final java.lang.String VALUE_OF

See Also:
  Constant Field Values

### VARIABLE

    public static final java.lang.String VARIABLE

See Also:
  Constant Field Values

### IF

    public static final java.lang.String IF

See Also:
  Constant Field Values

### XUPDATE_NS

    public static final java.lang.String XUPDATE_NS

See Also:
  Constant Field Values

Constructor Detail

### XUpdateProcessor

    public XUpdateProcessor(DBBroker broker,
                            DocumentSet docs,
                            AccessContext accessCtx)
                     throws javax.xml.parsers.ParserConfigurationException

  Constructor for XUpdateProcessor.

Method Detail

### setBroker

    public void setBroker(DBBroker broker)

### setDocumentSet

    public void setDocumentSet(DocumentSet docs)

### parse

    public Modification[] parse(org.xml.sax.InputSource is)
                         throws javax.xml.parsers.ParserConfigurationException,
                                java.io.IOException,
                                org.xml.sax.SAXException

  Parse the input source into a set of modifications.

  Parameters:
    `is` -
  Returns:
    an array of type Modification
  Throws:
    `javax.xml.parsers.ParserConfigurationException`
    `java.io.IOException`
    `org.xml.sax.SAXException`

### setDocumentLocator

    public void setDocumentLocator(org.xml.sax.Locator locator)

  Specified by:
    `setDocumentLocator` in interface `org.xml.sax.ContentHandler`
  See Also:
    `ContentHandler.setDocumentLocator(org.xml.sax.Locator)`

### startDocument

    public void startDocument()
                       throws org.xml.sax.SAXException

  Specified by:
    `startDocument` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.startDocument()`

### endDocument

    public void endDocument()
                     throws org.xml.sax.SAXException

  Specified by:
    `endDocument` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.endDocument()`

### startPrefixMapping

    public void startPrefixMapping(java.lang.String prefix,
                                   java.lang.String uri)
                            throws org.xml.sax.SAXException

  Specified by:
    `startPrefixMapping` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)`

### endPrefixMapping

    public void endPrefixMapping(java.lang.String prefix)
                          throws org.xml.sax.SAXException

  Specified by:
    `endPrefixMapping` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.endPrefixMapping(java.lang.String)`

### startElement

    public void startElement(java.lang.String namespaceURI,
                             java.lang.String localName,
                             java.lang.String qName,
                             org.xml.sax.Attributes atts)
                      throws org.xml.sax.SAXException

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)`

### endElement

    public void endElement(java.lang.String namespaceURI,
                           java.lang.String localName,
                           java.lang.String qName)
                    throws org.xml.sax.SAXException

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)`

### characters

    public void characters(char[] ch,
                           int start,
                           int length)
                    throws org.xml.sax.SAXException

  Specified by:
    `characters` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.characters(char[], int, int)`

### ignorableWhitespace

    public void ignorableWhitespace(char[] ch,
                                    int start,
                                    int length)
                             throws org.xml.sax.SAXException

  Specified by:
    `ignorableWhitespace` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.ignorableWhitespace(char[], int, int)`

### processingInstruction

    public void processingInstruction(java.lang.String target,
                                      java.lang.String data)
                               throws org.xml.sax.SAXException

  Specified by:
    `processingInstruction` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.processingInstruction(java.lang.String, java.lang.String)`

### skippedEntity

    public void skippedEntity(java.lang.String name)
                       throws org.xml.sax.SAXException

  Specified by:
    `skippedEntity` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `ContentHandler.skippedEntity(java.lang.String)`

### comment

    public void comment(char[] ch,
                        int start,
                        int length)
                 throws org.xml.sax.SAXException

  Specified by:
    `comment` in interface `org.xml.sax.ext.LexicalHandler`
  Throws:
    `org.xml.sax.SAXException`

### endCDATA

    public void endCDATA()
                  throws org.xml.sax.SAXException

  Specified by:
    `endCDATA` in interface `org.xml.sax.ext.LexicalHandler`
  Throws:
    `org.xml.sax.SAXException`

### endDTD

    public void endDTD()
                throws org.xml.sax.SAXException

  Specified by:
    `endDTD` in interface `org.xml.sax.ext.LexicalHandler`
  Throws:
    `org.xml.sax.SAXException`

### endEntity

    public void endEntity(java.lang.String name)
                   throws org.xml.sax.SAXException

  Specified by:
    `endEntity` in interface `org.xml.sax.ext.LexicalHandler`
  Throws:
    `org.xml.sax.SAXException`

### startCDATA

    public void startCDATA()
                    throws org.xml.sax.SAXException

  Specified by:
    `startCDATA` in interface `org.xml.sax.ext.LexicalHandler`
  Throws:
    `org.xml.sax.SAXException`

### startDTD

    public void startDTD(java.lang.String name,
                         java.lang.String publicId,
                         java.lang.String systemId)
                  throws org.xml.sax.SAXException

  Specified by:
    `startDTD` in interface `org.xml.sax.ext.LexicalHandler`
  Throws:
    `org.xml.sax.SAXException`

### startEntity

    public void startEntity(java.lang.String name)
                     throws org.xml.sax.SAXException

  Specified by:
    `startEntity` in interface `org.xml.sax.ext.LexicalHandler`
  Throws:
    `org.xml.sax.SAXException`

### reset

    public void reset()

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.