01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.xml.impl;
17:
18: import javax.xml.namespace.QName;
19:
20: import org.eclipse.xsd.XSDAttributeDeclaration;
21: import org.eclipse.xsd.XSDElementDeclaration;
22:
23: /**
24: * Factory used to create element handler objects during the processing of an
25: * instance document.
26: *
27: * @author Justin Deoliveira,Refractions Reserach Inc.,jdeolive@refractions.net
28: *
29: */
30: public interface HandlerFactory {
31: /**
32: * Creates a handler for the root element of a document.
33: */
34: DocumentHandler createDocumentHandler(ParserHandler parser);
35:
36: /**
37: * Creates an element hander for a global or top level element in a document.
38: *
39: * @param qName The qualified name identifying the element.
40: * @param parent The parent handler.
41: * @param parser The content handler driving the parser.
42: *
43: * @return A new element handler, or null if one could not be created.
44: */
45: ElementHandler createElementHandler(QName qName, Handler parent,
46: ParserHandler parser);
47:
48: /**
49: * Creates a handler for a particular element in a document.
50: *
51: * @param element The schema component which represents the declaration
52: * of the element.
53: * @param parent The parent handler.
54: * @param parser The content handler driving the parser.
55: *
56: * @return A new element handler, or null if one could not be created.
57: */
58: ElementHandler createElementHandler(XSDElementDeclaration element,
59: Handler parent, ParserHandler parser);
60:
61: /**
62: * Creates a handler for a particular element in a document.
63: *
64: * @param attribute The schema component which represents the declaration
65: * of the attribute.
66: * @param parent The parent handler.
67: * @param parser The content handler driving the parser.
68: *
69: * @return A new attribute handler, or null if one could not be created.
70: */
71: //AttributeHandler createAttributeHandler(XSDAttributeDeclaration attribute, Handler parent, ParserHandler parser );
72: }
|