org.exist.cocoon
Class XMLDBSourceFactory
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.exist.cocoon.XMLDBSourceFactory
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.excalibur.source.SourceFactory, org.apache.avalon.framework.thread.ThreadSafe
- public final class XMLDBSourceFactory
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements org.apache.excalibur.source.SourceFactory, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.thread.ThreadSafe
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 4751 2006-10-28 15:34:44Z wolfgang_m $
- Author:
- cziegeler
Fields inherited from interface org.apache.excalibur.source.SourceFactory |
ROLE |
Method Summary |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Configure the instance and initialize XML:DB connections (load and register the drivers). |
org.apache.excalibur.source.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 org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLDBSourceFactory
public XMLDBSourceFactory()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Configure the instance and initialize XML:DB connections (load and register the drivers).
- Specified by:
configure
in interface org.apache.avalon.framework.configuration.Configurable
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
getSource
public org.apache.excalibur.source.Source getSource(java.lang.String location,
java.util.Map parameters)
throws java.net.MalformedURLException,
java.io.IOException
- Resolve the source
- Specified by:
getSource
in interface org.apache.excalibur.source.SourceFactory
- Throws:
java.net.MalformedURLException
java.io.IOException
release
public void release(org.apache.excalibur.source.Source source)
- Specified by:
release
in interface org.apache.excalibur.source.SourceFactory
Copyright (C) Wolfgang Meier. All rights reserved.