|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcp.xml.dsig.internal.dom.XmlWriterToTree
public class XmlWriterToTree
Manifestation of XmlWriter interface designed to write to a tree.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.jcp.xml.dsig.internal.dom.XmlWriter |
---|
XmlWriter.ToMarshal<CLZ extends XMLStructure> |
Constructor Summary | |
---|---|
XmlWriterToTree(List<XmlWriter.ToMarshal<? extends XMLStructure>> marshallers,
Node parent)
|
|
XmlWriterToTree(List<XmlWriter.ToMarshal<? extends XMLStructure>> marshallers,
Node parent,
Node nextSibling)
In cases where the serialization is supposed to precede a specific element, we add an extra paramter to capture that. |
Method Summary | |
---|---|
Element |
getCreatedElement()
Get the root element created with this writer. |
String |
getCurrentLocalName()
Get the local name of the current element. |
XMLStructure |
getCurrentNodeAsStructure()
|
void |
marshalStructure(XMLStructure toMarshal,
String dsPrefix,
XMLCryptoContext context)
This method marshals a structure, and relies on implementation specific details for how an instance of a particular class maps to the method that actually does the marshaling. |
void |
resetToNewParent(Node newParent)
Reset to a new parent so that the writer can be re-used. |
Attr |
writeAttribute(String prefix,
String namespaceURI,
String localName,
String value)
|
void |
writeCharacters(String text)
|
void |
writeComment(String text)
|
void |
writeEndElement()
|
void |
writeIdAttribute(String prefix,
String namespaceURI,
String localName,
String value)
|
void |
writeNamespace(String prefix,
String namespaceURI)
|
void |
writeStartElement(String prefix,
String localName,
String namespaceURI)
|
void |
writeTextElement(String prefix,
String localName,
String namespaceURI,
String value)
Convenience method that writes both a start and end tag, with text contents as provided. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlWriterToTree(List<XmlWriter.ToMarshal<? extends XMLStructure>> marshallers, Node parent)
public XmlWriterToTree(List<XmlWriter.ToMarshal<? extends XMLStructure>> marshallers, Node parent, Node nextSibling)
model
- parent
- nextSibling
- The first element created will be created *before* this element.Method Detail |
---|
public void resetToNewParent(Node newParent)
newParent
- public Element getCreatedElement()
public void writeStartElement(String prefix, String localName, String namespaceURI)
writeStartElement
in interface XmlWriter
prefix
- What prefix to use?localName
- What local name to use?namespaceURI
- What namespace URI?XMLStreamWriter#writeStartElement(String, String, String)}
public void writeEndElement()
writeEndElement
in interface XmlWriter
XMLStreamWriter#writeEndElement()}
public void writeTextElement(String prefix, String localName, String namespaceURI, String value)
XmlWriter
writeTextElement
in interface XmlWriter
public void writeNamespace(String prefix, String namespaceURI)
writeNamespace
in interface XmlWriter
public void writeCharacters(String text)
writeCharacters
in interface XmlWriter
public void writeComment(String text)
writeComment
in interface XmlWriter
public Attr writeAttribute(String prefix, String namespaceURI, String localName, String value)
writeAttribute
in interface XmlWriter
public void writeIdAttribute(String prefix, String namespaceURI, String localName, String value)
writeIdAttribute
in interface XmlWriter
public String getCurrentLocalName()
XmlWriter
getCurrentLocalName
in interface XmlWriter
public XMLStructure getCurrentNodeAsStructure()
getCurrentNodeAsStructure
in interface XmlWriter
public void marshalStructure(XMLStructure toMarshal, String dsPrefix, XMLCryptoContext context) throws MarshalException
XmlWriter
marshalStructure
in interface XmlWriter
toMarshal
- The object to be marshaled.dsPrefix
- The digital signature prefix.context
- The context for marshaling.
MarshalException
- Thrown if something goes wrong during the marshaling.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |