PropertiesNodepublic class PropertiesNode extends DeploymentDescriptorNode This node is responsible for handling property (name, value)
DTD elements to java.util.Properties mapping |
Fields Summary |
---|
private String | name | private Properties | descriptor |
Methods Summary |
---|
public java.lang.Object | getDescriptor()
return descriptor;
| public void | setElementValue(XMLElement element, java.lang.String value)receives notification of the value for a particular tag
if (TagNames.NAME_VALUE_PAIR_NAME.equals(element.getQName())) {
name = value;
} else if (TagNames.NAME_VALUE_PAIR_VALUE.equals(element.getQName())) {
descriptor.put(name, value);
}
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, java.util.Properties descriptor)write the descriptor class to a DOM tree and return it
Node propertiesNode = super.appendChild(parent, nodeName);
for (Enumeration keys = descriptor.propertyNames(); keys.hasMoreElements();) {
Node aProperty = this.appendChild(propertiesNode, RuntimeTagNames.PROPERTY);
String key = (String) keys.nextElement();
appendTextChild(aProperty, TagNames.NAME_VALUE_PAIR_NAME, key);
appendTextChild(aProperty, TagNames.NAME_VALUE_PAIR_VALUE,
descriptor.getProperty(key));
}
return propertiesNode;
|
|