org.apache.cocoon.components.xscript
Class XScriptObject
java.lang.Object
|
+--org.apache.cocoon.components.xscript.XScriptObject
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Composable, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, Source, XMLizable
- Direct Known Subclasses:
- XScriptObjectFromURL, XScriptObjectInlineXML, XScriptObjectResult
- public abstract class XScriptObject
- extends java.lang.Object
- implements Source, org.apache.avalon.framework.component.Composable
XScriptObject is the root class implemented by all the
object types in XScript. Every XScriptObject is essentially a
Source object.
- Since:
- August 4, 2001
- Version:
- CVS $Id: XScriptObject.java,v 1.7.2.3 2002/07/26 04:40:49 vgritsenko Exp $
- Author:
- Ovidiu Predescu
|
Field Summary |
protected org.apache.avalon.framework.component.ComponentManager |
componentManager
|
|
Method Summary |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
|
abstract long |
getContentLength()
Get the content length of the source or -1 if it
is not possible to determine the length. |
org.xml.sax.InputSource |
getInputSource()
Return an InputSource object to read the XML
content. |
long |
getLastModified()
Get the last modification date of the source or 0 if it
is not possible to determine the date. |
void |
recycle()
|
void |
toEmbeddedSAX(org.xml.sax.ContentHandler handler)
|
void |
toSAX(org.xml.sax.ContentHandler handler)
Generates SAX events representing the object's state.
NOTE : if the implementation can produce lexical events, care should be taken
that handler can actually be a XMLConsumer that accepts such
events. |
XScriptObject |
transform(XScriptObject stylesheet,
org.apache.avalon.framework.parameters.Parameters params)
Apply the XSLT stylesheet defined by the stylesheet
variable to this instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
componentManager
protected org.apache.avalon.framework.component.ComponentManager componentManager
XScriptObject
public XScriptObject(XScriptManager manager)
- Creates a new
XScriptObject instance.
- Parameters:
manager - a XScriptManager value
compose
public void compose(org.apache.avalon.framework.component.ComponentManager manager)
throws org.apache.avalon.framework.component.ComponentException
- Specified by:
compose in interface org.apache.avalon.framework.component.Composable
transform
public XScriptObject transform(XScriptObject stylesheet,
org.apache.avalon.framework.parameters.Parameters params)
throws java.lang.IllegalArgumentException,
ProcessingException
- Apply the XSLT stylesheet defined by the
stylesheet
variable to this instance. Return the result of the
transformation as an XScriptObject.
- Parameters:
stylesheet - a XScriptObject valueparams - a Parameters value containing optional
arguments to be passed to the XSLT processor.- Returns:
XScriptObject object containing the result
of the XSLT processing.- Throws:
java.lang.IllegalArgumentException - if an error occursProcessingException - if an error occurs
toEmbeddedSAX
public void toEmbeddedSAX(org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
toSAX
public void toSAX(org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
- Description copied from interface:
XMLizable
- Generates SAX events representing the object's state.
NOTE : if the implementation can produce lexical events, care should be taken
that handler can actually be a XMLConsumer that accepts such
events.
- Specified by:
toSAX in interface XMLizable
getLastModified
public long getLastModified()
- Description copied from interface:
Source
- Get the last modification date of the source or 0 if it
is not possible to determine the date.
- Specified by:
getLastModified in interface Source
getContentLength
public abstract long getContentLength()
- Description copied from interface:
Source
- Get the content length of the source or -1 if it
is not possible to determine the length.
- Specified by:
getContentLength in interface Source
getInputSource
public org.xml.sax.InputSource getInputSource()
throws ProcessingException,
java.io.IOException
- Description copied from interface:
Source
- Return an
InputSource object to read the XML
content.
- Specified by:
getInputSource in interface Source
- Following copied from interface:
org.apache.cocoon.environment.Source
- Returns:
- an
InputSource value - Throws:
ProcessingException - if an error occursjava.io.IOException - if an error occurs
recycle
public void recycle()
- Specified by:
recycle in interface org.apache.avalon.excalibur.pool.Recyclable
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.