KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xquark > schema > ModelGroupDefinition


1 /*
2  * This file belongs to the XQuark distribution.
3  * Copyright (C) 2003 Universite de Versailles Saint-Quentin.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307.
18  * You can also get it at http://www.gnu.org/licenses/lgpl.html
19  *
20  * For more information on this software, see http://www.xquark.org.
21  */

22
23 package org.xquark.schema;
24
25 /**
26  * class for Model Group Definition.
27  *
28  * <p>This is the implementation of the Model Group Definition.
29  * The following properties are defined:</p>
30  * <p> 1. name : optional, null or a NCName, defined in SchemaComponent.</p>
31  * <p> 2. target namespace : null or a namespace name, defined in SchemaComponent.</p>
32  * <p> 3. model group : a list of model group. </p>
33  *
34  * <p>See XML Schema Part 1: Structures 3.7
35  * W3C Recommendation 2 May 2001</p>
36  *
37  * @see org.xquark.xml.schema.SchemaComponent
38  * @see org.xquark.xml.schema.ModelGroup
39  */

40 public final class ModelGroupDefinition extends SchemaComponent
41 {
42 private static final String JavaDoc RCSRevision = "$Revision: 1.1 $";
43 private static final String JavaDoc RCSName = "$Name: $";
44   
45   private ModelGroup group = null;
46
47   /**
48    * Create a new ModelGroupDefinition.
49    *
50    * @param schema The schema which contains this model group declaration.
51    * @param name The model group name, a NCName.
52    */

53   public ModelGroupDefinition(Schema schema, String JavaDoc name) {
54     super(schema, name);
55   }
56
57   public void accept(SchemaVisitor visitor) throws SchemaException {
58     visitor.visit(this);
59   }
60
61   /**
62    * Look up the model group
63    *
64    * @return The Model Group.
65    * @see org.xquark.xml.schema.ModelGroup
66    */

67   public ModelGroup getModelGroup() {
68     return group;
69   }
70
71   public void setModelGroup(ModelGroup group) {
72     this.group = group;
73   }
74 }
75
Popular Tags