1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Licensed to the Apache Software Foundation (ASF) under one or more 7 * contributor license agreements. See the NOTICE file distributed with 8 * this work for additional information regarding copyright ownership. 9 * The ASF licenses this file to You under the Apache License, Version 2.0 10 * (the "License"); you may not use this file except in compliance with 11 * the License. You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22 package com.sun.org.apache.xerces.internal.impl.dtd; 23 24 import com.sun.org.apache.xerces.internal.xni.QName; 25 import com.sun.org.apache.xerces.internal.impl.dtd.models.ContentModelValidator; 26 27 /** 28 */ 29 public class XMLElementDecl { 30 31 // 32 // Constants 33 // 34 35 /** TYPE_ANY */ 36 public static final short TYPE_ANY = 0; 37 38 /** TYPE_EMPTY */ 39 public static final short TYPE_EMPTY = 1; 40 41 /** TYPE_MIXED */ 42 public static final short TYPE_MIXED = 2; 43 44 /** TYPE_CHILDREN */ 45 public static final short TYPE_CHILDREN = 3; 46 47 /** TYPE_SIMPLE */ 48 public static final short TYPE_SIMPLE = 4; 49 50 // 51 // Data 52 // 53 54 /** name */ 55 public final QName name = new QName(); 56 57 /** scope */ 58 public int scope = -1; 59 60 /** type */ 61 public short type = -1; 62 63 /** contentModelValidator */ 64 public ContentModelValidator contentModelValidator; 65 66 /** simpleType */ 67 public final XMLSimpleType simpleType = new XMLSimpleType(); 68 69 // 70 // Methods 71 // 72 73 /** 74 * setValues 75 * 76 * @param name 77 * @param scope 78 * @param type 79 * @param contentModelValidator 80 * @param simpleType 81 */ 82 public void setValues(QName name, int scope, short type, ContentModelValidator contentModelValidator, XMLSimpleType simpleType) { 83 this.name.setValues(name); 84 this.scope = scope; 85 this.type = type; 86 this.contentModelValidator = contentModelValidator; 87 this.simpleType.setValues(simpleType); 88 } // setValues 89 90 /** 91 * clear 92 */ 93 public void clear() { 94 this.name.clear(); 95 this.type = -1; 96 this.scope = -1; 97 this.contentModelValidator = null; 98 this.simpleType.clear(); 99 } // clear 100 101 } // class XMLElementDecl