congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ItemNode
Code IndexAdd Tabnine to your IDE (free)

How to use
ItemNode
in
org.cybergarage.upnp.std.av.server.object.item

Best Java code snippets using org.cybergarage.upnp.std.av.server.object.item.ItemNode (Showing top 18 results out of 315)

origin: cybergarage/cybergarage-upnp

public void addContentNode(ContentNode node) 
{
  addNode(node);
  node.setParentID(getID());
  node.setContentDirectory(getContentDirectory());
}
origin: cybergarage/cybergarage-upnp

  public int compare(ContentNode conNode1, ContentNode conNode2)
  {
    if (conNode1 == null || conNode2 == null)
      return 0;
    if (!(conNode1 instanceof ItemNode) || !(conNode2 instanceof ItemNode))
      return 0;
    ItemNode itemNode1 = (ItemNode)conNode1;
    ItemNode itemNode2 = (ItemNode)conNode2;
    long itemTime1 = itemNode1.getDateTime();
    long itemTime2 = itemNode2.getDateTime();
    if (itemTime1 == itemTime2)
      return 0;
    return (itemTime1 < itemTime2) ? -1 : 1;
  }
}
origin: stackoverflow.com

 public ItemNode findItem(){
  int inputID;
  boolean found = false;
  ItemNode current = null;
    try{
    System.out.print("\nGreetings, please enter the ID number for item:\n");
    inputID = scannerObject.nextInt();
    scannerObject.nextLine();
      for (current = head; !found; current = current.getNext()){
        if (current.getID() == inputID){                    
          return current; // return the result when you find the node
          }
        }       
      }catch(Exception e)
      {
        System.out.println("\nERROR!");
      }
  return current;
}
origin: geniusgithub/MediaPlayer

   public static MediaItem create(ItemNode node){
     MediaItem item = new MediaItem();
     item.setStringid(node.getID());
     item.setTitle(node.getTitle());
     item.setObjectClass(node.getUPnPClass());
     item.setDate(node.getDateTime());
     item.setAlbum(node.getAlbum());
     item.setAlbumUri(node.getAlbumArtURI());
     item.setArtist(node.getArtist());
     ResourceNode resourceNode = node.getFirstResource();
     if (resourceNode != null){
       item.setRes(resourceNode.getURL());
       item.setprotocolInfo(resourceNode.getProtocolInfo());
       item.setDuration(DlnaUtil.formatDurationString(resourceNode.getDuration()));
       item.setSize(DlnaUtil.formatSizeString(resourceNode.getSize()));
     }
    return item;
   }
}
origin: cybergarage/cybergarage-upnp

public boolean set(Node node)
{
  // Child Node -> Property;
  int nNode = node.getNNodes();
  for (int n=0; n<nNode; n++) {
    Node cnode = node.getNode(n);
    if (ContainerNode.isContainerNode(cnode) == true)
      continue;
    if (ItemNode.isItemNode(cnode) == true)
      continue;
    if (ResourceNode.isResourceNode(cnode) == true) {
      ResourceNode resNode = new ResourceNode();
      resNode.set(cnode);
      addResourceNode(resNode);
      continue;
    }
    setProperty(cnode.getName(), cnode.getValue());
  }
  // Attribute -> Attribute;
  int nAttr = node.getNAttributes();
  for (int n=0; n<nAttr; n++) {
    Attribute attr = node.getAttribute(n);
    setAttribute(attr.getName(), attr.getValue());
  }
  
  return true;
}

origin: cybergarage/cybergarage-upnp

  contentNode = new ContainerNode();
else if (ItemNode.isItemNode(xmlNode) == true)
  contentNode = new ItemNode();
if (contentNode == null)
  continue;
origin: cybergarage/cybergarage-upnp

long contentLen = itemNode.getContentLength();
String contentType = itemNode.getMimeType();
InputStream contentIn = itemNode.getContentInputStream();		
origin: stackoverflow.com

 ItemNode root = ...;

public ItemNode findNode(int value){
  if(root !=null){
    ItemNode temp = root;
    while(temp!=null){
      if(temp.getID() == value) return temp;
      temp = temp.next;
    }
  }
  return null;
}
origin: geniusgithub/MediaPlayer

public boolean set(Node node)
{
  // Child Node -> Property;
  int nNode = node.getNNodes();
  for (int n=0; n<nNode; n++) {
    Node cnode = node.getNode(n);
    if (ContainerNode.isContainerNode(cnode) == true)
      continue;
    if (ItemNode.isItemNode(cnode) == true)
      continue;
    setProperty(cnode.getName(), cnode.getValue());
  }
  // Attribute -> Attribute;
  int nAttr = node.getNAttributes();
  for (int n=0; n<nAttr; n++) {
    Attribute attr = node.getAttribute(n);
    setAttribute(attr.getName(), attr.getValue());
  }
  
  return true;
}

origin: cybergarage/cybergarage-upnp

