|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 XMLizableSAXException
public InputStream getInputStream()
throws IOException,
SourceException
InputStream object to read from the source.
getInputStream in interface SourcegetInputStream in class AbstractSourceIOException - if I/O error occured.
SourceExceptionpublic 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 ModifiableSourceIOException
public void delete()
throws SourceException
delete in interface ModifiableSourceSourceException
public void deleteTest()
throws SourceException
SourceExceptionpublic 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 ModifiableSourceIOExceptionpublic 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.ListenerSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||