protected void readProperties(XmlPullParser xpp, IncomingEventRequestMessage message) throws Exception { // We're inside the propertyset tag StateVariable[] stateVariables = message.getService().getStateVariables(); int event; while((event = xpp.next()) != XmlPullParser.END_DOCUMENT) { if(event != XmlPullParser.START_TAG) continue; if(xpp.getName().equals("property")) { readProperty(xpp, message, stateVariables); } } }
protected void readProperties(Element propertysetElement, IncomingEventRequestMessage message) { NodeList propertysetElementChildren = propertysetElement.getChildNodes(); StateVariable[] stateVariables = message.getService().getStateVariables(); for (int i = 0; i < propertysetElementChildren.getLength(); i++) { Node propertysetChild = propertysetElementChildren.item(i); if (propertysetChild.getNodeType() != Node.ELEMENT_NODE) continue; if (getUnprefixedNodeName(propertysetChild).equals("property")) { NodeList propertyChildren = propertysetChild.getChildNodes(); for (int j = 0; j < propertyChildren.getLength(); j++) { Node propertyChild = propertyChildren.item(j); if (propertyChild.getNodeType() != Node.ELEMENT_NODE) continue; String stateVariableName = getUnprefixedNodeName(propertyChild); for (StateVariable stateVariable : stateVariables) { if (stateVariable.getName().equals(stateVariableName)) { log.fine("Reading state variable value: " + stateVariableName); String value = XMLUtil.getTextContent(propertyChild); message.getStateVariableValues().add( new StateVariableValue(stateVariable, value) ); break; } } } } } }
protected void readProperties(XmlPullParser xpp, IncomingEventRequestMessage message) throws Exception { // We're inside the propertyset tag StateVariable[] stateVariables = message.getService().getStateVariables(); int event; while((event = xpp.next()) != XmlPullParser.END_DOCUMENT) { if(event != XmlPullParser.START_TAG) continue; if(xpp.getName().equals("property")) { readProperty(xpp, message, stateVariables); } } }
protected void readProperties(Element propertysetElement, IncomingEventRequestMessage message) { NodeList propertysetElementChildren = propertysetElement.getChildNodes(); StateVariable[] stateVariables = message.getService().getStateVariables(); for (int i = 0; i < propertysetElementChildren.getLength(); i++) { Node propertysetChild = propertysetElementChildren.item(i); if (propertysetChild.getNodeType() != Node.ELEMENT_NODE) continue; if (getUnprefixedNodeName(propertysetChild).equals("property")) { NodeList propertyChildren = propertysetChild.getChildNodes(); for (int j = 0; j < propertyChildren.getLength(); j++) { Node propertyChild = propertyChildren.item(j); if (propertyChild.getNodeType() != Node.ELEMENT_NODE) continue; String stateVariableName = getUnprefixedNodeName(propertyChild); for (StateVariable stateVariable : stateVariables) { if (stateVariable.getName().equals(stateVariableName)) { log.fine("Reading state variable value: " + stateVariableName); String value = XMLUtil.getTextContent(propertyChild); message.getStateVariableValues().add( new StateVariableValue(stateVariable, value) ); break; } } } } } }
protected void readProperties(XmlPullParser xpp, IncomingEventRequestMessage message) throws Exception { // We're inside the propertyset tag StateVariable[] stateVariables = message.getService().getStateVariables(); int event; while((event = xpp.next()) != XmlPullParser.END_DOCUMENT) { if(event != XmlPullParser.START_TAG) continue; if(xpp.getName().equals("property")) { readProperty(xpp, message, stateVariables); } } }
protected void readProperties(Element propertysetElement, IncomingEventRequestMessage message) { NodeList propertysetElementChildren = propertysetElement.getChildNodes(); StateVariable[] stateVariables = message.getService().getStateVariables(); for (int i = 0; i < propertysetElementChildren.getLength(); i++) { Node propertysetChild = propertysetElementChildren.item(i); if (propertysetChild.getNodeType() != Node.ELEMENT_NODE) continue; if (getUnprefixedNodeName(propertysetChild).equals("property")) { NodeList propertyChildren = propertysetChild.getChildNodes(); for (int j = 0; j < propertyChildren.getLength(); j++) { Node propertyChild = propertyChildren.item(j); if (propertyChild.getNodeType() != Node.ELEMENT_NODE) continue; String stateVariableName = getUnprefixedNodeName(propertyChild); for (StateVariable stateVariable : stateVariables) { if (stateVariable.getName().equals(stateVariableName)) { log.fine("Reading state variable value: " + stateVariableName); String value = XMLUtil.getTextContent(propertyChild); message.getStateVariableValues().add( new StateVariableValue(stateVariable, value) ); break; } } } } } }