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

## org.exist.cocoon
Class XMLDBTransformer

    java.lang.Object
      org.apache.avalon.framework.logger.AbstractLogEnabled
          org.apache.cocoon.xml.AbstractXMLProducer
              org.apache.cocoon.xml.AbstractXMLPipe
                  org.apache.cocoon.transformation.AbstractTransformer
                      org.apache.cocoon.transformation.AbstractSAXTransformer
                          org.exist.cocoon.XMLDBTransformer

All Implemented Interfaces:
  org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.framework.service.Serviceable, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.transformation.Transformer, org.apache.cocoon.xml.XMLConsumer, org.apache.excalibur.xml.sax.XMLConsumer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer

public class XMLDBTransformer
extends org.apache.cocoon.transformation.AbstractSAXTransformer
implements org.apache.avalon.excalibur.pool.Poolable

Transformer component for querying an XML database using the XMLDB API. This component provides a limited set of tags to query collections in the database.

Author:
  wolf

Field Summary
`static java.lang.String` | `COLLECTION_ELEMENT`
`static java.lang.String` | `CURRENT_NODE_ELEMENT`
`java.lang.String` | `DEFAULT_DRIVER`
`java.lang.String` | `DEFAULT_PASSWORD`
`java.lang.String` | `DEFAULT_USER`
`static java.lang.String` | `ERRMSG_ELEMENT`
`static java.lang.String` | `ERROR_ELEMENT`
`static java.lang.String` | `FATAL_ERROR`
`static java.lang.String` | `FOR_EACH_ELEMENT`
`static int` | `IN_COLLECTION`
`static int` | `IN_QUERY`
`static java.lang.String` | `INFO`
`static java.lang.String` | `NAMESPACE`
`static java.lang.String` | `PREFIX`
`static java.lang.String` | `RESULT_SET_ELEMENT`
`static java.lang.String` | `SELECT_NODE`
`static java.lang.String` | `STACKTRACE_ELEMENT`
`static java.lang.String` | `WARNING`
`static java.lang.String` | `XUPDATE_ELEMENT`

Fields inherited from interface org.apache.cocoon.transformation.Transformer
`ROLE`

Constructor Summary
`XMLDBTransformer()`

Method Summary
`void` | `characters(char[] p0, int p1, int p2)`
`void` | `configure(org.apache.avalon.framework.configuration.Configuration configuration)` Try to read configuration parameters from the component setup.
`void` | `endElement(java.lang.String uri, java.lang.String loc, java.lang.String raw)`
`void` | `endPrefixMapping(java.lang.String prefix)`
`void` | `recycle()`
`void` | `setup(org.apache.cocoon.environment.SourceResolver resolver, java.util.Map map, java.lang.String src, org.apache.avalon.framework.parameters.Parameters parameters)` Setup the component.
`void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes attribs)`
`void` | `startPrefixMapping(java.lang.String prefix, java.lang.String namespaceURI)`

Methods inherited from class org.apache.cocoon.transformation.AbstractSAXTransformer
`comment, endCDATA, endDocument, endDTD, endEntity, endParametersRecording, endParametersRecording, endRecording, endSAXRecording, endSerializedXMLRecording, endTextRecording, endTransformingElement, ignorableWhitespace, processingInstruction, sendEndElementEvent, sendEndElementEventNS, sendEvents, sendParametersEvents, sendStartElementEvent, sendStartElementEvent, sendStartElementEventNS, sendStartElementEventNS, sendTextEvent, service, setDocumentLocator, setupTransforming, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startParametersRecording, startRecording, startSAXRecording, startSerializedXMLRecording, startTextRecording, startTransformingElement`

Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
`setConsumer, setContentHandler, setLexicalHandler`

Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
`enableLogging`

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

Methods inherited from interface org.apache.cocoon.xml.XMLProducer
`setConsumer`

Field Detail

### DEFAULT_DRIVER

    public java.lang.String DEFAULT_DRIVER

### DEFAULT_USER

    public java.lang.String DEFAULT_USER

### DEFAULT_PASSWORD

    public java.lang.String DEFAULT_PASSWORD

### NAMESPACE

    public static final java.lang.String NAMESPACE

See Also:
  Constant Field Values

