View Javadoc
1   /*
2    * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
3    */
4   
5   /*
6    * Copyright 2005 The Apache Software Foundation.
7    *
8    * Licensed under the Apache License, Version 2.0 (the "License");
9    * 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  public class XMLElementDecl {
27  
28      /** TYPE_ANY */
29      public static final short TYPE_ANY = 0;
30  
31      /** TYPE_EMPTY */
32      public static final short TYPE_EMPTY = 1;
33  
34      /** TYPE_MIXED */
35      public static final short TYPE_MIXED = 2;
36  
37      /** TYPE_CHILDREN */
38      public static final short TYPE_CHILDREN = 3;
39  
40      /** TYPE_SIMPLE */
41      public static final short TYPE_SIMPLE = 4;
42  
43  
44      /** name */
45      public final QName name = new QName();
46  
47      /** scope */
48      public int scope = -1;
49  
50      /** type */
51      public short type = -1;
52  
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, XMLSimpleType simpleType) {
67          this.name.setValues(name);
68          this.scope                 = scope;
69          this.type                  = type;
70          this.simpleType.setValues(simpleType);
71      } // setValues
72  
73      /**
74       * clear
75       */
76      public void clear() {
77          this.name.clear();
78          this.type          = -1;
79          this.scope         = -1;
80          this.simpleType.clear();
81      } // clear
82  
83  } // class XMLElementDecl