public class SaxRepresentation extends XmlRepresentation
UNKNOWN_SIZE| Constructor and Description |
|---|
SaxRepresentation()
Default constructor.
|
SaxRepresentation(MediaType mediaType)
Constructor.
|
SaxRepresentation(MediaType mediaType,
Document xmlDocument)
Constructor.
|
SaxRepresentation(MediaType mediaType,
InputSource xmlSource)
Constructor.
|
SaxRepresentation(MediaType mediaType,
SAXSource xmlSource)
Constructor.
|
SaxRepresentation(Representation xmlRepresentation)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
InputSource |
getInputSource()
Returns the XML representation as a SAX input source.
|
SAXSource |
getSaxSource()
Returns the SAX source that can be parsed by the
parse(ContentHandler) method or used for an XSLT transformation. |
boolean |
isSecureProcessing()
Indicates if it limits potential XML overflow attacks.
|
void |
parse(ContentHandler contentHandler)
Parses the source and sends SAX events to a content handler.
|
void |
release()
Releases the namespaces map.
|
void |
setSaxSource(SAXSource source)
Sets a SAX source that can be parsed by the
parse(ContentHandler) method. |
void |
setSecureProcessing(boolean secureProcessing)
Indicates if it limits potential XML overflow attacks.
|
void |
write(Writer writer)
Writes the representation to a characters writer.
|
void |
write(XmlWriter writer)
Writes the representation to a XML writer.
|
evaluate, getBoolean, getDocument, getDocumentBuilder, getDomSource, getEntityResolver, getErrorHandler, getNamespaces, getNamespaceURI, getNode, getNodes, getNumber, getPrefix, getPrefixes, getSaxSource, getSchema, getStreamSource, getText, isCoalescing, isExpandingEntityRefs, isIgnoringComments, isIgnoringExtraWhitespaces, isNamespaceAware, isValidatingDtd, isXIncludeAware, setCoalescing, setEntityResolver, setErrorHandler, setExpandingEntityRefs, setIgnoringComments, setIgnoringExtraWhitespaces, setNamespaceAware, setNamespaces, setSchema, setSchema, setValidatingDtd, setXIncludeAware, validate, validate, validate, validategetReadergetChannel, getStream, write, writeappend, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransientgetModificationDate, getTag, setModificationDate, setTagcreateClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toStringpublic SaxRepresentation()
MediaType.TEXT_XML media type.public SaxRepresentation(MediaType mediaType)
mediaType - The representation media type.public SaxRepresentation(MediaType mediaType, Document xmlDocument)
mediaType - The representation's media type.xmlDocument - A DOM document to parse.public SaxRepresentation(MediaType mediaType, InputSource xmlSource)
mediaType - The representation's media type.xmlSource - A SAX input source to parse.public SaxRepresentation(MediaType mediaType, SAXSource xmlSource)
mediaType - The representation's media type.xmlSource - A JAXP source to parse.public SaxRepresentation(Representation xmlRepresentation)
xmlRepresentation - A source XML representation to parse.public InputSource getInputSource() throws IOException
XmlRepresentationgetInputSource in class XmlRepresentationIOExceptionpublic SAXSource getSaxSource() throws IOException
parse(ContentHandler) method or used for an XSLT transformation.getSaxSource in class XmlRepresentationIOExceptionpublic boolean isSecureProcessing()
public void parse(ContentHandler contentHandler) throws IOException
contentHandler - The SAX content handler to use for parsing.IOExceptionpublic void release()
release in class XmlRepresentationpublic void setSaxSource(SAXSource source)
parse(ContentHandler) method.source - A SAX source.public void setSecureProcessing(boolean secureProcessing)
secureProcessing - True if it limits potential XML overflow attacks.public void write(Writer writer) throws IOException
RepresentationWriter after writing to it as this will be handled
by the Restlet connectors automatically.write in class Representationwriter - The characters writer.IOExceptionpublic void write(XmlWriter writer) throws IOException
parse(ContentHandler) using the XmlWriter
parameter as the content handler. This behavior is intended to be
overridden.writer - The XML writer to write to.IOExceptionCopyright © 2005–2015. All rights reserved.