01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.desktop.dp.xml;
06:
07: import org.w3c.dom.Element;
08: import org.w3c.dom.Document;
09:
10: import com.sun.portal.desktop.context.DPContext;
11:
12: import com.sun.portal.desktop.dp.DPString;
13: import com.sun.portal.desktop.dp.DPRoot;
14:
15: class XMLDPString extends XMLDPAtomic implements DPString, XMLDPTags {
16:
17: XMLDPString(DPContext dpc, DPRoot r, Document d, String name,
18: String value) {
19: super (dpc, r, createElement(dpc, d, name, value));
20: }
21:
22: XMLDPString(DPContext dpc, DPRoot r, Document d, String value) {
23: super (dpc, r, createElement(dpc, d, null, value));
24: }
25:
26: XMLDPString(DPContext dpc, DPRoot r, Element e) {
27: super (dpc, r, e);
28: }
29:
30: public short getType() {
31: return STRING_DP;
32: }
33:
34: public void setStringValue(String v) {
35: setValue(v);
36: }
37:
38: public String getTag() {
39: return STRING_TAG;
40: }
41:
42: public String getStringValue() {
43: return (String) getValue();
44: }
45:
46: static Element createElement(DPContext dpc, Document d, String n,
47: String v) {
48: return createElement(dpc, d, STRING_TAG, n, v);
49: }
50: }
|