1 package org.sapia.util.xml; 2 3 4 import java.io.Serializable ; 7 8 9 20 public class Attribute implements Serializable { 21 25 26 private String _theNamespacePrefix; 27 28 29 private String _theName; 30 31 32 private String _theValue; 33 34 38 41 public Attribute() { 42 } 43 44 47 public Attribute(String aName, String aValue) { 48 _theName = aName; 49 _theValue = aValue; 50 } 51 52 55 public Attribute(String aNamespacePrefix, String aName, String aValue) { 56 _theNamespacePrefix = aNamespacePrefix; 57 _theName = aName; 58 _theValue = aValue; 59 } 60 61 65 70 public String getNamespacePrefix() { 71 return _theNamespacePrefix; 72 } 73 74 79 public String getName() { 80 return _theName; 81 } 82 83 88 public String getValue() { 89 return _theValue; 90 } 91 92 96 101 public void setNamespacePrefix(String aNamespacePrefix) { 102 _theNamespacePrefix = aNamespacePrefix; 103 } 104 105 110 public void setName(String aName) { 111 _theName = aName; 112 } 113 114 119 public void setValue(String aValue) { 120 _theValue = aValue; 121 } 122 123 127 132 public String toString() { 133 StringBuffer aBuffer = new StringBuffer (super.toString()); 134 aBuffer.append("[namespacePrefix=").append(_theNamespacePrefix) 135 .append(" name=").append(_theName).append(" value=").append(_theValue) 136 .append("]"); 137 138 return aBuffer.toString(); 139 } 140 } 141 | Popular Tags |