Package org.apache.axis.encoding
Class TextSerializationContext
java.lang.Object
org.apache.axis.encoding.SerializationContext
org.apache.axis.encoding.TextSerializationContext
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionTextSerializationContext(Writer writer) TextSerializationContext(Writer writer, MessageContext msgContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidWrites the end element tag for the open element.voidserialize(QName elemQName, Attributes attributes, Object value, QName xmlType, Boolean sendNull, Boolean sendType) Serialize the indicated value as an element with the name indicated by elemQName.voidstartElement(QName qName, Attributes attributes) Writes (using the Writer) the start tag for element QName along with the indicated attributes and namespace mappings.voidwriteChars(char[] p1, int p2, int p3) Convenience operation to write out (to Writer) the characters in p1 starting at index p2 for length p3.voidOutput a DOM representation to a SerializationContextvoidwriteString(String string) Convenience operation to write out (to Writer) the StringMethods 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 Details
-
TextSerializationContext
-
TextSerializationContext
-
-
Method Details
-
serialize
public void serialize(QName elemQName, Attributes attributes, Object value, QName xmlType, Boolean sendNull, Boolean sendType) throws IOException Description copied from class:SerializationContextSerialize 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:
serializein 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:
IOException
-
writeDOMElement
Description copied from class:SerializationContextOutput a DOM representation to a SerializationContext- Overrides:
writeDOMElementin classSerializationContext- Parameters:
el- is a DOM Element- Throws:
IOException
-
startElement
Description copied from class:SerializationContextWrites (using the Writer) the start tag for element QName along with the indicated attributes and namespace mappings.- Overrides:
startElementin classSerializationContext- Parameters:
qName- is the name of the elementattributes- are the attributes to write- Throws:
IOException
-
endElement
Description copied from class:SerializationContextWrites the end element tag for the open element.- Overrides:
endElementin classSerializationContext- Throws:
IOException
-
writeChars
Description copied from class:SerializationContextConvenience operation to write out (to Writer) the characters in p1 starting at index p2 for length p3.- Overrides:
writeCharsin classSerializationContext- Parameters:
p1- character array to writep2- starting index in arrayp3- length to write- Throws:
IOException
-
writeString
Description copied from class:SerializationContextConvenience operation to write out (to Writer) the String- Overrides:
writeStringin classSerializationContext- Parameters:
string- is the String to write.- Throws:
IOException
-