KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xerces > internal > dom > ASModelImpl


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  *
5  * Copyright (c) 2001, 2002 The Apache Software Foundation.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Apache Software Foundation (http://www.apache.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Xerces" and "Apache Software Foundation" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact apache@apache.org.
31  *
32  * 5. Products derived from this software may not be called "Apache",
33  * nor may "Apache" appear in their name, without prior written
34  * permission of the Apache Software Foundation.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This software consists of voluntary contributions made by many
51  * individuals on behalf of the Apache Software Foundation and was
52  * originally based on software copyright (c) 1999, International
53  * Business Machines, Inc., http://www.apache.org. For more
54  * information on the Apache Software Foundation, please see
55  * <http://www.apache.org/>.
56  */

57
58 package com.sun.org.apache.xerces.internal.dom;
59
60 import java.util.Vector JavaDoc;
61
62 import org.w3c.dom.DOMException JavaDoc;
63 import com.sun.org.apache.xerces.internal.dom3.as.*;
64 import com.sun.org.apache.xerces.internal.impl.xs.SchemaGrammar;
65
66 /**
67  * To begin with, an abstract schema is a generic structure that could
68  * contain both internal and external subsets. An <code>ASModel</code> is an
69  * abstract object that could map to a DTD , an XML Schema , a database
70  * schema, etc. An <code>ASModel</code> could represent either an internal
71  * or an external subset; hence an abstract schema could be composed of an
72  * <code>ASModel</code> representing the internal subset and an
73  * <code>ASModel</code> representing the external subset. Note that the
74  * <code>ASModel</code> representing the external subset could consult the
75  * <code>ASModel</code> representing the internal subset. Furthermore, the
76  * <code>ASModel</code> representing the internal subset could be set to
77  * null by the <code>setInternalAS</code> method as a mechanism for
78  * "removal". In addition, only one <code>ASModel</code> representing the
79  * external subset can be specified as "active" and it is possible that none
80  * are "active". Finally, the <code>ASModel</code> contains the factory
81  * methods needed to create a various types of ASObjects like
82  * <code>ASElementDeclaration</code>, <code>ASAttributeDeclaration</code>,
83  * etc.
84  * <p>See also the <a HREF='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>
85  * Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification</a>.
86  * @deprecated
87  * @author Pavani Mukthipudi
88  * @author Neil Graham
89  * @version $Id: ASModelImpl.java,v 1.5 2003/03/24 20:27:12 elena Exp $
90  */

91 public class ASModelImpl implements ASModel {
92
93     //
94
// Data
95
//
96
boolean fNamespaceAware = true;
97
98     // conceptually, an ASModel may contain grammar information and/or
99
// other ASModels. These two fields divide that function.
100
protected Vector JavaDoc fASModels;
101     protected SchemaGrammar fGrammar = null;
102     
103     //
104
// Constructors
105
//
106

107     public ASModelImpl() {
108         fASModels = new Vector JavaDoc();
109     }
110
111     public ASModelImpl(boolean isNamespaceAware) {
112         fASModels = new Vector JavaDoc();
113         fNamespaceAware = isNamespaceAware;
114     }
115     
116     //
117
// ASObject methods
118
//
119

120     /**
121      * A code representing the underlying object as defined above.
122      */

123     public short getAsNodeType() {
124         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
125         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
126     }
127
128     /**
129      * The <code>ASModel</code> object associated with this
130      * <code>ASObject</code>. For a node of type <code>AS_MODEL</code>, this
131      * is <code>null</code>.
132      */

133     public ASModel getOwnerASModel() {
134         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
135         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
136     }
137     
138     /**
139      * The <code>ASModel</code> object associated with this
140      * <code>ASObject</code>. For a node of type <code>AS_MODEL</code>, this
141      * is <code>null</code>.
142      */

143     public void setOwnerASModel(ASModel ownerASModel) {
144         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
145         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
146     }
147
148     /**
149      * The <code>name</code> of this <code>ASObject</code> depending on the
150      * <code>ASObject</code> type.
151      */

152     public String JavaDoc getNodeName() {
153         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
154         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
155     }
156     
157     /**
158      * The <code>name</code> of this <code>ASObject</code> depending on the
159      * <code>ASObject</code> type.
160      */

161     public void setNodeName(String JavaDoc nodeName) {
162         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
163         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
164     }
165
166     /**
167      * The namespace prefix of this node, or <code>null</code> if it is
168      * unspecified.
169      */

170     public String JavaDoc getPrefix() {
171         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
172         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
173     }
174     
175     /**
176      * The namespace prefix of this node, or <code>null</code> if it is
177      * unspecified.
178      */

179     public void setPrefix(String JavaDoc prefix) {
180         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
181         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
182     }
183
184     /**
185      * Returns the local part of the qualified name of this
186      * <code>ASObject</code>.
187      */

188     public String JavaDoc getLocalName() {
189         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
190         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
191     }
192     
193     /**
194      * Returns the local part of the qualified name of this
195      * <code>ASObject</code>.
196      */

197     public void setLocalName(String JavaDoc localName) {
198         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
199         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
200     }
201
202     /**
203      * The namespace URI of this node, or <code>null</code> if it is
204      * unspecified. defines how a namespace URI is attached to schema
205      * components.
206      */

207     public String JavaDoc getNamespaceURI() {
208         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
209         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
210     }
211     
212     /**
213      * The namespace URI of this node, or <code>null</code> if it is
214      * unspecified. defines how a namespace URI is attached to schema
215      * components.
216      */

217     public void setNamespaceURI(String JavaDoc namespaceURI) {
218         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
219         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
220     }
221
222     /**
223      * Creates a copy of this <code>ASObject</code>. See text for
224      * <code>cloneNode</code> off of <code>Node</code> but substitute AS
225      * functionality.
226      * @param deep Setting the <code>deep</code> flag on, causes the whole
227      * subtree to be duplicated. Setting it to <code>false</code> only
228      * duplicates its immediate child nodes.
229      * @return Cloned <code>ASObject</code>.
230      */

231     public ASObject cloneASObject(boolean deep) {
232         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
233         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
234     }
235     
236     //
237
// ASModel methods
238
//
239

240     /**
241      * <code>true</code> if this <code>ASModel</code> defines the document
242      * structure in terms of namespaces and local names ; <code>false</code>
243      * if the document structure is defined only in terms of
244      * <code>QNames</code>.
245      */

246     public boolean getIsNamespaceAware() {
247         return fNamespaceAware;
248     }
249
250     /**
251      * 0 if used internally, 1 if used externally, 2 if not all. An exception
252      * will be raised if it is incompatibly shared or in use as an internal
253      * subset.
254      */

255     public short getUsageLocation() {
256         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
257         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
258     }
259
260     /**
261      * The URI reference.
262      */

263     public String JavaDoc getAsLocation() {
264         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
265         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
266     }
267     
268     /**
269      * The URI reference.
270      */

271     public void setAsLocation(String JavaDoc asLocation) {
272         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
273         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
274     }
275
276     /**
277      * The hint to locating an ASModel.
278      */

279     public String JavaDoc getAsHint() {
280         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
281         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
282     }
283     
284     /**
285      * The hint to locating an ASModel.
286      */

287     public void setAsHint(String JavaDoc asHint) {
288         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
289         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
290     }
291     
292     /**
293      * If <code>usage</code> is EXTERNAL_SUBSET or NOT_USED, and the
294      * <code>ASModel</code> is simply a container of other ASModels.
295      */

296     public boolean getContainer() {
297         return (fGrammar != null);
298     }
299
300     /**
301      * Instead of returning an all-in-one <code>ASObject</code> with
302      * <code>ASModel</code> methods, have discernible top-level/"global"
303      * element declarations. If one attempts to add, set, or remove a node
304      * type other than the intended one, a hierarchy exception (or
305      * equivalent is thrown).
306      */

307     public ASNamedObjectMap getElementDeclarations() {
308         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
309         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
310     }
311
312     /**
313      * Instead of returning an all-in-one <code>ASObject</code> with
314      * <code>ASModel</code> methods, have discernible top-level/"global"
315      * attribute declarations. If one attempts to add, set, or remove a node
316      * type other than the intended one, a hierarchy exception (or
317      * equivalent is thrown).
318      */

319     public ASNamedObjectMap getAttributeDeclarations() {
320         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
321         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
322     }
323
324     /**
325      * Instead of returning an all-in-one <code>ASObject</code> with
326      * <code>ASModel</code> methods, have discernible top-level/"global"
327      * notation declarations. If one attempts to add, set, or remove a node
328      * type other than the intended one, a hierarchy exception (or
329      * equivalent is thrown).
330      */

331     public ASNamedObjectMap getNotationDeclarations() {
332         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
333         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
334     }
335
336     /**
337      * Instead of returning an all-in-one <code>ASObject</code> with
338      * <code>ASModel</code> methods, have discernible top-level/"global"
339      * entity declarations. If one attempts to add, set, or remove a node
340      * type other than the intended one, a hierarchy exception (or
341      * equivalent is thrown).
342      */

343     public ASNamedObjectMap getEntityDeclarations() {
344         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
345         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
346     }
347
348     /**
349      * Instead of returning an all-in-one <code>ASObject</code> with
350      * <code>ASModel</code> methods, have discernible top-level/"global
351      * content model declarations. If one attempts to add, set, or remove a
352      * node type other than the intended one, a hierarchy exception (or
353      * equivalent is thrown).
354      */

355     public ASNamedObjectMap getContentModelDeclarations() {
356         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
357         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
358     }
359
360     /**
361      * This method will allow the nesting or "importation" of ASModels.
362      * @param abstractSchema ASModel to be set. Subsequent calls will nest
363      * the ASModels within the specified <code>ownerASModel</code>.
364      */

365     public void addASModel(ASModel abstractSchema) {
366         fASModels.addElement(abstractSchema);
367     }
368
369     /**
370      * To retrieve a list of nested ASModels without reference to names.
371      * @return A list of ASModels.
372      */

373     public ASObjectList getASModels() {
374         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
375         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
376     }
377
378     /**
379      * Removes only the specified <code>ASModel</code> from the list of
380      * <code>ASModel</code>s.
381      * @param as AS to be removed.
382      */

383     public void removeAS(ASModel as) {
384         fASModels.removeElement(as);
385     }
386
387     /**
388      * Determines if an <code>ASModel</code> itself is valid, i.e., confirming
389      * that it's well-formed and valid per its own formal grammar.
390      * @return <code>true</code> if the <code>ASModel</code> is valid,
391      * <code>false</code> otherwise.
392      */

393     public boolean validate() {
394         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
395         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
396     }
397
398     /**
399      * Imports <code>ASObject</code> into ASModel.
400      * @param asobject <code>ASObject</code> to be imported.
401      */

402     public void importASObject(ASObject asobject) {
403         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
404         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
405     }
406
407     /**
408      * Inserts <code>ASObject</code> into ASModel.
409      * @param asobject <code>ASObject</code> to be inserted.
410      */

411     public void insertASObject(ASObject asobject) {
412         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
413         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
414     }
415     
416     /**
417      * Creates an element declaration for the element type specified.
418      * @param namespaceURI The <code>namespace URI</code> of the element type
419      * being declared.
420      * @param name The name of the element. The format of the name could be
421      * an NCName as defined by XML Namespaces or a Name as defined by XML
422      * 1.0; it's ASModel-dependent.
423      * @return A new <code>ASElementDeclaration</code> object with
424      * <code>name</code> attribute set to <code>tagname</code> and
425      * <code>namespaceURI</code> set to <code>systemId</code>. Other
426      * attributes of the element declaration are set through
427      * <code>ASElementDeclaration</code> interface methods.
428      * @exception DOMException
429      * INVALID_CHARACTER_ERR: Raised if the specified name contains an
430      * illegal character.
431      */

432     public ASElementDeclaration createASElementDeclaration(String JavaDoc namespaceURI,
433                                                            String JavaDoc name)
434                                                            throws DOMException JavaDoc {
435         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
436         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
437     }
438
439     /**
440      * Creates an attribute declaration.
441      * @param namespaceURI The namespace URI of the attribute being declared.
442      * @param name The name of the attribute. The format of the name could be
443      * an NCName as defined by XML Namespaces or a Name as defined by XML
444      * 1.0; it's ASModel-dependent.
445      * @return A new <code>ASAttributeDeclaration</code> object with
446      * appropriate attributes set by input parameters.
447      * @exception DOMException
448      * INVALID_CHARACTER_ERR: Raised if the input <code>name</code>
449      * parameter contains an illegal character.
450      */

451     public ASAttributeDeclaration createASAttributeDeclaration(String JavaDoc namespaceURI,
452                                                                String JavaDoc name)
453                                                                throws DOMException JavaDoc {
454         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
455         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
456     }
457
458     /**
459      * Creates a new notation declaration.
460      * @param namespaceURI The namespace URI of the notation being declared.
461      * @param name The name of the notation. The format of the name could be
462      * an NCName as defined by XML Namespaces or a Name as defined by XML
463      * 1.0; it's ASModel-dependent.
464      * @param systemId The system identifier for the notation declaration.
465      * @param publicId The public identifier for the notation declaration.
466      * @return A new <code>ASNotationDeclaration</code> object with
467      * <code>notationName</code> attribute set to <code>name</code> and
468      * <code>publicId</code> and <code>systemId</code> set to the
469      * corresponding fields.
470      * @exception DOMException
471      * INVALID_CHARACTER_ERR: Raised if the specified name contains an
472      * illegal character.
473      */

474     public ASNotationDeclaration createASNotationDeclaration(String JavaDoc namespaceURI, String JavaDoc name,
475                                                              String JavaDoc systemId, String JavaDoc publicId)
476                                                              throws DOMException JavaDoc {
477         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
478         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
479     }
480     
481     /**
482      * Creates an ASEntityDeclaration.
483      * @param name The name of the entity being declared.
484      * @return A new <code>ASEntityDeclaration</code> object with
485      * <code>entityName</code> attribute set to name.
486      * @exception DOMException
487      * INVALID_CHARACTER_ERR: Raised if the specified name contains an
488      * illegal character.
489      */

490     public ASEntityDeclaration createASEntityDeclaration(String JavaDoc name)
491                                                          throws DOMException JavaDoc {
492         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
493         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
494     }
495
496     /**
497      * Creates an object which describes part of an
498      * <code>ASElementDeclaration</code>'s content model.
499      * @param minOccurs The minimum occurrence for the subModels of this
500      * <code>ASContentModel</code>.
501      * @param maxOccurs The maximum occurrence for the subModels of this
502      * <code>ASContentModel</code>.
503      * @param operator operator of type <code>AS_CHOICE</code>,
504      * <code>AS_SEQUENCE</code>, <code>AS_ALL</code> or
505      * <code>AS_NONE</code>.
506      * @return A new <code>ASContentModel</code> object.
507      * @exception DOMASException
508      * A DOMASException, e.g., <code>minOccurs &gt; maxOccurs</code>.
509      */

510     public ASContentModel createASContentModel(int minOccurs, int maxOccurs,
511                                                short operator) throws DOMASException {
512         String JavaDoc msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
513         throw new DOMException JavaDoc(DOMException.NOT_SUPPORTED_ERR, msg);
514     }
515
516
517     // convenience methods
518
public SchemaGrammar getGrammar() {
519         return fGrammar;
520     }
521     public void setGrammar(SchemaGrammar grammar) {
522         fGrammar = grammar;
523     }
524
525     public Vector JavaDoc getInternalASModels() {
526         return fASModels;
527     }
528
529 }
530
Popular Tags