|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xml.serializer.dom3.LSSerializerImpl
public final class LSSerializerImpl
Implemenatation of DOM Level 3 org.w3c.ls.LSSerializer and
org.w3c.dom.ls.DOMConfiguration. Serialization is achieved by delegating
serialization calls to org.apache.xml.serializer.ToStream or
one of its derived classes depending on the serialization method, while walking
the DOM in DOM3TreeWalker.
| Constructor Summary | |
|---|---|
LSSerializerImpl()
Constructor: Creates a LSSerializerImpl object. |
|
| Method Summary | |
|---|---|
boolean |
canSetParameter(java.lang.String name,
java.lang.Object value)
Checks if setting a parameter to a specific value is supported. |
org.w3c.dom.DOMConfiguration |
getDomConfig()
Returns the DOMConfiguration of the LSSerializer. |
org.w3c.dom.DOMErrorHandler |
getErrorHandler()
This method returns the LSSerializer's error handler. |
org.w3c.dom.ls.LSSerializerFilter |
getFilter()
Returns the DOMConfiguration of the LSSerializer. |
java.lang.String |
getNewLine()
Returns the End-Of-Line sequence of characters to be used in the XML being serialized. |
java.lang.Object |
getParameter(java.lang.String name)
This method returns the value of a parameter if known. |
org.w3c.dom.DOMStringList |
getParameterNames()
This method returns a of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application |
void |
initializeSerializerProps()
Initializes the underlying serializer's configuration depending on the default DOMConfiguration parameters. |
void |
setFilter(org.w3c.dom.ls.LSSerializerFilter filter)
Set a LSSerilizerFilter on the LSSerializer. |
void |
setNewLine(java.lang.String newLine)
Sets the End-Of-Line sequence of characters to be used in the XML being serialized. |
void |
setParameter(java.lang.String name,
java.lang.Object value)
This method sets the value of the named parameter. |
boolean |
write(org.w3c.dom.Node nodeArg,
org.w3c.dom.ls.LSOutput destination)
Serializes the specified node to the specified LSOutput and returns true if the Node was successfully serialized. |
java.lang.String |
writeToString(org.w3c.dom.Node nodeArg)
Serializes the specified node and returns a String with the serialized data to the caller. |
boolean |
writeToURI(org.w3c.dom.Node nodeArg,
java.lang.String uri)
Serializes the specified node to the specified URI and returns true if the Node was successfully serialized. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LSSerializerImpl()
| Method Detail |
|---|
public void initializeSerializerProps()
public boolean canSetParameter(java.lang.String name,
java.lang.Object value)
canSetParameter in interface org.w3c.dom.DOMConfigurationname - A String containing the DOMConfiguration parameter name.value - An Object specifying the value of the corresponding parameter.DOMConfiguration.canSetParameter(java.lang.String, java.lang.Object)
public java.lang.Object getParameter(java.lang.String name)
throws org.w3c.dom.DOMException
getParameter in interface org.w3c.dom.DOMConfigurationname - A String containing the DOMConfiguration parameter name
whose value is to be returned.
org.w3c.dom.DOMExceptionDOMConfiguration.getParameter(java.lang.String)public org.w3c.dom.DOMStringList getParameterNames()
getParameterNames in interface org.w3c.dom.DOMConfigurationDOMConfiguration.getParameterNames()
public void setParameter(java.lang.String name,
java.lang.Object value)
throws org.w3c.dom.DOMException
setParameter in interface org.w3c.dom.DOMConfigurationname - A String containing the DOMConfiguration parameter name.value - An Object contaiing the parameters value to set.
org.w3c.dom.DOMExceptionDOMConfiguration.setParameter(java.lang.String, java.lang.Object)public org.w3c.dom.DOMConfiguration getDomConfig()
getDomConfig in interface org.w3c.dom.ls.LSSerializerLSSerializer.getDomConfig()public org.w3c.dom.ls.LSSerializerFilter getFilter()
getFilter in interface org.w3c.dom.ls.LSSerializerLSSerializer.getFilter()public java.lang.String getNewLine()
getNewLine in interface org.w3c.dom.ls.LSSerializerLSSerializer.getNewLine()public void setFilter(org.w3c.dom.ls.LSSerializerFilter filter)
setFilter in interface org.w3c.dom.ls.LSSerializerfilter - A LSSerializerFilter to be applied to the stream to serialize.LSSerializer.setFilter(org.w3c.dom.ls.LSSerializerFilter)public void setNewLine(java.lang.String newLine)
setNewLine in interface org.w3c.dom.ls.LSSerializernewLine - a String that is the end-of-line character sequence to be used in
serialization.LSSerializer.setNewLine(java.lang.String)
public boolean write(org.w3c.dom.Node nodeArg,
org.w3c.dom.ls.LSOutput destination)
throws org.w3c.dom.ls.LSException
write in interface org.w3c.dom.ls.LSSerializernodeArg - The Node to serialize.
org.w3c.dom.ls.LSException - SERIALIZE_ERR: Raised if the
LSSerializer was unable to serialize the node.LSSerializer.write(org.w3c.dom.Node, org.w3c.dom.ls.LSOutput)
public java.lang.String writeToString(org.w3c.dom.Node nodeArg)
throws org.w3c.dom.DOMException,
org.w3c.dom.ls.LSException
writeToString in interface org.w3c.dom.ls.LSSerializernodeArg - The Node to serialize.
org.w3c.dom.ls.LSException - SERIALIZE_ERR: Raised if the
LSSerializer was unable to serialize the node.
org.w3c.dom.DOMExceptionLSSerializer.writeToString(org.w3c.dom.Node)
public boolean writeToURI(org.w3c.dom.Node nodeArg,
java.lang.String uri)
throws org.w3c.dom.ls.LSException
writeToURI in interface org.w3c.dom.ls.LSSerializernodeArg - The Node to serialize.
org.w3c.dom.ls.LSException - SERIALIZE_ERR: Raised if the
LSSerializer was unable to serialize the node.LSSerializer.writeToURI(org.w3c.dom.Node, String)public org.w3c.dom.DOMErrorHandler getErrorHandler()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||