org.apache.ws.jaxme.impl

Class JMSAXDriverController

public class JMSAXDriverController extends Object

The controller is created by the org.apache.ws.jaxme.JMMarshaller for marshalling a given element.
Constructor Summary
JMSAXDriverController(JMMarshallerImpl pMarshaller, ContentHandler pTarget)
Creates a new instance with the given marshaller and target.
Method Summary
protected voidaddSchemaLocationAttributes(JMSAXDriver pDriver, AttributesImpl pAttrs)
StringgetAttrQName(JMSAXDriver pDriver, String pNamespaceURI, String pLocalName)
Returns the qualified name of the attribute pLocalName.
DatatypeConverterInterfacegetDatatypeConverter()
Returns the DatatypeConverterInterface being used for conversion of atomic values.
protected StringgetElementQName(JMSAXDriver pDriver, String pPrefix, String pNamespaceURI, String pLocalName)
StringgetElementQName(JMSAXDriver pDriver, String pNamespaceURI, String pLocalName)
Returns the qualified name of the element pLocalName in namespace pNamespaceURI.
JMMarshallerImplgetJMMarshaller()
Returns the Marshaller, which created the controller.
NamespaceSupportgetNamespaceContext()
Returns an instance of NamespaceSupport.
protected StringgetNewPrefix(String pURI, String pSuggestedPrefix)
protected StringgetPreferredPrefix(JMSAXDriver pDriver, String pURI)
ContentHandlergetTarget()
Returns the target handler, to which SAX events are being fired.
voidmarshal(JMSAXDriver pDriver, String pPrefix, String pNamespaceURI, String pLocalName, Object pElement)
Marshals the given object, creating a root element with the given namespace URI and local name.
voidmarshal(JMSAXDriver pDriver, String pNamespaceURI, String pLocalName, Object pElement)
Marshals the given object, creating an element with the given namespace URI and local name.
voidmarshalSimpleChild(JMSAXDriver pDriver, String pNamespaceURI, String pLocalName, String pValue)
Called by the driver for creating a simple child.
voidprintConversionEvent(Object pObject, String pMsg, Exception pException)

Constructor Detail

JMSAXDriverController

public JMSAXDriverController(JMMarshallerImpl pMarshaller, ContentHandler pTarget)
Creates a new instance with the given marshaller and target.

Method Detail

addSchemaLocationAttributes

protected void addSchemaLocationAttributes(JMSAXDriver pDriver, AttributesImpl pAttrs)

getAttrQName

public String getAttrQName(JMSAXDriver pDriver, String pNamespaceURI, String pLocalName)
Returns the qualified name of the attribute pLocalName. In other words, attachs a prefix, if required.

getDatatypeConverter

public DatatypeConverterInterface getDatatypeConverter()
Returns the DatatypeConverterInterface being used for conversion of atomic values.

getElementQName

protected String getElementQName(JMSAXDriver pDriver, String pPrefix, String pNamespaceURI, String pLocalName)

getElementQName

public String getElementQName(JMSAXDriver pDriver, String pNamespaceURI, String pLocalName)
Returns the qualified name of the element pLocalName in namespace pNamespaceURI. In other words, it attachs a prefix, if required.

getJMMarshaller

public JMMarshallerImpl getJMMarshaller()
Returns the Marshaller, which created the controller.

getNamespaceContext

public NamespaceSupport getNamespaceContext()
Returns an instance of NamespaceSupport.

getNewPrefix

protected String getNewPrefix(String pURI, String pSuggestedPrefix)

getPreferredPrefix

protected String getPreferredPrefix(JMSAXDriver pDriver, String pURI)

getTarget

public ContentHandler getTarget()
Returns the target handler, to which SAX events are being fired.

marshal

public void marshal(JMSAXDriver pDriver, String pPrefix, String pNamespaceURI, String pLocalName, Object pElement)
Marshals the given object, creating a root element with the given namespace URI and local name.

Parameters: pElement The element being marshalled. It must be an instance of the class associated to this specific JMXmlSerializer.

marshal

public void marshal(JMSAXDriver pDriver, String pNamespaceURI, String pLocalName, Object pElement)
Marshals the given object, creating an element with the given namespace URI and local name.

Parameters: pElement The element being marshalled. It must be an instance of the class associated to this specific JMXmlSerializer.

marshalSimpleChild

public void marshalSimpleChild(JMSAXDriver pDriver, String pNamespaceURI, String pLocalName, String pValue)
Called by the driver for creating a simple child.

printConversionEvent

public void printConversionEvent(Object pObject, String pMsg, Exception pException)