001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2004-2006, GeoTools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: */
016: package org.geotools.xml.schema;
017:
018: import java.net.URI;
019:
020: /**
021: * <p>
022: * Instances of this interface are intended to represent XML Schema Elements.
023: * </p>
024: *
025: * @author dzwiers www.refractions.net
026: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/xml/src/main/java/org/geotools/xml/schema/Element.java $
027: */
028: public interface Element extends ElementGrouping {
029: /**
030: * <p>
031: * Returns True when the instance of this XML Schema Element is abstract,
032: * false otherwise
033: * </p>
034: *
035: */
036: public boolean isAbstract();
037:
038: /**
039: * @see Schema#getBlockDefault()
040: */
041: public int getBlock();
042:
043: /**
044: * <p>
045: * This returns the default value for the Element as a String
046: * </p>
047: *
048: */
049: public String getDefault();
050:
051: /**
052: * @see Schema#getFinalDefault()
053: */
054: public int getFinal();
055:
056: /**
057: * <p>
058: * This returns the fixed value for the Element as a String
059: * </p>
060: *
061: */
062: public String getFixed();
063:
064: /**
065: * @see Schema#isElementFormDefault()
066: */
067: public boolean isForm();
068:
069: /**
070: * <p>
071: * The Schema ID for this element definition.
072: * </p>
073: *
074: */
075: public String getId();
076:
077: /**
078: * @see org.geotools.xml.xsi.ElementGrouping#getMaxOccurs()
079: */
080: public int getMaxOccurs();
081:
082: /**
083: * @see org.geotools.xml.xsi.ElementGrouping#getMinOccurs()
084: */
085: public int getMinOccurs();
086:
087: /**
088: * <p>
089: * Returns the element declaration's name in the Schema document, and
090: * element name in the instance document.
091: * </p>
092: *
093: */
094: public String getName();
095:
096: /**
097: * DOCUMENT ME!
098: *
099: */
100: public URI getNamespace();
101:
102: /**
103: * <p>
104: * Returns true when the element is nillable, false otherwise
105: * </p>
106: *
107: */
108: public boolean isNillable();
109:
110: /**
111: * <p>
112: * This returns a reference to an element representing this element's
113: * substitution group. This is of particular importance when resolving an
114: * instance document's value.
115: * </p>
116: *
117: */
118: public Element getSubstitutionGroup();
119:
120: /**
121: * <p>
122: * Returns the declared type for this Element in the given Schema.
123: * </p>
124: *
125: *
126: * @see Type
127: */
128: public Type getType(); // simpleType or complexType
129: }
|