Package org.cybergarage.xml

Examples of org.cybergarage.xml.Node


  //  isAllowedValueRangeNode
  ////////////////////////////////////////////////
 
  public AllowedValueRange(Number max, Number min, Number step) {
    //TODO Test
    allowedValueRangeNode = new Node(ELEM_NAME);
    if(max!=null)
      setMaximum(max.toString());
    if(min!=null)
      setMinimum(min.toString());
    if(step!=null)
View Full Code Here


   
    String location = ssdpPacket.getLocation();
    try
      URL locationUrl = new URL(location);
      Parser parser = UPnP.getXMLParser();
      Node rootNode = parser.parse(locationUrl);
      Device rootDev = getDevice(rootNode);
      if (rootDev == null)
        return;
      rootDev.setSSDPPacket(ssdpPacket);
      addDevice(rootNode);
View Full Code Here

  private Device getDevice(Node rootNode)
  {
    if (rootNode == null)
        return null;
    Node devNode = rootNode.getNode(Device.ELEM_NAME);
    if (devNode == null)
        return null;
    return new Device(rootNode, devNode);
  }
View Full Code Here

  public DeviceList getDeviceList()
  {
    DeviceList devList = new DeviceList();
    int nRoots = devNodeList.size();
    for (int n=0; n<nRoots; n++) {
      Node rootNode = devNodeList.getNode(n);
      Device dev = getDevice(rootNode);
      if (dev == null)
        continue;
      devList.add(dev);
    }
View Full Code Here

  public Device getDevice(String name)
  {
    int nRoots = devNodeList.size();
    for (int n=0; n<nRoots; n++) {
      Node rootNode = devNodeList.getNode(n);
      Device dev = getDevice(rootNode);
      if (dev == null)
        continue;
      if (dev.isDevice(name) == true)
        return dev;
View Full Code Here

    serviceNode=n;
  }

  public Service getService()
  {
    Node serviceNode = getServiceNode();
    if (serviceNode == null)
      return null;
    return new Service(serviceNode);
  }
View Full Code Here

  ////////////////////////////////////////////////

  public StateVariable()
  {
    this.serviceNode = null;
    this.stateVariableNode = new Node(ELEM_NAME);
  }
View Full Code Here

  //  UserData
  ////////////////////////////////////////////////

  public StateVariableData getStateVariableData ()
  {
    Node node = getStateVariableNode();
    StateVariableData userData = (StateVariableData)node.getUserData();
    if (userData == null) {
      userData = new StateVariableData();
      node.setUserData(userData);
      userData.setNode(node);
    }
    return userData;
  }
View Full Code Here

  ////////////////////////////////////////////////

  public AllowedValueList getAllowedValueList()
  {
    AllowedValueList valueList= new AllowedValueList();
    Node valueListNode = getStateVariableNode().getNode(AllowedValueList.ELEM_NAME);
    if (valueListNode == null)
      return null;
    int nNode = valueListNode.getNNodes();
    for (int n=0; n<nNode; n++) {
      Node node = valueListNode.getNode(n);
      if (AllowedValue.isAllowedValueNode(node) == false)
        continue;
      AllowedValue allowedVal = new AllowedValue(node);
      valueList.add(allowedVal);
    }
View Full Code Here

    return getRootNode();
  }
 
  public Node getBodyNode()
  {
    Node envNode = getEnvelopeNode();
    if (envNode == null)
      return null;
    return envNode.getNodeEndsWith(SOAP.BODY);
  }
View Full Code Here

TOP

Related Classes of org.cybergarage.xml.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.