01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2004-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.schema;
17:
18: /**
19: * <p>
20: * This interface is intended to represent a Choice in an XML Schema. The
21: * children of this choice are ElementGroupings which may involve Element
22: * declarations, Sequence, Groups ... or even another Choices. We recommend
23: * flattening child Choices with the parent, creating a semantically
24: * equivalent choice in it's place.
25: * </p>
26: *
27: * @author dzwiers www.refractions.net
28: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/xml/src/main/java/org/geotools/xml/schema/Choice.java $
29: */
30: public interface Choice extends ElementGrouping {
31: /**
32: * <p>
33: * The Schema ID for this choice definition.
34: * </p>
35: *
36: */
37: public String getId();
38:
39: /**
40: * @see org.geotools.xml.xsi.ElementGrouping#getMaxOccurs()
41: */
42: public int getMaxOccurs();
43:
44: /**
45: * @see org.geotools.xml.xsi.ElementGrouping#getMinOccurs()
46: */
47: public int getMinOccurs();
48:
49: /**
50: * <p>
51: * This method returns a list of children which repreensts the options for
52: * the element which this choice is representing in an XML Schema.
53: * Although the list is semantically a set, we encourage you to add
54: * elements to the list as they apear, to allow Schema writers to optimize
55: * the search order.
56: * </p>
57: *
58: */
59: public ElementGrouping[] getChildren();
60: }
|