org.exist.cocoon
Class XMLDBSourceFactory

java.lang.Object
  extended byAbstractLogEnabled
      extended byorg.exist.cocoon.XMLDBSourceFactory

public final class XMLDBSourceFactory
extends AbstractLogEnabled

This class implements the xmldb:// pseudo-protocol and allows to get XML content from an XML:DB enabled XML database.

The configuration of this protocol is as follows:

   <source-factory name="xmldb" src="org.exist.cocoon.XMLDBSourceFactory>
     <driver type="foo" class="org.foomaker.FooXMLDBDriver"
             user="scott" password="tiger"
             collection="//localhost:8080/foo/base-path/"/>
     <driver...
   <source-factory>
 

The type attribute indicates the database type that will be used for URLs (e.g. xmldb:foo:/path/). The collection attribute specifies a base collection for paths that do not start with "//".

The returned sources are traversable, modifiable and xml-izable.

This class is an import of Cocoon trunk XMLDBSourceFactory, to ensure connexion with a modified XMLDBSource.

Version:
$Id: XMLDBSourceFactory.java,v 1.2 2006/01/20 20:56:17 glorieux Exp $
Author:
cziegeler
See Also:
Serialized Form

Field Summary
protected  java.util.HashMap baseMap
          An optional base collection for each of the drivers
protected  java.util.HashMap credentialMap
          A Map containing the authentication credentials
 
Constructor Summary
XMLDBSourceFactory()
           
 
Method Summary
 void configure(Configuration conf)
          Configure the instance and initialize XML:DB connections (load and register the drivers).
 Source getSource(java.lang.String location, java.util.Map parameters)
          Resolve the source
 void release(org.apache.excalibur.source.Source source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

credentialMap

protected java.util.HashMap credentialMap
A Map containing the authentication credentials


baseMap

protected java.util.HashMap baseMap
An optional base collection for each of the drivers

Constructor Detail

XMLDBSourceFactory

public XMLDBSourceFactory()
Method Detail

configure

public void configure(Configuration conf)
               throws ConfigurationException
Configure the instance and initialize XML:DB connections (load and register the drivers).

Throws:
ConfigurationException

getSource

public Source getSource(java.lang.String location,
                        java.util.Map parameters)
                 throws java.net.MalformedURLException,
                        java.io.IOException
Resolve the source

Throws:
java.net.MalformedURLException
java.io.IOException

release

public void release(org.apache.excalibur.source.Source source)


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.