KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > xml > binding > GenericObjectModelFactory


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.xml.binding;
8
9 import org.xml.sax.Attributes JavaDoc;
10
11 /**
12  * Direct implementations of ObjectModelFactory interface can be thought of as "typed" factories
13  * in a sense that arguments of newChild, addChild and setValue methods are supposed to be specific Java classes
14  * (other than java.lang.Object) from the target class hierarchy.
15  * In GenericObjectModelFactory arguments of newChild, addChild and setValue are all of type java.lang.Object.
16  * The framework won't introspect an implementation of the GenericObjectModelFactory for "typed" newChild, addChild and setValue.
17  * Instead it will call the generic methods and it's the responsibility of the implementation to recognize the types
18  * and build the object model.
19  *
20  * @author <a HREF="mailto:alex@jboss.org">Alexey Loubyansky</a>
21  * @version <tt>$Revision: 1.2.2.5 $</tt>
22  */

23 public interface GenericObjectModelFactory
24    extends ObjectModelFactory
25 {
26    Object JavaDoc newChild(Object JavaDoc parent,
27                    ContentNavigator navigator,
28                    String JavaDoc namespaceURI,
29                    String JavaDoc localName,
30                    Attributes JavaDoc attrs);
31
32    void addChild(Object JavaDoc parent,
33                  Object JavaDoc child,
34                  ContentNavigator navigator,
35                  String JavaDoc namespaceURI,
36                  String JavaDoc localName);
37
38    void setValue(Object JavaDoc o,
39                  ContentNavigator navigator,
40                  String JavaDoc namespaceURI,
41                  String JavaDoc localName,
42                  String JavaDoc value);
43
44    Object JavaDoc completedRoot(Object JavaDoc root, ContentNavigator navigator, String JavaDoc namespaceURI, String JavaDoc localName);
45 }
46
Popular Tags