|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.lightest.core.CustomizedTransformer
public abstract class CustomizedTransformer
Applies an XSL transform, with customizations. This is a facade encapsulating the basic javax.xml.transform.Transformer functionality. The customize() method is called at most once, after which the customized stylesheet is cached inside the internal transformer variable. This implementation is NOT thread-safe.
| Field Summary | |
|---|---|
static String |
DEFAULT_TRANSFORMER_FACTORY
|
protected Transformer |
transformer
|
| Constructor Summary | |
|---|---|
CustomizedTransformer()
|
|
| Method Summary | |
|---|---|
abstract void |
customize(Document doc)
Customizes the XSL transform XML. |
groovy.lang.MetaClass |
getMetaClass()
|
Object |
getProperty(String name)
|
abstract InputStream |
getTransformAsStream()
Returns the XSL transform source as an InputStream. |
Object |
invokeMethod(String name,
Object args)
|
void |
setMetaClass(groovy.lang.MetaClass metaClass)
|
void |
setParameter(String name,
Object value)
Adds a parameter for the transformation. |
void |
setProperty(String name,
Object value)
|
void |
transform(InputStream is,
OutputStream os)
Transforms the given input stream XML with customizations, and writes the result to the given output stream. |
void |
transform(String s,
OutputStream os)
Transforms the given XML string with customizations, and writes the result to the given output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_TRANSFORMER_FACTORY
protected Transformer transformer
| Constructor Detail |
|---|
public CustomizedTransformer()
| Method Detail |
|---|
public abstract InputStream getTransformAsStream()
public void setParameter(String name,
Object value)
name - value -
public void transform(String s,
OutputStream os)
s - the XML string to transform. Assumed to be UTF-8 encoded.os -
public void transform(InputStream is,
OutputStream os)
is - os - public abstract void customize(Document doc)
doc - the document object of the XSLT document.public groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass metaClass)
setMetaClass in interface groovy.lang.GroovyObject
public Object invokeMethod(String name,
Object args)
invokeMethod in interface groovy.lang.GroovyObjectpublic Object getProperty(String name)
getProperty in interface groovy.lang.GroovyObject
public void setProperty(String name,
Object value)
setProperty in interface groovy.lang.GroovyObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||