org.fourthline.cling.model.meta.Device.getDetails()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(8.3k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中org.fourthline.cling.model.meta.Device.getDetails()方法的一些代码示例,展示了Device.getDetails()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.getDetails()方法的具体详情如下:
包路径:org.fourthline.cling.model.meta.Device
类名称:Device
方法名:getDetails

Device.getDetails介绍

暂无

代码示例

代码示例来源:origin: 4thline/cling

  1. public DeviceDetails getDetails(RemoteClientInfo info) {
  2. return this.getDetails();
  3. }

代码示例来源:origin: 4thline/cling

  1. @Override
  2. public String getTitle() {
  3. return device != null ? device.getDetails().getFriendlyName() : "(NO DEVICE)";
  4. }

代码示例来源:origin: 4thline/cling

  1. menuItem = new JMenu(entry.getKey().getDetails().getFriendlyName());
  2. for (int i = 0; i < SUPPORTED_INSTANCES; i++) {
  3. final int instanceId = i;
  4. entry.getKey().getDetails().getFriendlyName() + " (Not Compatible)"
  5. );
  6. menuItem.setEnabled(false);

代码示例来源:origin: 4thline/cling

  1. @Override
  2. public String toString() {
  3. String name =
  4. getDevice().getDetails() != null && getDevice().getDetails().getFriendlyName() != null
  5. ? getDevice().getDetails().getFriendlyName()
  6. : getDevice().getDisplayString();
  7. // Display a little star while the device is being loaded (see performance optimization earlier)
  8. return device.isFullyHydrated() ? name : name + " *";
  9. }
  10. }

代码示例来源:origin: 4thline/cling

  1. @Override
  2. public void failure(ActionInvocation invocation,
  3. UpnpResponse operation,
  4. String defaultMsg) {
  5. addMediaRendererInformation(foundMediaRenderer, Collections.EMPTY_LIST);
  6. updateStatusFailure(
  7. "Error retrieving protocol info from " +
  8. foundMediaRenderer.getDetails().getFriendlyName() + ". " + defaultMsg
  9. );
  10. }

代码示例来源:origin: 4thline/cling

  1. @Override
  2. public void success(ActionInvocation invocation) {
  3. updateStatus(
  4. "Successfuly sent URI to: (Instance: " + instanceId + ") " +
  5. avTransportService.getDevice().getDetails().getFriendlyName()
  6. );
  7. }

