|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.ServiceableGenerator
org.apache.cocoon.generation.XMLDBGenerator
public class XMLDBGenerator
This class implements generation of XML documents from a XML:DB compliant database. It must to be configured as follows:
<driver> (a valid DB:XML compliant driver) </driver> <base> xmldb:yourdriver://host/an/optional/path/to/be/prepended </base>NOTE: the driver can be any DB:XML compliant driver (although this component has been tested only with dbXML, and the trailing slash in the base tag is important!
| Field Summary | |
|---|---|
protected String |
base
Deprecated. |
protected String |
col
Deprecated. |
protected org.xmldb.api.base.Collection |
collection
Deprecated. |
protected org.xmldb.api.base.Database |
database
Deprecated. |
protected String |
driver
Deprecated. |
protected String |
res
Deprecated. |
protected org.xmldb.api.modules.XMLResource |
xmlResource
Deprecated. |
| Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator |
|---|
manager |
| Fields inherited from class org.apache.cocoon.generation.AbstractGenerator |
|---|
objectModel, parameters, resolver, source |
| Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
|---|
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
| Fields inherited from interface org.apache.cocoon.generation.Generator |
|---|
ROLE |
| Constructor Summary | |
|---|---|
XMLDBGenerator()
Deprecated. |
|
| Method Summary | |
|---|---|
void |
configure(Configuration conf)
Deprecated. Configure the component. |
void |
generate()
Deprecated. Parse the requested URI, connect to the XML:DB database and fetch the requested resource. |
Serializable |
getKey()
Deprecated. The component isn't cached (yet) |
SourceValidity |
getValidity()
Deprecated. The component isn't cached (yet) |
void |
initialize()
Deprecated. Initialize the component getting a database instance. |
void |
recycle()
Deprecated. Recycle the component, keep only the configuration variables and the database instance for reuse. |
void |
setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
Deprecated. Set the SourceResolver, object model Map,
the source and sitemap Parameters used to process the request. |
| Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator |
|---|
dispose, service |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
|---|
setConsumer, setContentHandler, setLexicalHandler |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
|---|
setConsumer |
| Field Detail |
|---|
protected String driver
protected String base
protected String col
protected String res
protected org.xmldb.api.base.Database database
protected org.xmldb.api.base.Collection collection
protected org.xmldb.api.modules.XMLResource xmlResource
| Constructor Detail |
|---|
public XMLDBGenerator()
| Method Detail |
|---|
public void recycle()
recycle in interface Recyclablerecycle in class AbstractGenerator
public void configure(Configuration conf)
throws ConfigurationException
<driver>org.dbxml.client.xmldb.DatabaseImpl</driver> <base>xmldb:dbxml:///db/</base>NOTE: the driver can be any DB:XML compliant driver (although this component has been tested only with dbXML, and the trailing slash in the base tag is important!
configure in interface ConfigurableConfigurationException - (configuration invalid or missing)
public void initialize()
throws Exception
initialize in interface InitializableException - if an error occurs
public void setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
throws ProcessingException,
SAXException,
IOException
AbstractGeneratorSourceResolver, object model Map,
the source and sitemap Parameters used to process the request.
setup in interface SitemapModelComponentsetup in class AbstractGeneratorProcessingException
SAXException
IOExceptionpublic SourceValidity getValidity()
getValidity in interface CacheableProcessingComponentnull if the
component is currently not cacheable.public Serializable getKey()
getKey in interface CacheableProcessingComponentnull if the component
is currently not cacheable.
public void generate()
throws IOException,
SAXException,
ProcessingException
generate in interface GeneratorProcessingException - something unexpected happened with the DB
IOException
SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||