Codota Logo
Item.getFirstResource
Code IndexAdd Codota to your IDE (free)

How to use
getFirstResource
method
in
org.fourthline.cling.support.model.item.Item

Best Java code snippets using org.fourthline.cling.support.model.item.Item.getFirstResource (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: hezhubo/HPlayer

public ContentItem(Service service, Item item) {
  this.service = service;
  didlObject = item;
  id = item.getId();
  title = item.getTitle();
  isContainer = false;
  try {
    format = item.getFirstResource().getProtocolInfo().getContentFormat();
  } catch (Exception e) {
    e.printStackTrace();
  }
  try {
    url = item.getFirstResource().getValue();
  } catch (Exception e) {
    e.printStackTrace();
  }
}
origin: hubing8658/UPnP-DLNA-Demo

private void init() {
  MyApplication app = (MyApplication) getApplication();
  Item item = app.getItem();
  app.setItem(null);
  imageurl = item.getFirstResource().getValue();
  name = item.getTitle();
}
origin: hezhubo/HPlayer

@Override
public Response serve(IHTTPSession session) {
  String itemId = session.getUri().replaceFirst("/", "");
  itemId = URLDecoder.decode(itemId);
  if (itemId != null && ContentTree.hasNode(itemId)) {
    ContentNode node = ContentTree.getNode(itemId);
    if (node.isItem()) {
      String localPath = node.getFullPath();
      Long fileSize = node.getItem().getFirstResource().getSize();
      String mimeType = node.getItem().getFirstResource()
          .getProtocolInfo().getContentFormatMimeType().toString();
      return responseFile(mimeType, localPath, fileSize);
    }
  }
  Log.d(TAG, " response error!");
  String msg = "<html><body><h1>Error</h1>\n" + "</body></html>\n";
  return newFixedLengthResponse(msg);
}
origin: hubing8658/UPnP-DLNA-Demo

String uri = item.getFirstResource().getValue();
DIDLContent didlContent = new DIDLContent();
didlContent.addItem(item);
origin: fire3/sailorcast

upnpItem.getCreator(), "", "", upnpItem.getFirstResource().getValue(),
"object.item." + type);
origin: trishika/DroidUPnP

upnpItem.getCreator(), "", "", upnpItem.getFirstResource().getValue(),
"object.item." + type);
origin: hubing8658/UPnP-DLNA-Demo

@Override
public void received(ActionInvocation actionInvocation,
    DIDLContent didl) {
  LogUtil.d(TAG,
      "Received browse action DIDL descriptor, creating tree nodes");
  try {
    handler.sendEmptyMessage(HandlerWhat.CLEAR_ALL);
    for (Container container : didl.getContainers()) {
      ContentItem ct = new ContentItem(container, service);
      sendMsg(ct);
    }
    for (Item item : didl.getItems()) {
      String contentFormat = item.getFirstResource().getProtocolInfo().getContentFormat();
      ContentItem ct = new ContentItem(item, service, FiletypeUtil
          .getFiletype(contentFormat));
      sendMsg(ct);
    }
  } catch (Exception e) {
    LogUtil.e(TAG, "Creating DIDL tree nodes failed: " + e);
    actionInvocation.setFailure(new ActionException(
        ErrorCode.ACTION_FAILED,
        "Can't create list childs: " + e, e));
    failure(actionInvocation, null);
  }
}
org.fourthline.cling.support.model.itemItemgetFirstResource

Popular methods of Item

  • getId
  • getTitle
  • getCreator
  • getRefID
  • getResources
  • getClazz
  • getParentID
  • getWriteStatus
  • setRefID
  • <init>
  • addDescMetadata
  • addResource
  • addDescMetadata,
  • addResource,
  • getDescMetadata,
  • isRestricted,
  • setId,
  • setParentID,
  • setRestricted,
  • getFirstProperty,
  • getProperties

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now