View Javadoc

1   /*
2    * $Id: Literal.java,v 1.10 2005/03/29 15:07:42 jlerner Exp $
3    *
4    * Copyright (c) 1999-2004, BBN Technologies, LLC.
5    * All rights reserved.
6    * http://www.daml.org/legal/opensource/bbn_license.html
7    */
8   
9   package com.bbn.swede.core.dom;
10  
11  /***
12   * Custom text node implementation for literals.  Any CDATA found when a
13   * document is parsed becomes a literal node.
14   * @author jlerner
15   */
16  public class Literal extends TextNode
17  {
18     /***
19      * Creates a Literal node.
20      * @param sText The full text of the literal.
21      */
22     public Literal(String sText)
23     {
24        super(sText);
25     }
26  
27     /*
28      *  (non-Javadoc)
29      * @see com.bbn.swede.core.dom.OASTNode#allowedChildren()
30      */
31     protected int[] allowedChildren()
32     {
33        return null;
34     }
35  
36     /*
37      *  (non-Javadoc)
38      * @see com.bbn.swede.core.dom.OASTNode#getNodeType()
39      */
40     public int getNodeType()
41     {
42        return LITERAL;
43     }
44  }