|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.xml.binding.MappingObjectModelFactory
An ObjectModelFactory that uses mappings
Constructor Summary | |
MappingObjectModelFactory()
|
Method Summary | |
void |
addChild(Object parent,
Object child,
ContentNavigator navigator,
String namespaceURI,
String localName)
|
Object |
completedRoot(Object root,
ContentNavigator navigator,
String namespaceURI,
String localName)
|
void |
mapElementToClass(String element,
Class cls)
Map an element to a class |
void |
mapElementToField(String element,
Class cls,
String field,
TypeConverter converter)
Map an element to a field |
Object |
newChild(Object o,
ContentNavigator navigator,
String namespaceURI,
String localName,
Attributes attrs)
|
Object |
newRoot(Object root,
ContentNavigator navigator,
String namespaceURI,
String localName,
Attributes attrs)
This method is called by the object model factory and returns the root of the object graph. |
void |
setValue(Object o,
ContentNavigator navigator,
String namespaceURI,
String localName,
String value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MappingObjectModelFactory()
Method Detail |
public void mapElementToClass(String element, Class cls)
element
- the element namecls
- the classpublic void mapElementToField(String element, Class cls, String field, TypeConverter converter)
element
- the element namecls
- the classfield
- the field nameconverter
- the type convertorpublic Object newRoot(Object root, ContentNavigator navigator, String namespaceURI, String localName, Attributes attrs)
ObjectModelFactory
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.
newRoot
in interface ObjectModelFactory
root
- an object that is the root or which contains the root objectnavigator
- content navigatornamespaceURI
- namespace URI of the rootlocalName
- local name of the rootattrs
- attributes of the root object
public Object newChild(Object o, ContentNavigator navigator, String namespaceURI, String localName, Attributes attrs)
newChild
in interface GenericObjectModelFactory
public void addChild(Object parent, Object child, ContentNavigator navigator, String namespaceURI, String localName)
addChild
in interface GenericObjectModelFactory
public void setValue(Object o, ContentNavigator navigator, String namespaceURI, String localName, String value)
setValue
in interface GenericObjectModelFactory
public Object completedRoot(Object root, ContentNavigator navigator, String namespaceURI, String localName)
completedRoot
in interface GenericObjectModelFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |