org.jboss.xml.binding
Class DelegatingObjectModelFactory

java.lang.Object
  extended byorg.jboss.xml.binding.DelegatingObjectModelFactory
All Implemented Interfaces:
GenericObjectModelFactory (src) , ObjectModelFactory (src)

public class DelegatingObjectModelFactory
extends java.lang.Object
implements GenericObjectModelFactory (src)

todo come up with a nicer class name


Constructor Summary
DelegatingObjectModelFactory(ObjectModelFactory (src)  typedFactory)
           
 
Method Summary
 void addChild(java.lang.Object parent, java.lang.Object child, ContentNavigator (src)  navigator, java.lang.String namespaceURI, java.lang.String localName)
           
 java.lang.Object completedRoot(java.lang.Object root, ContentNavigator (src)  navigator, java.lang.String namespaceURI, java.lang.String localName)
           
 java.lang.Object newChild(java.lang.Object parent, ContentNavigator (src)  navigator, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs)
           
 java.lang.Object newRoot(java.lang.Object root, ContentNavigator (src)  navigator, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs)
          This method is called by the object model factory and returns the root of the object graph.
 void setValue(java.lang.Object o, ContentNavigator (src)  navigator, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingObjectModelFactory

public DelegatingObjectModelFactory(ObjectModelFactory (src)  typedFactory)
Method Detail

newRoot

public java.lang.Object newRoot(java.lang.Object root,
                                ContentNavigator (src)  navigator,
                                java.lang.String namespaceURI,
                                java.lang.String localName,
                                org.xml.sax.Attributes attrs)
Description copied from interface: ObjectModelFactory (src)
This method is called by the object model factory and returns the root of the object graph. If the root argument is null the factory is supposed to create and return a new one. If the root argument is not null (i.e. the user provided the root object through the org.jboss.xml.binding.Unmarshaller) then the factory should either just return it as is or extract the real root from the root argument based on the namespace URI and local name.

Specified by:
newRoot in interface ObjectModelFactory (src)
Parameters:
root - an object that is the root or which contains the root object
navigator - content navigator
namespaceURI - namespace URI of the root
localName - local name of the root
attrs - attributes of the root object
Returns:
the root of the object graph

newChild

public java.lang.Object newChild(java.lang.Object parent,
                                 ContentNavigator (src)  navigator,
                                 java.lang.String namespaceURI,
                                 java.lang.String localName,
                                 org.xml.sax.Attributes attrs)
Specified by:
newChild in interface GenericObjectModelFactory (src)

addChild

public void addChild(java.lang.Object parent,
                     java.lang.Object child,
                     ContentNavigator (src)  navigator,
                     java.lang.String namespaceURI,
                     java.lang.String localName)
Specified by:
addChild in interface GenericObjectModelFactory (src)

setValue

public void setValue(java.lang.Object o,
                     ContentNavigator (src)  navigator,
                     java.lang.String namespaceURI,
                     java.lang.String localName,
                     java.lang.String value)
Specified by:
setValue in interface GenericObjectModelFactory (src)

completedRoot

public java.lang.Object completedRoot(java.lang.Object root,
                                      ContentNavigator (src)  navigator,
                                      java.lang.String namespaceURI,
                                      java.lang.String localName)
Specified by:
completedRoot in interface GenericObjectModelFactory (src)