01: /*
02: * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
03: */
04:
05: /*
06: * Copyright 2005 The Apache Software Foundation.
07: *
08: * Licensed under the Apache License, Version 2.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: */
20:
21: package com.sun.xml.internal.stream.dtd.nonvalidating;
22:
23: import com.sun.org.apache.xerces.internal.xni.QName;
24:
25: /**
26: * @version $Id: XMLElementDecl.java,v 1.3 2005/11/03 17:16:39 jeffsuttor Exp $
27: */
28: public class XMLElementDecl {
29:
30: /** TYPE_ANY */
31: public static final short TYPE_ANY = 0;
32:
33: /** TYPE_EMPTY */
34: public static final short TYPE_EMPTY = 1;
35:
36: /** TYPE_MIXED */
37: public static final short TYPE_MIXED = 2;
38:
39: /** TYPE_CHILDREN */
40: public static final short TYPE_CHILDREN = 3;
41:
42: /** TYPE_SIMPLE */
43: public static final short TYPE_SIMPLE = 4;
44:
45: /** name */
46: public final QName name = new QName();
47:
48: /** scope */
49: public int scope = -1;
50:
51: /** type */
52: public short type = -1;
53:
54: /** simpleType */
55: public final XMLSimpleType simpleType = new XMLSimpleType();
56:
57: /**
58: * setValues
59: *
60: * @param name
61: * @param scope
62: * @param type
63: * @param contentModelValidator
64: * @param simpleType
65: */
66: public void setValues(QName name, int scope, short type,
67: XMLSimpleType simpleType) {
68: this .name.setValues(name);
69: this .scope = scope;
70: this .type = type;
71: this .simpleType.setValues(simpleType);
72: } // setValues
73:
74: /**
75: * clear
76: */
77: public void clear() {
78: this .name.clear();
79: this .type = -1;
80: this .scope = -1;
81: this .simpleType.clear();
82: } // clear
83:
84: } // class XMLElementDecl
|