|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.resource.Variant
org.restlet.resource.Representation
org.restlet.resource.StreamRepresentation
org.restlet.resource.OutputRepresentation
org.restlet.resource.TransformRepresentation
public class TransformRepresentation
Representation able to apply an XSLT transformation. The internal JAXP
transformer is created when the getTransformer() method is first called. So,
if you need to specify a custom URI resolver, you need to do it before
actually using the representation for a transformation.
This representation should be viewed as a wrapper representation that applies
a transform sheet on a source representation when it is read or written out.
Therefore, it isn't intended to be reused on different sources. For this use
case, you should instead use the Transformer
filter.
Field Summary |
---|
Fields inherited from class org.restlet.resource.Variant |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
TransformRepresentation(Context context,
Representation source,
Representation transformSheet)
Constructor. |
Method Summary | |
---|---|
Representation |
getSourceRepresentation()
Returns the source representation to transform. |
Transformer |
getTransformer()
Returns the transformer to be used and reused. |
Representation |
getTransformSheet()
Returns the XSLT transform sheet to apply to the source representation. |
URIResolver |
getURIResolver()
Returns the URI resolver. |
void |
setTransformSheet(Representation transformSheet)
Sets the XSLT transform sheet to apply to message entities. |
void |
write(OutputStream outputStream)
Writes the representation to a byte stream. |
Methods inherited from class org.restlet.resource.OutputRepresentation |
---|
getStream |
Methods inherited from class org.restlet.resource.StreamRepresentation |
---|
getChannel, write |
Methods inherited from class org.restlet.resource.Representation |
---|
getText, isAvailable, isTransient, setAvailable, setTransient |
Methods inherited from class org.restlet.resource.Variant |
---|
getCharacterSet, getEncodings, getExpirationDate, getIdentifier, getLanguages, getMediaType, getModificationDate, getSize, getTag, setCharacterSet, setExpirationDate, setIdentifier, setIdentifier, setMediaType, setModificationDate, setSize, setTag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransformRepresentation(Context context, Representation source, Representation transformSheet)
context
- The parent context.source
- The source representation to transform.transformSheet
- The XSLT transform sheet.Method Detail |
---|
public Representation getSourceRepresentation()
public Transformer getTransformer() throws IOException
IOException
public Representation getTransformSheet()
public URIResolver getURIResolver()
public void setTransformSheet(Representation transformSheet)
transformSheet
- The XSLT transform sheet to apply to message entities.public void write(OutputStream outputStream) throws IOException
OutputRepresentation
write
in class OutputRepresentation
outputStream
- The output stream.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |