001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.xerces.impl.dtd;
019:
020: import org.apache.xerces.xni.QName;
021: import org.apache.xerces.impl.dtd.models.ContentModelValidator;
022:
023: /**
024: * @xerces.internal
025: *
026: * @version $Id: XMLElementDecl.java 446755 2006-09-15 21:56:27Z mrglavas $
027: */
028: public class XMLElementDecl {
029:
030: //
031: // Constants
032: //
033:
034: /** TYPE_ANY */
035: public static final short TYPE_ANY = 0;
036:
037: /** TYPE_EMPTY */
038: public static final short TYPE_EMPTY = 1;
039:
040: /** TYPE_MIXED */
041: public static final short TYPE_MIXED = 2;
042:
043: /** TYPE_CHILDREN */
044: public static final short TYPE_CHILDREN = 3;
045:
046: /** TYPE_SIMPLE */
047: public static final short TYPE_SIMPLE = 4;
048:
049: //
050: // Data
051: //
052:
053: /** name */
054: public final QName name = new QName();
055:
056: /** scope */
057: public int scope = -1;
058:
059: /** type */
060: public short type = -1;
061:
062: /** contentModelValidator */
063: public ContentModelValidator contentModelValidator;
064:
065: /** simpleType */
066: public final XMLSimpleType simpleType = new XMLSimpleType();
067:
068: //
069: // Methods
070: //
071:
072: /**
073: * setValues
074: *
075: * @param name
076: * @param scope
077: * @param type
078: * @param contentModelValidator
079: * @param simpleType
080: */
081: public void setValues(QName name, int scope, short type,
082: ContentModelValidator contentModelValidator,
083: XMLSimpleType simpleType) {
084: this .name.setValues(name);
085: this .scope = scope;
086: this .type = type;
087: this .contentModelValidator = contentModelValidator;
088: this .simpleType.setValues(simpleType);
089: } // setValues
090:
091: /**
092: * clear
093: */
094: public void clear() {
095: this .name.clear();
096: this .type = -1;
097: this .scope = -1;
098: this .contentModelValidator = null;
099: this .simpleType.clear();
100: } // clear
101:
102: } // class XMLElementDecl
|