public void setArgumentList(ArgumentList al){ Node argumentListNode = getActionNode().getNode(ArgumentList.ELEM_NAME); if (argumentListNode == null){ argumentListNode = new Node(ArgumentList.ELEM_NAME); getActionNode().addNode(argumentListNode); }else{ argumentListNode.removeAllNodes(); } Iterator<Argument> i = al.iterator(); while (i.hasNext()) { Argument a = i.next(); a.setService(getService()); argumentListNode.addNode(a.getArgumentNode()); } }
public boolean set(Node otherNode) { if (otherNode == null) return false; setName(otherNode.getName()); setValue(otherNode.getValue()); removeAllAttributes(); int nOtherAttributes = otherNode.getNAttributes(); for (int n=0; n<nOtherAttributes; n++) { Attribute otherAttr = otherNode.getAttribute(n); Attribute thisAttr = new Attribute(otherAttr); addAttribute(thisAttr); } removeAllNodes(); int nOtherChildNodes = otherNode.getNNodes(); for (int n=0; n<nOtherChildNodes; n++) { Node otherChildNode = otherNode.getNode(n); Node thisChildNode = new Node(); thisChildNode.set(otherChildNode); addNode(thisChildNode); } return true; }
public void setArgumentList(ArgumentList al){ Node argumentListNode = getActionNode().getNode(ArgumentList.ELEM_NAME); if (argumentListNode == null){ argumentListNode = new Node(ArgumentList.ELEM_NAME); getActionNode().addNode(argumentListNode); }else{ argumentListNode.removeAllNodes(); } Iterator i = al.iterator(); while (i.hasNext()) { Argument a = (Argument) i.next(); a.setService(getService()); argumentListNode.addNode(a.getArgumentNode()); } }
public void setArgumentList(ArgumentList al){ Node argumentListNode = getActionNode().getNode(ArgumentList.ELEM_NAME); if (argumentListNode == null){ argumentListNode = new Node(ArgumentList.ELEM_NAME); getActionNode().addNode(argumentListNode); }else{ argumentListNode.removeAllNodes(); } Iterator i = al.iterator(); while (i.hasNext()) { Argument a = (Argument) i.next(); a.setService(getService()); argumentListNode.addNode(a.getArgumentNode()); } }
public boolean set(Node otherNode) { if (otherNode == null) return false; setName(otherNode.getName()); setValue(otherNode.getValue()); removeAllAttributes(); int nOtherAttributes = otherNode.getNAttributes(); for (int n=0; n<nOtherAttributes; n++) { Attribute otherAttr = otherNode.getAttribute(n); Attribute thisAttr = new Attribute(otherAttr); addAttribute(thisAttr); } removeAllNodes(); int nOtherChildNodes = otherNode.getNNodes(); for (int n=0; n<nOtherChildNodes; n++) { Node otherChildNode = otherNode.getNode(n); Node thisChildNode = new Node(); thisChildNode.set(otherChildNode); addNode(thisChildNode); } return true; }
public boolean set(Node otherNode) { if (otherNode == null) return false; setName(otherNode.getName()); setValue(otherNode.getValue()); removeAllAttributes(); int nOtherAttributes = otherNode.getNAttributes(); for (int n=0; n<nOtherAttributes; n++) { Attribute otherAttr = otherNode.getAttribute(n); Attribute thisAttr = new Attribute(otherAttr); addAttribute(thisAttr); } removeAllNodes(); int nOtherChildNodes = otherNode.getNNodes(); for (int n=0; n<nOtherChildNodes; n++) { Node otherChildNode = otherNode.getNode(n); Node thisChildNode = new Node(); thisChildNode.set(otherChildNode); addNode(thisChildNode); } return true; }