### COLLECTION_ELEMENT

    public static final java.lang.String COLLECTION_ELEMENT

See Also:
  Constant Field Values

### FOR_EACH_ELEMENT

    public static final java.lang.String FOR_EACH_ELEMENT

See Also:
  Constant Field Values

### CURRENT_NODE_ELEMENT

    public static final java.lang.String CURRENT_NODE_ELEMENT

See Also:
  Constant Field Values

### SELECT_NODE

    public static final java.lang.String SELECT_NODE

See Also:
  Constant Field Values

### RESULT_SET_ELEMENT

    public static final java.lang.String RESULT_SET_ELEMENT

See Also:
  Constant Field Values

### XUPDATE_ELEMENT

    public static final java.lang.String XUPDATE_ELEMENT

See Also:
  Constant Field Values

### ERROR_ELEMENT

    public static final java.lang.String ERROR_ELEMENT

See Also:
  Constant Field Values

### ERRMSG_ELEMENT

    public static final java.lang.String ERRMSG_ELEMENT

See Also:
  Constant Field Values

### STACKTRACE_ELEMENT

    public static final java.lang.String STACKTRACE_ELEMENT

See Also:
  Constant Field Values

### PREFIX

    public static final java.lang.String PREFIX

See Also:
  Constant Field Values

### FATAL_ERROR

    public static final java.lang.String FATAL_ERROR

See Also:
  Constant Field Values

### WARNING

    public static final java.lang.String WARNING

See Also:
  Constant Field Values

### INFO

    public static final java.lang.String INFO

See Also:
  Constant Field Values

### IN_COLLECTION

    public static final int IN_COLLECTION

See Also:
  Constant Field Values

### IN_QUERY

    public static final int IN_QUERY

See Also:
  Constant Field Values

Constructor Detail

### XMLDBTransformer

    public XMLDBTransformer()

Method Detail

### setup

    public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                      java.util.Map map,
                      java.lang.String src,
                      org.apache.avalon.framework.parameters.Parameters parameters)
               throws org.apache.cocoon.ProcessingException,
                      org.xml.sax.SAXException,
                      java.io.IOException

  Setup the component. Accepts parameters "driver", "user" and "password". If specified, those parameters override the default- settings or the settings specified during component setup. Example: <map:transform type="xmldb"> <map:parameter name="driver" value="org.exist.xmldb.DatabaseImpl"/> <map:parameter name="user" value="guest"/> <map:parameter name="password" value="guest"/> </map:transform>

  Specified by:
    `setup` in interface `org.apache.cocoon.sitemap.SitemapModelComponent`
  Throws:
    `org.apache.cocoon.ProcessingException`
    `org.xml.sax.SAXException`
    `java.io.IOException`
  See Also:
    `SitemapModelComponent.setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)`

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String qname,
                             org.xml.sax.Attributes attribs)
                      throws org.xml.sax.SAXException

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`

### endElement

    public void endElement(java.lang.String uri,
                           java.lang.String loc,
                           java.lang.String raw)
                    throws org.xml.sax.SAXException

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`

### recycle

    public void recycle()

  Specified by:
    `recycle` in interface `org.apache.avalon.excalibur.pool.Recyclable`

### characters

    public void characters(char[] p0,
                           int p1,
                           int p2)
                    throws org.xml.sax.SAXException

  Specified by:
    `characters` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`

### configure

    public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
                   throws org.apache.avalon.framework.configuration.ConfigurationException

  Try to read configuration parameters from the component setup. Example: <map:transformer name="xmldb" src="org.exist.cocoon.XMLDBTransformer"> <driver>org.exist.xmldb.DatabaseImpl</driver> <user>guest</user> <password>guest</password> </map:transformer> will set the default driver, user and password. Note that these values may also be set as parameters in the pipeline.

  Specified by:
    `configure` in interface `org.apache.avalon.framework.configuration.Configurable`
  Throws:
    `org.apache.avalon.framework.configuration.ConfigurationException`
  See Also:
    `Configurable.configure(org.apache.avalon.framework.configuration.Configuration)`

### 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`

### startPrefixMapping

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

  Specified by:
    `startPrefixMapping` in interface `org.xml.sax.ContentHandler`
  Throws:
    `org.xml.sax.SAXException`

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.