net.sf.tomp.xtcl.command
Class StyleFilterCommand
java.lang.Object
net.sf.tomp.xtcl.command.AbstractCommand
net.sf.tomp.xtcl.command.VarCommand
net.sf.tomp.xtcl.command.AbstractParametrizedVarCommand
net.sf.tomp.xtcl.command.FilterCommand
net.sf.tomp.xtcl.command.StyleFilterCommand
- All Implemented Interfaces:
- Parametrized, Command, ParametrizedCommand
- Direct Known Subclasses:
- STXFilterCommand, XSLTFilterCommand
public abstract class StyleFilterCommand
- extends FilterCommand
Abstract ancestor for all style-based TransformerFilters
- Author:
- tomp
Field Summary |
protected java.lang.String |
styleRef
Reference to a style (XSLT or STX) |
Fields inherited from class net.sf.tomp.xtcl.command.VarCommand |
var |
Method Summary |
int |
execute(Context context)
Sets the properties from prop. references to parameters,
creates the style-based filter,
initializes it, puts into Context as variable |
protected abstract org.xml.sax.XMLFilter |
makeFilter(Context context,
java.lang.String styleRef)
make style-based (XSLT or STX) filter |
void |
setStyleRef(java.lang.String s)
set Reference to a style |
java.lang.String |
toString()
Base for toString() in Joost and XSTL filters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
styleRef
protected java.lang.String styleRef
- Reference to a style (XSLT or STX)
StyleFilterCommand
public StyleFilterCommand()
setStyleRef
public void setStyleRef(java.lang.String s)
- set Reference to a style
- Parameters:
s
- Reference to a style
execute
public int execute(Context context)
throws java.lang.Exception
- Sets the properties from prop. references to parameters,
creates the style-based filter,
initializes it, puts into Context as variable
- Specified by:
execute
in interface Command
- Overrides:
execute
in class FilterCommand
- Parameters:
context
- to put the filter in
- Returns:
- 0 if OK
- Throws:
java.lang.Exception
- if anything fails
makeFilter
protected abstract org.xml.sax.XMLFilter makeFilter(Context context,
java.lang.String styleRef)
throws javax.xml.transform.TransformerConfigurationException
- make style-based (XSLT or STX) filter
- Parameters:
context
- the Context for getting factoriesstyleRef
- String ref to XSLT or STX style
- Returns:
- the filter
- Throws:
javax.xml.transform.TransformerConfigurationException
- if cannot be created
toString
public java.lang.String toString()
- Base for toString() in Joost and XSTL filters
- Overrides:
toString
in class FilterCommand
- Returns:
- "FILTER " + var + "=" + className + " (" + listMap(params) + ")";
Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.