KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > impl > dtd > XMLElementDecl


1 /*
2  * Copyright 1999-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.impl.dtd;
18
19 import org.apache.xerces.xni.QName;
20 import org.apache.xerces.impl.dtd.models.ContentModelValidator;
21
22 /**
23  * @xerces.internal
24  *
25  * @version $Id: XMLElementDecl.java,v 1.5 2004/10/04 21:57:30 mrglavas Exp $
26  */

27 public class XMLElementDecl {
28
29     //
30
// Constants
31
//
32

33     /** TYPE_ANY */
34     public static final short TYPE_ANY = 0;
35
36     /** TYPE_EMPTY */
37     public static final short TYPE_EMPTY = 1;
38
39     /** TYPE_MIXED */
40     public static final short TYPE_MIXED = 2;
41
42     /** TYPE_CHILDREN */
43     public static final short TYPE_CHILDREN = 3;
44
45     /** TYPE_SIMPLE */
46     public static final short TYPE_SIMPLE = 4;
47
48     //
49
// Data
50
//
51

52     /** name */
53     public final QName name = new QName();
54
55     /** scope */
56     public int scope = -1;
57
58     /** type */
59     public short type = -1;
60
61     /** contentModelValidator */
62     public ContentModelValidator contentModelValidator;
63
64     /** simpleType */
65     public final XMLSimpleType simpleType = new XMLSimpleType();
66
67     //
68
// Methods
69
//
70

71     /**
72      * setValues
73      *
74      * @param name
75      * @param scope
76      * @param type
77      * @param contentModelValidator
78      * @param simpleType
79      */

80     public void setValues(QName name, int scope, short type, ContentModelValidator contentModelValidator, XMLSimpleType simpleType) {
81         this.name.setValues(name);
82         this.scope = scope;
83         this.type = type;
84         this.contentModelValidator = contentModelValidator;
85         this.simpleType.setValues(simpleType);
86     } // setValues
87

88     /**
89      * clear
90      */

91     public void clear() {
92         this.name.clear();
93         this.type = -1;
94         this.scope = -1;
95         this.contentModelValidator = null;
96         this.simpleType.clear();
97     } // clear
98

99 } // class XMLElementDecl
100
Popular Tags