001: /*
002: * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package com.sun.xml.internal.xsom;
027:
028: import java.util.Iterator;
029: import java.util.Collection;
030:
031: /**
032: * Set of {@link XSSchema} objects.
033: *
034: * @author
035: * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
036: */
037: public interface XSSchemaSet {
038: XSSchema getSchema(String targetNamespace);
039:
040: XSSchema getSchema(int idx);
041:
042: int getSchemaSize();
043:
044: Iterator<XSSchema> iterateSchema();
045:
046: /**
047: * Gets all {@link XSSchema}s in a single collection.
048: */
049: Collection<XSSchema> getSchemas();
050:
051: XSType getType(String namespaceURI, String localName);
052:
053: XSSimpleType getSimpleType(String namespaceURI, String localName);
054:
055: XSAttributeDecl getAttributeDecl(String namespaceURI,
056: String localName);
057:
058: XSElementDecl getElementDecl(String namespaceURI, String localName);
059:
060: XSModelGroupDecl getModelGroupDecl(String namespaceURI,
061: String localName);
062:
063: XSAttGroupDecl getAttGroupDecl(String namespaceURI, String localName);
064:
065: XSComplexType getComplexType(String namespaceURI, String localName);
066:
067: XSIdentityConstraint getIdentityConstraint(String namespaceURI,
068: String localName);
069:
070: /** Iterates all element declarations in all the schemas. */
071: Iterator<XSElementDecl> iterateElementDecls();
072:
073: /** Iterates all type definitions in all the schemas. */
074: Iterator<XSType> iterateTypes();
075:
076: /** Iterates all atribute declarations in all the schemas. */
077: Iterator<XSAttributeDecl> iterateAttributeDecls();
078:
079: /** Iterates all attribute group declarations in all the schemas. */
080: Iterator<XSAttGroupDecl> iterateAttGroupDecls();
081:
082: /** Iterates all model group declarations in all the schemas. */
083: Iterator<XSModelGroupDecl> iterateModelGroupDecls();
084:
085: /** Iterates all simple type definitions in all the schemas. */
086: Iterator<XSSimpleType> iterateSimpleTypes();
087:
088: /** Iterates all complex type definitions in all the schemas. */
089: Iterator<XSComplexType> iterateComplexTypes();
090:
091: /** Iterates all notation declarations in all the schemas. */
092: Iterator<XSNotation> iterateNotations();
093:
094: /**
095: * Iterates all identity constraints in all the schemas.
096: */
097: Iterator<XSIdentityConstraint> iterateIdentityConstraints();
098:
099: // conceptually static methods
100: XSComplexType getAnyType();
101:
102: XSSimpleType getAnySimpleType();
103:
104: XSContentType getEmpty();
105:
106: }
|