站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 jaxrpc API Documentation 英文版文档

DeserializationContext (JAXRPC API) - JBoss 3.2.7 jaxrpc API Documentation 英文版文档


org.apache.axis.encoding
Interface DeserializationContext

All Superinterfaces:
javax.xml.rpc.encoding.DeserializationContext
All Known Implementing Classes:
DeserializationContextImpl

public interface DeserializationContext
extends javax.xml.rpc.encoding.DeserializationContext

This interface describes the AXIS DeserializationContext, note that an AXIS compliant DeserializationContext must extend the org.xml.sax.helpers.DefaultHandler.


Method Summary
 void addObjectById(String _id, Object obj)
          Add the object associated with this id (where id is the value of an id= attribute, i.e.
 SOAPElementAxisImpl getCurElement()
          Get current MessageElement
 ArrayList getCurrentNSMappings()
          Get the Namespace Mappings.
 int getCurrentRecordPos()
          Get the current position in the record.
 Deserializer getDeserializer(Class cls, javax.xml.namespace.QName xmlType)
          Get a Deserializer which can turn a given xml type into a given Java type
 Deserializer getDeserializerForClass(Class cls)
          Convenience method to get the Deserializer for a specific java class from its meta data.
 Deserializer getDeserializerForType(javax.xml.namespace.QName xmlType)
          Convenience method to get the Deserializer for a specific xmlType.
 SOAPElementAxisImpl getElementByID(String id)
          Get the MessageElement for the indicated id (where id is the #value of an href) If the MessageElement has not been processed, the MessageElement will be returned.
 SOAPEnvelopeAxisImpl getEnvelope()
          Get Envelope
 MessageContext getMessageContext()
          Get MessageContext
 String getNamespaceURI(String prefix)
          Get the Namespace for a particular prefix
 Object getObjectByRef(String href)
          Gets the MessageElement or actual Object value associated with the href value.
 javax.xml.namespace.QName getQNameFromString(String qNameStr)
          Construct a QName from a string of the form :
 SAX2EventRecorder getRecorder()
          Get Event Recorder
 int getStartOfMappingsPos()
          Get the start of the mapping position
 javax.xml.namespace.QName getTypeFromAttributes(String namespace, String localName, Attributes attrs)
          Create a QName for the type of the element defined by localName and namespace with the specified attributes.
 javax.xml.namespace.QName getTypeFromXSITypeAttr(String namespace, String localName, Attributes attrs)
          Create a QName for the type of the element defined by localName and namespace from the XSI type.
 TypeMapping getTypeMapping()
          Get the TypeMapping for this DeserializationContext
 TypeMappingRegistry getTypeMappingRegistry()
          Get the TypeMappingRegistry we're using.
 boolean isDoneParsing()
          Return if done parsing document.
 boolean isNil(Attributes attrs)
          Convenenience method that returns true if the value is nil (due to the xsi:nil) attribute.
 boolean isProcessingRef()
          Are we in the midst of processing an href target? If so, we shouldn't be pushing the element stack...
 void parse()
          Create a parser and parse the inputSource
 SOAPHandler popElementHandler()
           
 void pushElementHandler(SOAPHandler handler)
          Handler management methods
 void pushNewElement(SOAPElementAxisImpl elem)
          Push the MessageElement into the recorder
 void registerElementByID(String id, SOAPElementAxisImpl elem)
          Register the MessageElement with this id (where id is id= form without the #) This routine is called when the MessageElement with an id is read.
 void registerFixup(String href, Deserializer dser)
          During deserialization, an element with an href=#id may be encountered before the element defining id=id is read.
 void registerResolverForID(String id, IDResolver resolver)
          Each id can have its own kind of resolver.
 void replaceElementHandler(SOAPHandler handler)
           
 void setCurElement(SOAPElementAxisImpl el)
          Set current MessageElement
 void setProcessingRef(boolean ref)
          Indicate if we're in the midst of processing an href target, in which case we shouldn't be pushing the element stack.
 void setRecorder(SAX2EventRecorder recorder)
          Set Event Recorder
 

Method Detail

parse

public void parse()
           throws SAXException
Create a parser and parse the inputSource

Throws:
SAXException

getCurElement

public SOAPElementAxisImpl getCurElement()
Get current MessageElement


setCurElement

public void setCurElement(SOAPElementAxisImpl el)
Set current MessageElement


getMessageContext

public MessageContext getMessageContext()
Get MessageContext


getEnvelope

public SOAPEnvelopeAxisImpl getEnvelope()
Get Envelope


getRecorder

public SAX2EventRecorder getRecorder()
Get Event Recorder


setRecorder

public void setRecorder(SAX2EventRecorder recorder)
Set Event Recorder


getCurrentNSMappings

public ArrayList getCurrentNSMappings()
Get the Namespace Mappings. Returns null if none are present.


getNamespaceURI

public String getNamespaceURI(String prefix)
Get the Namespace for a particular prefix


getQNameFromString

public javax.xml.namespace.QName getQNameFromString(String qNameStr)
Construct a QName from a string of the form :

Parameters:
qNameStr - is the prefixed name from the xml text
Returns:
QName

getTypeFromXSITypeAttr

public javax.xml.namespace.QName getTypeFromXSITypeAttr(String namespace,
                                                        String localName,
                                                        Attributes attrs)
Create a QName for the type of the element defined by localName and namespace from the XSI type.

Parameters:
namespace - of the element
localName - is the local name of the element
attrs - are the attributes on the element

getTypeFromAttributes

public javax.xml.namespace.QName getTypeFromAttributes(String namespace,
                                                       String localName,
                                                       Attributes attrs)
Create a QName for the type of the element defined by localName and namespace with the specified attributes.

Parameters:
namespace - of the element
localName - is the local name of the element
attrs - are the attributes on the element

isNil

public boolean isNil(Attributes attrs)
Convenenience method that returns true if the value is nil (due to the xsi:nil) attribute.

Parameters:
attrs - are the element attributes.
Returns:
true if xsi:nil is true

getDeserializer

public Deserializer getDeserializer(Class cls,
                                    javax.xml.namespace.QName xmlType)
Get a Deserializer which can turn a given xml type into a given Java type


getDeserializerForType

public Deserializer getDeserializerForType(javax.xml.namespace.QName xmlType)
Convenience method to get the Deserializer for a specific xmlType.

Parameters:
xmlType - is QName for a type to deserialize
Returns:
Deserializer

getDeserializerForClass

public Deserializer getDeserializerForClass(Class cls)
Convenience method to get the Deserializer for a specific java class from its meta data.

Parameters:
cls - is the Class used to find the deserializer
Returns:
Deserializer

getTypeMapping

public TypeMapping getTypeMapping()
Get the TypeMapping for this DeserializationContext


getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()
Get the TypeMappingRegistry we're using.

Returns:
TypeMapping or null

getElementByID

public SOAPElementAxisImpl getElementByID(String id)
Get the MessageElement for the indicated id (where id is the #value of an href) If the MessageElement has not been processed, the MessageElement will be returned. If the MessageElement has been processed, the actual object value is stored with the id and this routine will return null.

Parameters:
id - is the value of an href attribute
Returns:
MessageElement or null

getObjectByRef

public Object getObjectByRef(String href)
Gets the MessageElement or actual Object value associated with the href value. The return of a MessageElement indicates that the referenced element has not been processed. If it is not a MessageElement, the Object is the actual deserialized value. In addition, this method is invoked to get Object values via Attachments.

Returns:
MessageElement other Object or null

addObjectById

public void addObjectById(String _id,
                          Object obj)
Add the object associated with this id (where id is the value of an id= attribute, i.e. it does not start with #). This routine is called to associate the deserialized object with the id specified on the XML element.

Parameters:
obj - is the deserialized object for this id.

registerFixup

public void registerFixup(String href,
                          Deserializer dser)
During deserialization, an element with an href=#id may be encountered before the element defining id=id is read. In these cases, the getObjectByRef method above will return null. The deserializer is placed in a table keyed by href (a fixup table). After the element id is processed, the deserializer is informed of the value so that it can update its target(s) with the value.

Parameters:
href - (#id syntax)
dser - is the deserializer of the element

registerElementByID

public void registerElementByID(String id,
                                SOAPElementAxisImpl elem)
Register the MessageElement with this id (where id is id= form without the #) This routine is called when the MessageElement with an id is read. If there is a Deserializer in our fixup list (described above), the 'fixup' deserializer is given to the MessageElement. When the MessageElement is completed, the 'fixup' deserializer is informed and it can set its targets.

Parameters:
id - (id name without the #)
elem - is the MessageElement

registerResolverForID

public void registerResolverForID(String id,
                                  IDResolver resolver)
Each id can have its own kind of resolver. This registers a resolver for the id.


getCurrentRecordPos

public int getCurrentRecordPos()
Get the current position in the record.


getStartOfMappingsPos

public int getStartOfMappingsPos()
Get the start of the mapping position


pushNewElement

public void pushNewElement(SOAPElementAxisImpl elem)
Push the MessageElement into the recorder


pushElementHandler

public void pushElementHandler(SOAPHandler handler)
Handler management methods


replaceElementHandler

public void replaceElementHandler(SOAPHandler handler)

popElementHandler

public SOAPHandler popElementHandler()

isDoneParsing

public boolean isDoneParsing()
Return if done parsing document.


setProcessingRef

public void setProcessingRef(boolean ref)
Indicate if we're in the midst of processing an href target, in which case we shouldn't be pushing the element stack.

Parameters:
ref -

isProcessingRef

public boolean isProcessingRef()
Are we in the midst of processing an href target? If so, we shouldn't be pushing the element stack...

Returns:


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.