|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.excalibur.source.impl.AbstractSource org.apache.cocoon.components.source.impl.XModuleSource
public class XModuleSource
A ModifiableSource
that takes its content from a
module.
The URI syntax is
"xmodule:[
Field Summary | |
---|---|
protected ServiceManager |
manager
|
Constructor Summary | |
---|---|
XModuleSource(Map objectModel,
String uri,
ServiceManager manager,
Logger logger)
Create a xmodule source from a 'xmodule:' uri and a the object model. |
Method Summary | |
---|---|
boolean |
canCancel(OutputStream stream)
Can the data sent to an OutputStream returned by
getOutputStream() be cancelled ? |
void |
cancel(OutputStream stream)
Cancel the data sent to an OutputStream returned by
getOutputStream() . |
void |
delete()
Delete the source |
void |
deleteTest()
FIXME delete is an operator in java script, this method is for testing puposes in java script only |
boolean |
exists()
Does this source actually exist ? |
ContentHandler |
getContentHandler()
Get a ContentHandler where an XML document can
be written using SAX events. |
InputStream |
getInputStream()
Return an InputStream object to read from the source. |
OutputStream |
getOutputStream()
Get an InputStream where raw bytes can be written to. |
void |
notify(Document insertDoc)
Receive notification of a successfully completed DOM tree generation. |
void |
toSAX(ContentHandler handler)
Implement this method to obtain SAX events. |
Methods inherited from class org.apache.excalibur.source.impl.AbstractSource |
---|
checkInfos, getContentLength, getInfos, getLastModified, getMimeType, getScheme, getURI, getValidity, refresh, setContentLength, setLastModified, setScheme, setSystemId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.excalibur.source.Source |
---|
getContentLength, getLastModified, getMimeType, getScheme, getURI, getValidity, refresh |
Field Detail |
---|
protected ServiceManager manager
Constructor Detail |
---|
public XModuleSource(Map objectModel, String uri, ServiceManager manager, Logger logger) throws MalformedURLException
The uri is of the form "xmodule:/attribute-type/attribute-name/xpath
MalformedURLException
Method Detail |
---|
public void toSAX(ContentHandler handler) throws SAXException
toSAX
in interface XMLizable
SAXException
public InputStream getInputStream() throws IOException, SourceException
InputStream
object to read from the source.
getInputStream
in interface Source
getInputStream
in class AbstractSource
IOException
- if I/O error occured.
SourceException
public boolean exists()
exists
in interface Source
public OutputStream getOutputStream() throws IOException
InputStream
where raw bytes can be written to.
The signification of these bytes is implementation-dependent and
is not restricted to a serialized XML document.
getOutputStream
in interface ModifiableSource
IOException
public void delete() throws SourceException
delete
in interface ModifiableSource
SourceException
public void deleteTest() throws SourceException
SourceException
public boolean canCancel(OutputStream stream)
OutputStream
returned by
getOutputStream()
be cancelled ?
canCancel
in interface ModifiableSource
public void cancel(OutputStream stream) throws IOException
OutputStream
returned by
getOutputStream()
.
After cancel, the stream should no more be used.
cancel
in interface ModifiableSource
IOException
public ContentHandler getContentHandler()
ContentHandler
where an XML document can
be written using SAX events.
Care should be taken that the returned handler can actually
be a XMLConsumer
supporting also
lexical events such as comments.
public void notify(Document insertDoc) throws SAXException
DOMBuilder.Listener
notify
in interface DOMBuilder.Listener
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |