001/* 002 * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 003 * 004 * This software is open source. 005 * See the bottom of this file for the licence. 006 * 007 * $Id: ElementDecl.java,v 1.1 2001/10/10 13:55:06 jstrachan Exp $ 008 */ 009 010package org.dom4j.dtd; 011 012/** <p><code>AttributeDecl</code> represents an element declaration in a DTD.</p> 013 * 014 * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a> 015 * @version $Revision: 1.1 $ 016 */ 017public class ElementDecl { 018 019 /** Holds value of property name. */ 020 private String name; 021 022 /** Holds value of property model. */ 023 private String model; 024 025 026 public ElementDecl() { 027 } 028 029 public ElementDecl(String name, String model) { 030 this.name = name; 031 this.model = model; 032 } 033 034 /** Getter for property name. 035 * @return Value of property name. 036 */ 037 public String getName() { 038 return name; 039 } 040 041 /** Setter for property name. 042 * @param name New value of property name. 043 */ 044 public void setName(String name) { 045 this.name = name; 046 } 047 048 /** Getter for property model. 049 * @return Value of property model. 050 */ 051 public String getModel() { 052 return model; 053 } 054 055 /** Setter for property model. 056 * @param model New value of property model. 057 */ 058 public void setModel(String model) { 059 this.model = model; 060 } 061 062 public String toString() { 063 return "<!ELEMENT " + name + " " + model + ">"; 064 } 065} 066 067 068 069 070/* 071 * Redistribution and use of this software and associated documentation 072 * ("Software"), with or without modification, are permitted provided 073 * that the following conditions are met: 074 * 075 * 1. Redistributions of source code must retain copyright 076 * statements and notices. Redistributions must also contain a 077 * copy of this document. 078 * 079 * 2. Redistributions in binary form must reproduce the 080 * above copyright notice, this list of conditions and the 081 * following disclaimer in the documentation and/or other 082 * materials provided with the distribution. 083 * 084 * 3. The name "DOM4J" must not be used to endorse or promote 085 * products derived from this Software without prior written 086 * permission of MetaStuff, Ltd. For written permission, 087 * please contact dom4j-info@metastuff.com. 088 * 089 * 4. Products derived from this Software may not be called "DOM4J" 090 * nor may "DOM4J" appear in their names without prior written 091 * permission of MetaStuff, Ltd. DOM4J is a registered 092 * trademark of MetaStuff, Ltd. 093 * 094 * 5. Due credit should be given to the DOM4J Project 095 * (http://dom4j.org/). 096 * 097 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS 098 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT 099 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 100 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 101 * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 102 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 103 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 104 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 105 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 106 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 107 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 108 * OF THE POSSIBILITY OF SUCH DAMAGE. 109 * 110 * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 111 * 112 * $Id: ElementDecl.java,v 1.1 2001/10/10 13:55:06 jstrachan Exp $ 113 */