代码示例来源:origin: 4thline/cling

  1. String cleanModelNumber = null;
  2. if (getDetails() != null && getDetails().getModelDetails() != null) {
  3. ModelDetails modelDetails = getDetails().getModelDetails();
  4. if (modelDetails.getModelName() != null) {
  5. cleanModelName = modelDetails.getModelNumber() != null && modelDetails.getModelName().endsWith(modelDetails.getModelNumber())
  6. if (getDetails() != null && getDetails().getManufacturerDetails() != null) {
  7. if (cleanModelName != null && getDetails().getManufacturerDetails().getManufacturer() != null) {
  8. cleanModelName = cleanModelName.startsWith(getDetails().getManufacturerDetails().getManufacturer())
  9. ? cleanModelName.substring(getDetails().getManufacturerDetails().getManufacturer().length()).trim()
  10. : cleanModelName.trim();
  11. if (getDetails().getManufacturerDetails().getManufacturer() != null) {
  12. sb.append(getDetails().getManufacturerDetails().getManufacturer());

代码示例来源:origin: 4thline/cling

  1. public List<ValidationError> validate() {
  2. List<ValidationError> errors = new ArrayList<>();
  3. if (getType() != null) {
  4. // Only validate the graph if we have a device type - that means we validate only if there
  5. // actually is a fully hydrated graph, not just a discovered device of which we haven't even
  6. // retrieved the descriptor yet. This assumes that the descriptor will ALWAYS contain a device
  7. // type. Now that is a risky assumption...
  8. errors.addAll(getVersion().validate());
  9. if(getIdentity() != null) {
  10. errors.addAll(getIdentity().validate());
  11. }
  12. if (getDetails() != null) {
  13. errors.addAll(getDetails().validate());
  14. }
  15. if (hasServices()) {
  16. for (Service service : getServices()) {
  17. if (service != null)
  18. errors.addAll(service.validate());
  19. }
  20. }
  21. if (hasEmbeddedDevices()) {
  22. for (Device embeddedDevice : getEmbeddedDevices()) {
  23. if (embeddedDevice != null)
  24. errors.addAll(embeddedDevice.validate());
  25. }
  26. }
  27. }
  28. return errors;
  29. }

代码示例来源:origin: 4thline/cling

  1. public MessageBoxController(Controller parentController, final ControlPoint controlPoint, final Service service) {
  2. super(new JFrame("MessageBoxService on: " + service.getDevice().getDetails().getFriendlyName()), parentController);
  3. this.controlPoint = controlPoint;
  4. this.service = service;

代码示例来源:origin: 4thline/cling

  1. public void init(Service service) {
  2. this.service = service;
  3. view.setPresenter(this);
  4. view.setTitle("WAN IP Connection on " + service.getDevice().getRoot().getDetails().getFriendlyName());
  5. portMappingPresenter.init(
  6. view.getPortMappingListView(),
  7. view.getPortMappingEditView(),
  8. service,
  9. this
  10. );
  11. updateConnectionInfo();
  12. }

代码示例来源:origin: 4thline/cling

  1. view.setTitle(service.getDevice().getDetails().getFriendlyName());

代码示例来源:origin: kingthy/TVRemoteIME

  1. public DeviceDetails getDetails(RemoteClientInfo info) {
  2. return this.getDetails();
  3. }

代码示例来源:origin: 4thline/cling

  1. public void init(Service service) {
  2. view.setPresenter(this);
  3. view.setTitle("Content Directory on " + service.getDevice().getDetails().getFriendlyName());
  4. view.getTreeView().setPresenter(detailPresenter);
  5. view.getTreeView().init(controlPoint, service);
  6. detailPresenter.init(view.getDetailView());
  7. }

代码示例来源:origin: 4thline/cling

  1. view.setTitle(service.getDevice().getDetails().getFriendlyName());

代码示例来源:origin: 4thline/cling

  1. if (device.getDetails().getDlnaDocs() != null) {
  2. for (DLNADoc dlnaDoc : device.getDetails().getDlnaDocs()) {
  3. addIfNotNull(deviceNode, "DLNA Doc: ", dlnaDoc);
  4. addIfNotNull(deviceNode, "DLNA Caps: ", device.getDetails().getDlnaCaps());
  5. addIfNotNull(deviceNode, "Manufacturer: ", device.getDetails().getManufacturerDetails().getManufacturer());
  6. addIfNotNull(deviceNode, "Manufacturer URL/URI: ", device.getDetails().getManufacturerDetails().getManufacturerURI(), device);
  7. addIfNotNull(deviceNode, "Model Name: ", device.getDetails().getModelDetails().getModelName());
  8. addIfNotNull(deviceNode, "Model #: ", device.getDetails().getModelDetails().getModelNumber());
  9. addIfNotNull(deviceNode, "Model Description: ", device.getDetails().getModelDetails().getModelDescription());
  10. addIfNotNull(deviceNode, "Model URL/URI: ", device.getDetails().getModelDetails().getModelURI(), device);
  11. addIfNotNull(deviceNode, "Serial #: ", device.getDetails().getSerialNumber());
  12. addIfNotNull(deviceNode, "Universal Product Code: ", device.getDetails().getUpc());
  13. addIfNotNull(deviceNode, "Presentation URI: ", device.getDetails().getPresentationURI(), device);

代码示例来源:origin: 4thline/cling

  1. + " (UPnP Version: " + nodeDevice.getVersion().getMajor() + "." + nodeDevice.getVersion().getMinor() + ")"
  2. );
  3. setText(nodeDevice.getDetails().getFriendlyName());

代码示例来源:origin: kingthy/TVRemoteIME

  1. public static boolean isLocalIpAddress(Device device) {
  2. try {
  3. String addrip = device.getDetails().getBaseURL().toString();
  4. addrip = addrip.substring("http://".length(), addrip.length());
  5. addrip = addrip.substring(0, addrip.indexOf(":"));
  6. boolean ret = isLocalIpAddress(addrip);
  7. ret = false;
  8. return ret;
  9. } catch (Exception e) {
  10. e.printStackTrace();
  11. }
  12. return false;
  13. }

代码示例来源:origin: kingthy/TVRemoteIME

  1. String cleanModelNumber = null;
  2. if (getDetails() != null && getDetails().getModelDetails() != null) {
  3. ModelDetails modelDetails = getDetails().getModelDetails();
  4. if (modelDetails.getModelName() != null) {
  5. cleanModelName = modelDetails.getModelNumber() != null && modelDetails.getModelName().endsWith(modelDetails.getModelNumber())
  6. if (getDetails() != null && getDetails().getManufacturerDetails() != null) {
  7. if (cleanModelName != null && getDetails().getManufacturerDetails().getManufacturer() != null) {
  8. cleanModelName = cleanModelName.startsWith(getDetails().getManufacturerDetails().getManufacturer())
  9. ? cleanModelName.substring(getDetails().getManufacturerDetails().getManufacturer().length()).trim()
  10. : cleanModelName.trim();
  11. if (getDetails().getManufacturerDetails().getManufacturer() != null) {
  12. sb.append(getDetails().getManufacturerDetails().getManufacturer());

代码示例来源:origin: kingthy/TVRemoteIME

  1. public List<ValidationError> validate() {
  2. List<ValidationError> errors = new ArrayList();
  3. if (getType() != null) {
  4. // Only validate the graph if we have a device type - that means we validate only if there
  5. // actually is a fully hydrated graph, not just a discovered device of which we haven't even
  6. // retrieved the descriptor yet. This assumes that the descriptor will ALWAYS contain a device
  7. // type. Now that is a risky assumption...
  8. errors.addAll(getVersion().validate());
  9. if (getDetails() != null) {
  10. errors.addAll(getDetails().validate());
  11. }
  12. if (hasServices()) {
  13. for (Service service : getServices()) {
  14. if (service != null)
  15. errors.addAll(service.validate());
  16. }
  17. }
  18. if (hasEmbeddedDevices()) {
  19. for (Device embeddedDevice : getEmbeddedDevices()) {
  20. if (embeddedDevice != null)
  21. errors.addAll(embeddedDevice.validate());
  22. }
  23. }
  24. }
  25. return errors;
  26. }

代码示例来源:origin: 4thline/cling

  1. DeviceDetails deviceModelDetails = deviceModel.getDetails(info);
  2. appendNewElementIfNotNull(
  3. descriptor, deviceElement, ELEMENT.friendlyName,

相关文章