|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SerializationContext
This interface describes the AXIS SerializationContext.
| Method Summary | |
|---|---|
String |
attributeQName2String(javax.xml.namespace.QName qName)
Convert attribute QName to a string of the form |
void |
endDocument()
Output anything in the end. |
void |
endElement()
Writes the end element tag for the open element. |
Message |
getCurrentMessage()
Get the current message. |
javax.xml.namespace.QName |
getCurrentXMLType()
Get the currently prefered xmlType `* @return QName of xmlType or null |
boolean |
getDoMultiRefs()
Are we doing multirefs? |
Stack |
getElementStack()
Get the stack of element qnames. |
MessageContext |
getMessageContext()
Get the MessageContext we're operating with |
String |
getPrefixForURI(String uri)
Get a prefix for a namespace URI. |
String |
getPrefixForURI(String uri,
String defaultPrefix)
Get a prefix for a namespace URI. |
boolean |
getPretty()
Get whether the serialization should be pretty printed. |
javax.xml.namespace.QName |
getQNameForClass(Class cls)
Get the QName associated with the specified class. |
Serializer |
getSerializerForJavaType(Class javaType)
Convenience method to get the Serializer for a specific java type |
TypeMapping |
getTypeMapping()
Get the TypeMapping we're using. |
TypeMappingRegistry |
getTypeMappingRegistry()
Get the TypeMappingRegistry we're using. |
String |
getValueAsString(Object value,
javax.xml.namespace.QName xmlType)
|
boolean |
isNoDefaultNamespace()
Get whether or not to write the default namespace. |
boolean |
isPrimitive(Object value)
Indicates whether the object should be interpretted as a primitive for the purposes of multi-ref processing. |
void |
outputMultiRefs()
The serialize method uses hrefs to reference all non-primitive values. |
String |
qName2String(javax.xml.namespace.QName qName)
Convert QName to a string of the form |
void |
registerPrefixForURI(String prefix,
String uri)
Register prefix for the indicated uri |
void |
serialize(javax.xml.namespace.QName elemQName,
Attributes attributes,
Object value)
Serialize the indicated value as an element with the name indicated by elemQName. |
void |
serialize(javax.xml.namespace.QName elemQName,
Attributes attributes,
Object value,
javax.xml.namespace.QName xmlType,
boolean sendNull,
Boolean sendType)
Serialize the indicated value as an element with the name indicated by elemQName. |
void |
setDoMultiRefs(boolean shouldDo)
Set whether we are doing multirefs. |
void |
setNoDefaultNamespace(boolean noDefaultNamespace)
Set whether or not to write the default namespace. |
void |
setPretty(boolean pretty)
Indicate whether the serialization should be pretty printed. |
void |
setSendDecl(boolean sendDecl)
Set whether or not we should write XML declarations. |
Attributes |
setTypeAttribute(Attributes attributes,
javax.xml.namespace.QName type)
Obtains the type attribute that should be serialized and returns the new list of Attributes |
boolean |
shouldSendXSIType()
Get whether or not to write xsi:type attributes. |
void |
startDocument()
Output anything in the beginning. |
void |
startElement(javax.xml.namespace.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 |
writeSafeString(String string)
Convenience operation to write out (to Writer) the String properly encoded with xml entities (like &) |
void |
writeString(String string)
Convenience operation to write out (to Writer) the String |
| Method Detail |
|---|
void serialize(javax.xml.namespace.QName elemQName,
Attributes attributes,
Object value)
throws IOException
elemQName - is the QName of the elementattributes - are additional attributesvalue - is the object to serialize
IOException
void serialize(javax.xml.namespace.QName elemQName,
Attributes attributes,
Object value,
javax.xml.namespace.QName xmlType,
boolean sendNull,
Boolean sendType)
throws IOException
elemQName - is the QName of the elementattributes - are additional attributesvalue - is the object to serializexmlType - is the qname of the type or null. (default is null)sendNull - determines whether to send null values. (default is true)sendType - determines whether to set xsi:type attribute. (default is true)
IOException
Attributes setTypeAttribute(Attributes attributes,
javax.xml.namespace.QName type)
attributes - of the qnametype - is the qname of the type
Serializer getSerializerForJavaType(Class javaType)
javaType - is Class for a type to serialize
boolean getPretty()
void setPretty(boolean pretty)
pretty - true/falseboolean getDoMultiRefs()
void setDoMultiRefs(boolean shouldDo)
shouldDo - true/falsevoid setSendDecl(boolean sendDecl)
sendDecl - true/falseboolean shouldSendXSIType()
TypeMapping getTypeMapping()
TypeMappingRegistry getTypeMappingRegistry()
String getPrefixForURI(String uri)
uri - is the namespace uri
String getPrefixForURI(String uri,
String defaultPrefix)
uri - is the namespace uridefaultPrefix - optional parameter which is the default prefix
void registerPrefixForURI(String prefix,
String uri)
prefix - uri - is the namespace uriMessage getCurrentMessage()
MessageContext getMessageContext()
String qName2String(javax.xml.namespace.QName qName)
qName -
String attributeQName2String(javax.xml.namespace.QName qName)
qName -
javax.xml.namespace.QName getQNameForClass(Class cls)
cls - Class of an object requiring serialization.
boolean isPrimitive(Object value)
value - to be serialized
void outputMultiRefs()
throws IOException
IOException
void startDocument()
throws IOException
IOException
void endDocument()
throws IOException
IOException
void startElement(javax.xml.namespace.QName qName,
Attributes attributes)
throws IOException
qName - is the name of the elementattributes - are the attributes to write
IOException
void endElement()
throws IOException
IOException
void writeChars(char[] p1,
int p2,
int p3)
throws IOException
p1 - character array to writep2 - starting index in arrayp3 - length to write
IOException
void writeString(String string)
throws IOException
string - is the String to write.
IOException
void writeSafeString(String string)
throws IOException
string - is the String to write.
IOException
void writeDOMElement(Element el)
throws IOException
el - is a DOM Element
IOException
String getValueAsString(Object value,
javax.xml.namespace.QName xmlType)
throws IOException
IOExceptionStack getElementStack()
javax.xml.namespace.QName getCurrentXMLType()
boolean isNoDefaultNamespace()
void setNoDefaultNamespace(boolean noDefaultNamespace)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||