org.apache.axis.encoding
Class TextSerializationContext
- SerializationContext
public class TextSerializationContext
For internal use only. Used to get the first text node of an element.
- Jarek Gawor (gawor@apache.org)
void | endElement() - Writes the end element tag for the open element.
|
void | serialize(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.
|
void | startElement(QName qName, 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(Element el) - Output a DOM representation to a SerializationContext
|
void | writeString(String string) - Convenience operation to write out (to Writer) the String
|
attributeQName2String , endElement , 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 , setDoMultiRefs , setEncoding , setItemQName , setItemType , setPretty , setSendDecl , setTypeAttribute , setWriteXMLType , shouldSendXSIType , startElement , writeChars , writeDOMElement , writeSafeString , writeString , writeXMLDeclaration |
TextSerializationContext
public TextSerializationContext(Writer writer)
Construct SerializationContext with associated writer
writer
- java.io.Writer
TextSerializationContext
public TextSerializationContext(Writer writer,
MessageContext msgContext)
Construct SerializationContext with associated writer and MessageContext
writer
- java.io.WritermsgContext
- is the MessageContext
endElement
public void endElement()
throws IOException
Writes the end element tag for the open element.
- endElement in interface SerializationContext
serialize
public void serialize(QName elemQName,
Attributes attributes,
Object value,
QName xmlType,
Boolean sendNull,
Boolean sendType)
throws IOException
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).
- serialize in interface SerializationContext
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.
startElement
public void startElement(QName qName,
Attributes attributes)
throws IOException
Writes (using the Writer) the start tag for element QName along with the
indicated attributes and namespace mappings.
- startElement in interface SerializationContext
qName
- is the name of the elementattributes
- are the attributes to write
writeChars
public void writeChars(char[] p1,
int p2,
int p3)
throws IOException
Convenience operation to write out (to Writer) the characters
in p1 starting at index p2 for length p3.
- writeChars in interface SerializationContext
p1
- character array to writep2
- starting index in arrayp3
- length to write
writeDOMElement
public void writeDOMElement(Element el)
throws IOException
Output a DOM representation to a SerializationContext
- writeDOMElement in interface SerializationContext
el
- is a DOM Element
writeString
public void writeString(String string)
throws IOException
Convenience operation to write out (to Writer) the String
- writeString in interface SerializationContext
string
- is the String to write.
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.