1 /* 2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 */ 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.xml.internal.stream.dtd.nonvalidating; 23 24 import com.sun.org.apache.xerces.internal.xni.QName; 25 /** 26 */ 27 public class XMLElementDecl { 28 29 /** TYPE_ANY */ 30 public static final short TYPE_ANY = 0; 31 32 /** TYPE_EMPTY */ 33 public static final short TYPE_EMPTY = 1; 34 35 /** TYPE_MIXED */ 36 public static final short TYPE_MIXED = 2; 37 38 /** TYPE_CHILDREN */ 39 public static final short TYPE_CHILDREN = 3; 40 41 /** TYPE_SIMPLE */ 42 public static final short TYPE_SIMPLE = 4; 43 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 55 /** simpleType */ 56 public final XMLSimpleType simpleType = new XMLSimpleType(); 57 58 /** 59 * setValues 60 * 61 * @param name 62 * @param scope 63 * @param type 64 * @param contentModelValidator 65 * @param simpleType 66 */ 67 public void setValues(QName name, int scope, short type, 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