001/* 002// $Id: //open/util/resgen/src/org/eigenbase/xom/CdataDef.java#3 $ 003// Package org.eigenbase.xom is an XML Object Mapper. 004// Copyright (C) 2005-2005 The Eigenbase Project 005// Copyright (C) 2005-2005 Disruptive Tech 006// Copyright (C) 2005-2005 LucidEra, Inc. 007// Portions Copyright (C) 2001-2005 Kana Software, Inc. and others. 008// 009// This library is free software; you can redistribute it and/or modify it 010// under the terms of the GNU Lesser General Public License as published by the 011// Free Software Foundation; either version 2 of the License, or (at your 012// option) any later version approved by The Eigenbase Project. 013// 014// This library is distributed in the hope that it will be useful, 015// but WITHOUT ANY WARRANTY; without even the implied warranty of 016// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017// GNU Lesser General Public License for more details. 018// 019// You should have received a copy of the GNU Lesser General Public License 020// along with this library; if not, write to the Free Software 021// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 022// 023// jhyde, 3 October, 2001 024*/ 025 026package org.eigenbase.xom; 027 028 029/** 030 * A <code>CdataDef</code> represents a CDATA element. It allows an 031 * <code><Any></code> element to have mixed children. 032 * 033 * @author jhyde 034 * @since 3 October, 2001 035 * @version $Id: //open/util/resgen/src/org/eigenbase/xom/CdataDef.java#3 $ 036 **/ 037public class CdataDef extends TextDef 038{ 039 public CdataDef() 040 { 041 super(); 042 } 043 044 public CdataDef(String s) 045 { 046 super(s); 047 } 048 049 public CdataDef(DOMWrapper _def) 050 throws org.eigenbase.xom.XOMException 051 { 052 super(_def); 053 } 054 055 // implement NodeDef 056 public int getType() 057 { 058 return DOMWrapper.CDATA; 059 } 060 061 // override NodeDef 062 public void displayXML(XMLOutput out, int indent) 063 { 064 out.beginNode(); 065 out.cdata(s, true); 066 } 067} 068 069 070// End CdataDef.java