void setService(Service s) { serviceNode = s.getServiceNode(); /*To ensure integrity of the XML structure*/ Iterator<Argument> i = getArgumentList().iterator(); while (i.hasNext()) { Argument arg = i.next(); arg.setService(s); } }
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 void addAction(Action a) { Iterator i = a.getArgumentList().iterator(); while (i.hasNext()) { Argument arg = (Argument) i.next(); arg.setService(this); } Node scdpNode = getSCPDNode(); Node actionListNode = scdpNode.getNode(ActionList.ELEM_NAME); if (actionListNode == null) { actionListNode = new Node(ActionList.ELEM_NAME); scdpNode.addNode(actionListNode); } actionListNode.addNode(a.getActionNode()); }