/** * Adds a new DOL descriptor instance to the descriptor instance associated with * this XMLNode * * @param descriptor the new descriptor */ public void addDescriptor(Object descriptor) { if (getParentNode()==null) { DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure", new Object[] {descriptor , toString()}); throw new RuntimeException("Cannot add " + descriptor + " to " + toString()); } else { getParentNode().addDescriptor(descriptor); } }
/** * Adds a new DOL descriptor instance to the descriptor instance associated with * this XMLNode * * @param descriptor the new descriptor */ public void addDescriptor(Object descriptor) { if (getParentNode()==null) { DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure", new Object[] {descriptor , toString()}); throw new RuntimeException("Cannot add " + descriptor + " to " + toString()); } else { getParentNode().addDescriptor(descriptor); } }
/** * @return the XPath this XML Node is handling */ public String getXMLPath() { if (getParentNode()!=null) { return getParentNode().getXMLPath() + "/" + getXMLRootTag().getQName(); } else { return getXMLRootTag().getQName(); } }
/** * @return the XPath this XML Node is handling */ public String getXMLPath() { if (getParentNode()!=null) { return getParentNode().getXMLPath() + "/" + getXMLRootTag().getQName(); } else { return getXMLRootTag().getQName(); } }
/** * 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) { //DOLUtils.getDefaultLogger().finer("ENDELEMENT : " + "in " + getXMLRootTag() + " Node, endElement " + element.getQName()); boolean allDone = element.equals(getXMLRootTag()); if (allDone) { postParsing(); if (getParentNode()!=null && getDescriptor()!=null) { ((DeploymentDescriptorNode) getParentNode()).addNodeDescriptor(this); } } return allDone; }
/** * 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) { //DOLUtils.getDefaultLogger().finer("ENDELEMENT : " + "in " + getXMLRootTag() + " Node, endElement " + element.getQName()); boolean allDone = element.equals(getXMLRootTag()); if (allDone) { postParsing(); if (getParentNode()!=null && getDescriptor()!=null) { ((DeploymentDescriptorNode) getParentNode()).addNodeDescriptor(this); } } return allDone; }