01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.xerces.jaxp.validation;
19:
20: import org.apache.xerces.xni.grammars.XMLGrammarPool;
21:
22: /**
23: * <p>Implementation of Schema for W3C XML Schemas.</p>
24: *
25: * @author Michael Glavassevich, IBM
26: * @version $Id: XMLSchema.java 447235 2006-09-18 05:01:44Z mrglavas $
27: */
28: final class XMLSchema extends AbstractXMLSchema {
29:
30: /** The grammar pool is immutable */
31: private final XMLGrammarPool fGrammarPool;
32:
33: /** Whether to consider this schema to be fully composed */
34: private final boolean fFullyComposed;
35:
36: /** Constructors */
37: public XMLSchema(XMLGrammarPool grammarPool) {
38: this (grammarPool, true);
39: }
40:
41: public XMLSchema(XMLGrammarPool grammarPool, boolean fullyComposed) {
42: fGrammarPool = grammarPool;
43: fFullyComposed = fullyComposed;
44: }
45:
46: /*
47: * XSGrammarPoolContainer methods
48: */
49:
50: /**
51: * <p>Returns the grammar pool contained inside the container.</p>
52: *
53: * @return the grammar pool contained inside the container
54: */
55: public XMLGrammarPool getGrammarPool() {
56: return fGrammarPool;
57: }
58:
59: /**
60: * <p>Returns whether the schema components contained in this object
61: * can be considered to be a fully composed schema and should be
62: * used to exclusion of other schema components which may be
63: * present elsewhere.</p>
64: *
65: * @return whether the schema components contained in this object
66: * can be considered to be a fully composed schema
67: */
68: public boolean isFullyComposed() {
69: return fFullyComposed;
70: }
71:
72: } // XMLSchema
|