Beispiel #1
0
 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);
   }
 }
Beispiel #2
0
 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());
   }
 }
Beispiel #3
0
  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());
  }