001    /*
002    // $Id: //open/util/resgen/src/org/eigenbase/xom/CommentDef.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) 2000-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, 11 October, 2001
024    */
025    
026    package org.eigenbase.xom;
027    import java.io.PrintWriter;
028    
029    /**
030     * todo:
031     *
032     * @author jhyde
033     * @since 11 October, 2001
034     * @version $Id: //open/util/resgen/src/org/eigenbase/xom/CommentDef.java#3 $
035     **/
036    public class CommentDef extends TextDef {
037    
038        public CommentDef()
039        {
040            super();
041        }
042    
043        public CommentDef(String s)
044        {
045            super(s);
046        }
047    
048        public CommentDef(DOMWrapper _def) throws XOMException
049        {
050            super(_def);
051        }
052    
053        // override ElementDef
054        public int getType()
055        {
056            return DOMWrapper.COMMENT;
057        }
058    
059        // implement NodeDef
060        public void display(PrintWriter pw, int indent)
061        {
062            pw.print("<!-- ");
063            pw.print(s);
064            pw.print(" -->");
065        }
066    
067        // implement NodeDef
068        public void displayXML(XMLOutput out, int indent)
069        {
070            out.beginNode();
071            out.print("<!-- ");
072            out.print(s);
073            out.print(" -->");
074        }
075    }
076    
077    
078    // End CommentDef.java