Examples of DeviceNode


Examples of org.apache.felix.upnp.tester.discovery.DeviceNode

 
  public void rootDeviceUnplugged(String udn){
    Enumeration list = root.children();
    while (list.hasMoreElements()){
      UPnPDeviceTreeNode node= (UPnPDeviceTreeNode)list.nextElement();
      DeviceNode device = (DeviceNode)node.getUserObject();
      if (udn.equals(device.toString())) {
        node.removeFromParent();
        treeModel.nodeStructureChanged(root);
      }
    }
  }
View Full Code Here

Examples of org.apache.felix.upnp.tester.discovery.DeviceNode

    else
      Mediator.getPropertiesViewer().showSubscriptionPanel(false);

    if ( node.category.equals(UPnPDeviceTreeNode.DEVICE)
      ||node.category.equals(UPnPDeviceTreeNode.ROOT_DEVICE)){
      DeviceNode device = (DeviceNode) node.getUserObject();
      UPnPDevice upnpDevice = device.getDevice(Activator.context);
      makeProperties(upnpDevice);
    }
    else if (node.category.equals(UPnPDeviceTreeNode.SERVICE)){
      UPnPService service = (UPnPService) node.getUserObject();     
      makeProperties(service);
View Full Code Here

Examples of org.apache.felix.upnp.tester.discovery.DeviceNode

                String url = "";
                if (selectedNode.category.equals(UPnPDeviceTreeNode.DEVICE)){
                    UPnPDeviceTreeNode parent =  (UPnPDeviceTreeNode)selectedNode.getParent();
                    while (parent.category!=UPnPDeviceTreeNode.ROOT_DEVICE)
                         parent =  (UPnPDeviceTreeNode)parent.getParent();
                    DeviceNode device =  (DeviceNode) parent.getUserObject();
                    String udn = (String)device.getReference().getProperty(UPnPDevice.UDN);
                    url = Mediator.getDriverProxy().getDeviceDescriptionURI(udn);
                }
                       
                else if (selectedNode.category.equals(UPnPDeviceTreeNode.ROOT_DEVICE))
                {
                    DeviceNode node =  (DeviceNode) selectedNode.getUserObject();
                    String udn = (String)node.getReference().getProperty(UPnPDevice.UDN);
                    url = Mediator.getDriverProxy().getDeviceDescriptionURI(udn);
                }
                else if (selectedNode.category.equals(UPnPDeviceTreeNode.SERVICE))
                {
                    UPnPDeviceTreeNode parent =  (UPnPDeviceTreeNode)selectedNode.getParent();
                    while (parent.category!=UPnPDeviceTreeNode.ROOT_DEVICE)
                         parent =  (UPnPDeviceTreeNode)parent.getParent();
                    DeviceNode device =  (DeviceNode) parent.getUserObject();
                    String udn = (String)device.getReference().getProperty(UPnPDevice.UDN);
                    UPnPService service =  (UPnPService) selectedNode.getUserObject();
                    url = Mediator.getDriverProxy().getServiceDescriptionURI(udn,service.getId());
                }                   
                Util.openUrl(url);  
            }
View Full Code Here

Examples of org.apache.felix.upnp.tester.discovery.DeviceNode

                    String url = "";
                    if (selectedNode.category.equals(UPnPDeviceTreeNode.DEVICE)){
                        UPnPDeviceTreeNode parent =  (UPnPDeviceTreeNode)selectedNode.getParent();
                        while (parent.category!=UPnPDeviceTreeNode.ROOT_DEVICE)
                             parent =  (UPnPDeviceTreeNode)parent.getParent();
                        DeviceNode device =  (DeviceNode) parent.getUserObject();
                        String udn = (String)device.getReference().getProperty(UPnPDevice.UDN);
                        url = Mediator.getDriverProxy().resolveRelativeUrl(udn,data);
                        return url;
                    }                          
                    else if (selectedNode.category.equals(UPnPDeviceTreeNode.ROOT_DEVICE))
                    {
                        DeviceNode node =  (DeviceNode) selectedNode.getUserObject();
                        String udn = (String)node.getReference().getProperty(UPnPDevice.UDN);
                        url = Mediator.getDriverProxy().resolveRelativeUrl(udn,data);
                        return url;
                    }
                }
                return null;    
View Full Code Here

Examples of org.apache.felix.upnp.tester.discovery.DeviceNode

   
    Collection nodeChildren = obj.getChildren();
    if (nodeChildren != null){   
      Iterator list = nodeChildren.iterator();
      while (list.hasNext()){
        DeviceNode node = (DeviceNode)list.next();
        this.add(new UPnPDeviceTreeNode(node,ctx));
      }
    }
    if (services != null){
      for (int i=0;i<services.length;i++)
View Full Code Here

Examples of org.apache.felix.upnp.tester.discovery.DeviceNode

    else category = STATE;
  }
 
  public String toString() {
    if (category.equals(DEVICE)||category.equals(ROOT_DEVICE)){
      DeviceNode node =  (DeviceNode) getUserObject();
      return node.toString();
    }
    else if (category.equals(SERVICE)){
      UPnPService node =  (UPnPService) getUserObject();
      return node.getType();
    }
    else if (category.equals(ACTION)){
      UPnPAction node =  (UPnPAction) getUserObject();
      return node.getName();
    }
    else if (category.equals(STATE) ||category.equals(EVENTED_STATE)||category.equals(SUBSCRIBED_STATE)){
      UPnPStateVariable node =  (UPnPStateVariable) getUserObject();
      return node.getName();
    }
    else
      return getUserObject().toString();
  }
View Full Code Here

Examples of org.apache.felix.upnp.tester.discovery.DeviceNode

    public void setToolTip(UPnPDeviceTreeNode node) {
        String tag = node.category;
        if (tag.equals(UPnPDeviceTreeNode.ROOT_DEVICE)
             ||tag.equals(UPnPDeviceTreeNode.DEVICE))
        {
            DeviceNode device = (DeviceNode) node.getUserObject();
            setToolTipText("<html><TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0' ><TR BGCOLOR='#F9FF79' ><TD>"
                    + device.getReference().getProperty(UPnPDevice.FRIENDLY_NAME).toString()
                    +"</TD></TR></TABLE ></html>");
        }
        else
            setToolTipText(null);
     }
View Full Code Here

Examples of org.apache.felix.upnp.tester.discovery.DeviceNode

      String serviceId = ((UPnPService) userObj).getId();
      return serviceId;
  }
  private String getDeviceId (UPnPDeviceTreeNode selectedNode){
       UPnPDeviceTreeNode parent = (UPnPDeviceTreeNode)selectedNode.getParent();
       DeviceNode node =(DeviceNode)parent.getUserObject();
       String parentId = (String) node.getReference().getProperty(UPnPDevice.ID);
      return parentId;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.