/** * receives notification of the value for a particular tag * * @param element the xml element * @param value it's associated value */ public void setElementValue(XMLElement element, String value) { descriptor.addElement(element.getCompleteName(), value); }
/** * receives notification of the end of an XML element by the Parser * * @param element the xml tag identification * @return true if this node is done processing the XML sub tree */ public boolean endElement(XMLElement element) { boolean allDone = element.getCompleteName().equals(getXMLRootTag().getCompleteName()) || element.getQName().equals(TagNames.EXTENSION_ELEMENT); if (allDone) { postParsing(); ((DeploymentDescriptorNode) getParentNode()).addNodeDescriptor(this); } return allDone; }
String value, Object o) { if (SCHEMA_LOCATION_TAG.equals(element.getCompleteName())) {
/** * Adds a new DOL descriptor instance to the descriptor associated with this * XMLNode * * @param XMLNode the sub-node adding the descriptor; * @param descriptor the new descriptor */ protected void addNodeDescriptor(DeploymentDescriptorNode node) { // nodes are added upon creation ExtensionElementDescriptor dad = (ExtensionElementDescriptor) node.getDescriptor(); Iterator itr = dad.getElementNames(); // jump over first element; if (itr.hasNext()) itr.next(); if (itr.hasNext() && !dad.hasAttributes()) { descriptor.addElement(node.getXMLRootTag().getCompleteName(), dad); } else { descriptor.addElement(node.getXMLRootTag().getCompleteName(), dad.getElement(node.getXMLRootTag().getCompleteName())); } }
if (SCHEMA_LOCATION_TAG.equals(element.getCompleteName())) {
/** * @return the handler registered for the subtag element of the curent XMLNode */ public XMLNode getHandlerFor(XMLElement element) { ExtensionElementNode subNode = new ExtensionElementNode(); subNode.setParentNode(this); subNode.setXMLRootTag(new XMLElement(element.getCompleteName())); return subNode; }