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