public boolean setAVTransportURI(
    Device dev,
    ItemNode itemNode)
{
  if (dev == null)
    return false;
  
  ResourceNode resNode = itemNode.getFirstResource();
  if (resNode == null)
    return false;
  String resURL = resNode.getURL();
  if (resURL == null || resURL.length() <= 0)
    return false;
  
  Service avTransService = dev.getService(AVTransport.SERVICE_TYPE);
  if (avTransService == null)
    return false;
  
  Action action = avTransService.getAction(AVTransport.SETAVTRANSPORTURI);
  if (action == null)
    return false;
  
  action.setArgumentValue(AVTransport.INSTANCEID, "0");
  action.setArgumentValue(AVTransport.CURRENTURI, resURL);
  action.setArgumentValue(AVTransport.CURRENTURIMETADATA, "");
  
  return action.postControlAction();
}

origin: geniusgithub/MediaPlayer

public boolean set(Node node)
{
  // Child Node -> Property;
  int nNode = node.getNNodes();
  for (int n=0; n<nNode; n++) {
    Node cnode = node.getNode(n);
    if (ContainerNode.isContainerNode(cnode) == true)
      continue;
    if (ItemNode.isItemNode(cnode) == true)
      continue;
    if (ResourceNode.isResourceNode(cnode) == true) {
      ResourceNode resNode = new ResourceNode();
      resNode.set(cnode);
      addResourceNode(resNode);
      continue;
    }
    setProperty(cnode.getName(), cnode.getValue());
  }
  // Attribute -> Attribute;
  int nAttr = node.getNAttributes();
  for (int n=0; n<nAttr; n++) {
    Attribute attr = node.getAttribute(n);
    setAttribute(attr.getName(), attr.getValue());
  }
  
  return true;
}

origin: geniusgithub/MediaPlayer

  contentNode = new ContainerNode();
else if (ItemNode.isItemNode(xmlNode) == true)
  contentNode = new ItemNode();
if (contentNode == null)
  continue;
origin: geniusgithub/MediaPlayer

long contentLen = itemNode.getContentLength();
String contentType = itemNode.getMimeType();
InputStream contentIn = itemNode.getContentInputStream();		
origin: cybergarage/cybergarage-upnp

public boolean set(Node node)
{
  // Child Node -> Property;
  int nNode = node.getNNodes();
  for (int n=0; n<nNode; n++) {
    Node cnode = node.getNode(n);
    if (ContainerNode.isContainerNode(cnode) == true)
      continue;
    if (ItemNode.isItemNode(cnode) == true)
      continue;
    setProperty(cnode.getName(), cnode.getValue());
  }
  // Attribute -> Attribute;
  int nAttr = node.getNAttributes();
  for (int n=0; n<nAttr; n++) {
    Attribute attr = node.getAttribute(n);
    setAttribute(attr.getName(), attr.getValue());
  }
  
  return true;
}

origin: geniusgithub/MediaPlayer

public boolean setAVTransportURI(
    Device dev,
    ItemNode itemNode)
{
  if (dev == null)
    return false;
  
  ResourceNode resNode = itemNode.getFirstResource();
  if (resNode == null)
    return false;
  String resURL = resNode.getURL();
  if (resURL == null || resURL.length() <= 0)
    return false;
  
  Service avTransService = dev.getService(AVTransport.SERVICE_TYPE);
  if (avTransService == null)
    return false;
  
  Action action = avTransService.getAction(AVTransport.SETAVTRANSPORTURI);
  if (action == null)
    return false;
  
  action.setArgumentValue(AVTransport.INSTANCEID, "0");
  action.setArgumentValue(AVTransport.CURRENTURI, resURL);
  action.setArgumentValue(AVTransport.CURRENTURIMETADATA, "");
  
  return action.postControlAction();
}

origin: geniusgithub/MediaPlayer

public void addContentNode(ContentNode node) 
{
  addNode(node);
  node.setParentID(getID());
  node.setContentDirectory(getContentDirectory());
}
origin: geniusgithub/MediaPlayer

  contentNode = new ContainerNode();
else if (ItemNode.isItemNode(xmlNode) == true)
  contentNode = new ItemNode();
if (contentNode == null)
  continue;
origin: geniusgithub/MediaPlayer

  public int compare(ContentNode conNode1, ContentNode conNode2)
  {
    if (conNode1 == null || conNode2 == null)
      return 0;
    if (!(conNode1 instanceof ItemNode) || !(conNode2 instanceof ItemNode))
      return 0;
    ItemNode itemNode1 = (ItemNode)conNode1;
    ItemNode itemNode2 = (ItemNode)conNode2;
    long itemTime1 = itemNode1.getDateTime();
    long itemTime2 = itemNode2.getDateTime();
    if (itemTime1 == itemTime2)
      return 0;
    return (itemTime1 < itemTime2) ? -1 : 1;
  }
}
org.cybergarage.upnp.std.av.server.object.itemItemNode

Most used methods

  • getID
  • <init>
  • getDateTime
  • getFirstResource
  • isItemNode
  • addNode
  • addResourceNode
  • getContentDirectory
  • getContentInputStream
  • getContentLength
  • getDate
  • getMimeType
  • getDate,
  • getMimeType,
  • getNResourceNodeLists,
  • getPropertyAttribureValue,
  • getPropertyLongValue,
  • getPropertyValue,
  • getProtocolInfo,
  • getResource,
  • getResourceNode,
  • getTitle

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • String (java.lang)
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Join (org.hibernate.mapping)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now