org.restlet.resource
Class TransformRepresentation

java.lang.Object
  extended by org.restlet.resource.Variant
      extended by org.restlet.resource.Representation
          extended by org.restlet.resource.StreamRepresentation
              extended by org.restlet.resource.OutputRepresentation
                  extended by org.restlet.resource.TransformRepresentation

public class TransformRepresentation
extends OutputRepresentation

Representation able to apply an XSLT transformation.

Author:
Jerome Louvel (contact@noelios.com) Noelios Consulting

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 message entities.
 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

TransformRepresentation

public TransformRepresentation(Context context,
                               Representation source,
                               Representation transformSheet)
Constructor.

Parameters:
context - The parent context.
source - The source representation to transform.
transformSheet - The XSLT transform sheet.
Method Detail

getSourceRepresentation

public Representation getSourceRepresentation()
Returns the source representation to transform.

Returns:
The source representation to transform.

getTransformer

public Transformer getTransformer()
                           throws IOException
Returns the transformer to be used and reused.

Returns:
The transformer to be used and reused.
Throws:
IOException

getTransformSheet

public Representation getTransformSheet()
Returns the XSLT transform sheet to apply to message entities.

Returns:
The XSLT transform sheet to apply to message entities.

getURIResolver

public URIResolver getURIResolver()
Returns the URI resolver.

Returns:
The URI resolver.

setTransformSheet

public void setTransformSheet(Representation transformSheet)
Sets the XSLT transform sheet to apply to message entities.

Parameters:
transformSheet - The XSLT transform sheet to apply to message entities.

write

public void write(OutputStream outputStream)
           throws IOException
Description copied from class: OutputRepresentation
Writes the representation to a byte stream.

Specified by:
write in class OutputRepresentation
Parameters:
outputStream - The output stream.
Throws:
IOException


Copyright © 2005-2007 Noelios Consulting.