1 /* 2 * Copyright 2007 Edward Kuns 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 * in compliance with the License. You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software distributed under the License 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 * or implied. See the License for the specific language governing permissions and limitations under 12 * the License. 13 * 14 * $Id: Text.java 0000 2007-01-11 00:00:00Z ekuns $ 15 */ 16 package org.castor.xmlctf.xmldiff.xml.nodes; 17 18 19 /** 20 * A class representing an XML Text node. 21 * 22 * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a> 23 * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $ 24 * @since Castor 1.1 25 */ 26 public class Text extends XMLNode { 27 28 /** Serial Version UID. */ 29 private static final long serialVersionUID = 6684442960507498460L; 30 /** The value of this text node. */ 31 private String _value = null; 32 33 /** 34 * Creates a new Text node with the given initial value. 35 * 36 * @param value the text value of this XML Text node. 37 */ 38 public Text(final String value) { 39 super(null, null, XMLNode.TEXT); 40 _value = value; 41 } 42 43 /** 44 * Returns the string value of this Text node. 45 * 46 * @return The string value of this Text node. 47 */ 48 public String getStringValue() { 49 return _value; 50 } 51 52 /** 53 * Sets the value for this text node. 54 * 55 * @param value The new value for this text node. 56 */ 57 public void setValue(final String value) { 58 this._value = value; 59 } 60 61 }