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.impl;
17:
18: import java.net.URI;
19:
20: import org.geotools.xml.schema.Any;
21: import org.geotools.xml.schema.Element;
22: import org.geotools.xml.schema.ElementGrouping;
23:
24: /**
25: * <p>
26: * DOCUMENT ME!
27: * </p>
28: *
29: * @author dzwiers
30: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/xml/src/main/java/org/geotools/xml/schema/impl/AnyGT.java $
31: */
32: public class AnyGT implements Any {
33: private String id = null;
34: private int min = 1;
35: private int max = 1;
36: private URI ns = null;
37:
38: private AnyGT() {
39: // do nothing
40: }
41:
42: public AnyGT(URI namespace) {
43: ns = namespace;
44: }
45:
46: public AnyGT(URI namespace, int min, int max) {
47: ns = namespace;
48: this .min = min;
49: this .max = max;
50: }
51:
52: /**
53: * @see org.geotools.xml.schema.Any#getId()
54: */
55: public String getId() {
56: return id;
57: }
58:
59: /**
60: * @see org.geotools.xml.schema.ElementGrouping#getMaxOccurs()
61: */
62: public int getMaxOccurs() {
63: return max;
64: }
65:
66: /**
67: * @see org.geotools.xml.schema.ElementGrouping#getMinOccurs()
68: */
69: public int getMinOccurs() {
70: return min;
71: }
72:
73: /**
74: * @see org.geotools.xml.schema.Any#getNamespace()
75: */
76: public URI getNamespace() {
77: return ns;
78: }
79:
80: /**
81: * @see org.geotools.xml.schema.ElementGrouping#getGrouping()
82: */
83: public int getGrouping() {
84: return ElementGrouping.ANY;
85: }
86:
87: /**
88: * @see org.geotools.xml.schema.ElementGrouping#findChildElement(java.lang.String)
89: */
90: public Element findChildElement(String name) {
91: return null;
92: }
93:
94: public Element findChildElement(String localName, URI namespaceURI) {
95: return null;
96: }
97: }
|