public void setValue(int value) { setValue(Integer.toString(value)); }
public void setValue(String value) { getAllowedValueNode().setValue(value); }
public void setNode(String name, String value) { Node node = getNode(name); if (node == null) { node = new Node(name); addNode(node); } node.setValue(value); }
private void setURLBase(String value) { if (isRootDevice() == true) { Node node = getRootNode().getNode(URLBASE_NAME); if (node != null) { node.setValue(value); return; } node = new Node(URLBASE_NAME); node.setValue(value); int index = 1; if (getRootNode().hasNodes() == false) index = 1; getRootNode().insertNode(node, index); } }
faultCodeNode.setValue(SOAP.XMLNS + SOAP.DELIM + FAULT_CODE); faultNode.addNode(faultCodeNode); faultStringNode.setValue(FAULT_STRING); faultNode.addNode(faultStringNode); errorCodeNode.setValue(errCode); upnpErrorNode.addNode(errorCodeNode); errorDesctiprionNode.setValue(errDescr); upnpErrorNode.addNode(errorDesctiprionNode);
private Node createResponseNode(String var) { Node queryResNode = new Node(); queryResNode.setName(Control.NS, Control.QUERY_STATE_VARIABLE_RESPONSE); queryResNode.setNameSpace(Control.NS, Control.XMLNS); Node returnNode = new Node(); returnNode.setName(Control.RETURN); returnNode.setValue(var); queryResNode.addNode(returnNode); return queryResNode; } }
private Node createPropertySetNode(String varName, String value) { Node propSetNode = new Node(/*XMLNS + SOAP.DELIM + */PROPERTYSET); propSetNode.setNameSpace(XMLNS, Subscription.XMLNS); Node propNode = new Node(/*XMLNS + SOAP.DELIM + */PROPERTY); propSetNode.addNode(propNode); // Thanks for Giordano Sassaroli <sassarol@cefriel.it> (05/22/03) //Node varNameNode = new Node(XMLNS + SOAP.DELIM + varName); Node varNameNode = new Node(varName); varNameNode.setValue(value); propNode.addNode(varNameNode); return propSetNode; }
public Service(){ this(new Node(ELEM_NAME)); Node sp = new Node(SPEC_VERSION); Node M =new Node(MAJOR); M.setValue(MAJOR_VALUE); sp.addNode(M); Node m =new Node(MINOR); m.setValue(MINOR_VALUE); sp.addNode(m); //Node scpd = new Node(SCPD_ROOTNODE,SCPD_ROOTNODE_NS); wrong! Node scpd = new Node(SCPD_ROOTNODE); scpd.addAttribute("xmlns",SCPD_ROOTNODE_NS); scpd.addNode(sp); getServiceData().setSCPDNode(scpd); }
private Node createContentNode(StateVariable stateVar) { Node queryVarNode = new Node(); queryVarNode.setName(Control.NS, Control.QUERY_STATE_VARIABLE); queryVarNode.setNameSpace(Control.NS, Control.XMLNS); Node varNode = new Node(); varNode.setName(Control.NS, Control.VAR_NAME); varNode.setValue(stateVar.getName()); queryVarNode.addNode(varNode); return queryVarNode; }
private Node createContentNode(Service service, Action action, ArgumentList argList) { String actionName = action.getName(); String serviceType = service.getServiceType(); Node actionNode = new Node(); actionNode.setName(Control.NS, actionName); actionNode.setNameSpace(Control.NS, serviceType); int argListCnt = argList.size(); for (int n=0; n<argListCnt; n++) { Argument arg = argList.getArgument(n); Node argNode = new Node(); argNode.setName(arg.getName()); argNode.setValue(arg.getValue()); actionNode.addNode(argNode); } return actionNode; }
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; }
private Node createResponseNode(Action action) { String actionName = action.getName(); Node actionNameResNode = new Node(SOAP.METHODNS + SOAP.DELIM + actionName + SOAP.RESPONSE); Service service = action.getService(); if (service != null) { actionNameResNode.setAttribute( "xmlns:" + SOAP.METHODNS, service.getServiceType()); } ArgumentList argList = action.getArgumentList(); int nArgs = argList.size(); for (int n=0; n<nArgs; n++) { Argument arg = argList.getArgument(n); if (arg.isOutDirection() == false) continue; Node argNode = new Node(); argNode.setName(arg.getName()); argNode.setValue(arg.getValue()); actionNameResNode.addNode(argNode); } return actionNameResNode; }
public void setNode(String name, String value) { Node node = getNode(name); if (node == null) { node = new Node(name); addNode(node); } node.setValue(value); }
public void setNode(String name, String value) { Node node = getNode(name); if (node == null) { node = new Node(name); addNode(node); } node.setValue(value); }
private static Node buildRootNode(){ Node root = new Node(RootDescription.ROOT_ELEMENT); root.setAttribute("xmlns",RootDescription.ROOT_ELEMENT_NAMESPACE); Node spec = new Node(RootDescription.SPECVERSION_ELEMENT); Node maj =new Node(RootDescription.MAJOR_ELEMENT); maj.setValue("1"); Node min =new Node(RootDescription.MINOR_ELEMENT); min.setValue("0"); spec.addNode(maj); spec.addNode(min); root.addNode(spec); return root; }
private static Node buildRootNode(){ Node root = new Node(RootDescription.ROOT_ELEMENT); root.setAttribute("xmlns",RootDescription.ROOT_ELEMENT_NAMESPACE); Node spec = new Node(RootDescription.SPECVERSION_ELEMENT); Node maj =new Node(RootDescription.MAJOR_ELEMENT); maj.setValue("1"); Node min =new Node(RootDescription.MINOR_ELEMENT); min.setValue("0"); spec.addNode(maj); spec.addNode(min); root.addNode(spec); return root; }
private Node createContentNode(StateVariable stateVar) { Node queryVarNode = new Node(); queryVarNode.setName(Control.NS, Control.QUERY_STATE_VARIABLE); queryVarNode.setNameSpace(Control.NS, Control.XMLNS); Node varNode = new Node(); varNode.setName(Control.NS, Control.VAR_NAME); varNode.setValue(stateVar.getName()); queryVarNode.addNode(varNode); return queryVarNode; }
private Node createContentNode(StateVariable stateVar) { Node queryVarNode = new Node(); queryVarNode.setName(Control.NS, Control.QUERY_STATE_VARIABLE); queryVarNode.setNameSpace(Control.NS, Control.XMLNS); Node varNode = new Node(); varNode.setName(Control.NS, Control.VAR_NAME); varNode.setValue(stateVar.getName()); queryVarNode.addNode(varNode); return queryVarNode; }