Package org.apache.axis.encoding
Class TextSerializationContext
- java.lang.Object
-
- org.apache.axis.encoding.SerializationContext
-
- org.apache.axis.encoding.TextSerializationContext
-
- All Implemented Interfaces:
SerializationContext
public class TextSerializationContext extends SerializationContext
For internal use only. Used to get the first text node of an element.- Author:
- Jarek Gawor (gawor@apache.org)
-
-
Field Summary
-
Fields inherited from class org.apache.axis.encoding.SerializationContext
log, startOfDocument
-
-
Constructor Summary
Constructors Constructor Description TextSerializationContext(java.io.Writer writer)
TextSerializationContext(java.io.Writer writer, MessageContext msgContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endElement()
Writes the end element tag for the open element.void
serialize(QName elemQName, org.xml.sax.Attributes attributes, java.lang.Object value, QName xmlType, java.lang.Boolean sendNull, java.lang.Boolean sendType)
Serialize the indicated value as an element with the name indicated by elemQName.void
startElement(QName qName, org.xml.sax.Attributes attributes)
Writes (using the Writer) the start tag for element QName along with the indicated attributes and namespace mappings.void
writeChars(char[] p1, int p2, int p3)
Convenience operation to write out (to Writer) the characters in p1 starting at index p2 for length p3.void
writeDOMElement(org.w3c.dom.Element el)
Output a DOM representation to a SerializationContextvoid
writeString(java.lang.String string)
Convenience operation to write out (to Writer) the String-
Methods inherited from class org.apache.axis.encoding.SerializationContext
attributeQName2String, getCurrentMessage, getCurrentXMLType, getDoMultiRefs, getEncoder, getEncoding, getEncodingStyle, getItemQName, getItemType, getMessageContext, getPrefixForURI, getPrefixForURI, getPrefixForURI, getPretty, getQNameForClass, getSerializerForJavaType, getTypeMapping, getTypeMappingRegistry, getValueAsString, isEncoded, isPrimitive, outputMultiRefs, qName2String, qName2String, registerPrefixForURI, serialize, serialize, serialize, serialize, serialize, setDoMultiRefs, setEncoding, setItemQName, setItemType, setPretty, setSendDecl, setTypeAttribute, setWriteXMLType, shouldSendXSIType, writeSafeString, writeXMLDeclaration
-
-
-
-
Constructor Detail
-
TextSerializationContext
public TextSerializationContext(java.io.Writer writer)
-
TextSerializationContext
public TextSerializationContext(java.io.Writer writer, MessageContext msgContext)
-
-
Method Detail
-
serialize
public void serialize(QName elemQName, org.xml.sax.Attributes attributes, java.lang.Object value, QName xmlType, java.lang.Boolean sendNull, java.lang.Boolean sendType) throws java.io.IOException
Description copied from class:SerializationContext
Serialize the indicated value as an element with the name indicated by elemQName. The attributes are additional attribute to be serialized on the element. The value is the object being serialized. (It may be serialized directly or serialized as an mult-ref'd item) The value is an Object, which may be a wrapped primitive. The xmlType (if specified) is the QName of the type that is used to set xsi:type. The sendNull flag indicates whether to end an element with an xsi:nil="true" attribute for null variables (if Boolean.TRUE), or nothing (if Boolean.FALSE). The sendType flag indicates whether the xsi:type flag should be sent (default is true).- Overrides:
serialize
in classSerializationContext
- Parameters:
elemQName
- is the QName of the elementattributes
- are additional attributesvalue
- is the object to serializexmlType
- is the qname of the type or null.sendNull
- determines whether to send null values.sendType
- determines whether to set xsi:type attribute.- Throws:
java.io.IOException
-
writeDOMElement
public void writeDOMElement(org.w3c.dom.Element el) throws java.io.IOException
Description copied from class:SerializationContext
Output a DOM representation to a SerializationContext- Overrides:
writeDOMElement
in classSerializationContext
- Parameters:
el
- is a DOM Element- Throws:
java.io.IOException
-
startElement
public void startElement(QName qName, org.xml.sax.Attributes attributes) throws java.io.IOException
Description copied from class:SerializationContext
Writes (using the Writer) the start tag for element QName along with the indicated attributes and namespace mappings.- Overrides:
startElement
in classSerializationContext
- Parameters:
qName
- is the name of the elementattributes
- are the attributes to write- Throws:
java.io.IOException
-
endElement
public void endElement() throws java.io.IOException
Description copied from class:SerializationContext
Writes the end element tag for the open element.- Overrides:
endElement
in classSerializationContext
- Throws:
java.io.IOException
-
writeChars
public void writeChars(char[] p1, int p2, int p3) throws java.io.IOException
Description copied from class:SerializationContext
Convenience operation to write out (to Writer) the characters in p1 starting at index p2 for length p3.- Overrides:
writeChars
in classSerializationContext
- Parameters:
p1
- character array to writep2
- starting index in arrayp3
- length to write- Throws:
java.io.IOException
-
writeString
public void writeString(java.lang.String string) throws java.io.IOException
Description copied from class:SerializationContext
Convenience operation to write out (to Writer) the String- Overrides:
writeString
in classSerializationContext
- Parameters:
string
- is the String to write.- Throws:
java.io.IOException
-
-