|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The java code for a Stylus Studio XML Pipeline implements this interface. The Stylus Studio XML Pipeline deployer creates a Java class file which implements the user's pipeline. This class contains a main() method and can be run as a standalone Java application. It can also be called from a user written Java program using the methods of this interface. The embedding java program should:
setBaseURI(java.lang.String)
,go()
to run the pipeline,close()
method to release system resources.go()
method only once.
Method Summary | |
void |
bindInputObject(String portName,
Object obj,
ContentType type)
Bind a DOM, InputStream, or a String to the named Pipeline Input node. |
void |
bindInputUrl(String portName,
String url,
ContentType type)
Bind a URL to the named Pipeline Input node. |
void |
bindOutputObject(String portName,
Object obj)
Bind a DOM or OutputStream to the named Pipeline Output node. |
void |
bindOutputUrl(String portName,
String url)
Bind a Pipeline Output node to a URL. |
boolean |
canAcceptSAX(String portName)
Determine if the named Pipeline Input node is able to accept SAX events. |
void |
close()
Close all nodes in this pipeline and release all operating system resources. |
ContentHandler |
getContentHandler(String portName)
Get a ContentHandler with which SAX events can be sent to the named Pipeline Input node. |
void |
go()
Execute the pipeline and wait for it to terminate. |
boolean |
isReady(String portName)
Check if any data was written to the named output port. |
void |
setBaseURI(String baseURI)
Set the BaseURI to be used while executing the pipeline. |
Method Detail |
public void setBaseURI(String baseURI)
baseURI
- The URI which should be used when resolving all relative URI references.public void bindInputObject(String portName, Object obj, ContentType type) throws PipelineException
portName
- The name of the Pipeline Input node.obj
- The object to be bound. It must be an instance of
Document
, InputStream
or String
.type
- Indicates what type of data the input object contains.
PipelineException
public void bindInputUrl(String portName, String url, ContentType type) throws PipelineException
portName
- The name of the Pipeline Input node.url
- The url to be bound.type
- Indicates what type of data will be read fro the URL.
PipelineException
public ContentHandler getContentHandler(String portName) throws PipelineException
portName
- The name of the Pipeline Input node.
PipelineException
public boolean canAcceptSAX(String portName) throws PipelineException
portName
- The name of the Pipeline Input node.
PipelineException
public void bindOutputObject(String portName, Object obj) throws PipelineException
portName
- The name of the Pipeline Output node.obj
- The object to be bound. It must be an instance of Document
or OutputStream
.
PipelineException
public void bindOutputUrl(String portName, String url) throws PipelineException
portName
- The name of the Pipeline Output node.url
- The url to be bound
PipelineException
public boolean isReady(String portName) throws PipelineException
go()
, it will return false.
After go()
returns, this method will return true if the pipeline sent data
to the named output port.
PipelineException
public void go() throws PipelineException
PipelineException
public void close()
isReady(java.lang.String)
method can still be called and will return correct values. The pipeline instance
cannot be reused either before or after the call to close().
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |