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 org.eclipse.xsd.XSDElementDeclaration;
19: import org.eclipse.xsd.XSDNamedComponent;
20: import org.eclipse.xsd.XSDSchemaContent;
21: import org.eclipse.xsd.XSDTypeDefinition;
22: import org.geotools.xml.AttributeInstance;
23: import org.geotools.xml.ElementInstance;
24:
25: public class ElementImpl extends InstanceComponentImpl implements
26: ElementInstance {
27: /** declaration **/
28: XSDElementDeclaration declaration;
29:
30: /** attributes **/
31: AttributeInstance[] atts;
32:
33: public ElementImpl(XSDElementDeclaration declaration) {
34: this .declaration = declaration;
35: }
36:
37: public XSDTypeDefinition getTypeDefinition() {
38: return declaration.getTypeDefinition();
39: }
40:
41: public XSDNamedComponent getDeclaration() {
42: return getElementDeclaration();
43: }
44:
45: public XSDElementDeclaration getElementDeclaration() {
46: return declaration;
47: }
48:
49: public AttributeInstance[] getAttributes() {
50: return atts;
51: }
52:
53: public void setAttributes(AttributeInstance[] atts) {
54: this.atts = atts;
55: }
56: }
|