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

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

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

Device.getVersion介绍

暂无

代码示例

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

protected void generateSpecVersion(Namespace namespace, Device deviceModel, Document descriptor, Element rootElement) {
  Element specVersionElement = appendNewElement(descriptor, rootElement, ELEMENT.specVersion);
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.major, deviceModel.getVersion().getMajor());
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.minor, deviceModel.getVersion().getMinor());
}

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

private void generateSpecVersion(Service serviceModel, Document descriptor, Element rootElement) {
  Element specVersionElement = appendNewElement(descriptor, rootElement, ELEMENT.specVersion);
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.major, serviceModel.getDevice().getVersion().getMajor());
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.minor, serviceModel.getDevice().getVersion().getMinor());
}

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

public List<ValidationError> validate() {
  List<ValidationError> errors = new ArrayList<>();
  if (getType() != null) {
    // Only validate the graph if we have a device type - that means we validate only if there
    // actually is a fully hydrated graph, not just a discovered device of which we haven't even
    // retrieved the descriptor yet. This assumes that the descriptor will ALWAYS contain a device
    // type. Now that is a risky assumption...
    errors.addAll(getVersion().validate());
    
    if(getIdentity() != null) {
      errors.addAll(getIdentity().validate());
    }
    if (getDetails() != null) {
      errors.addAll(getDetails().validate());
    }
    if (hasServices()) {
      for (Service service : getServices()) {
        if (service != null)
          errors.addAll(service.validate());
      }
    }
    if (hasEmbeddedDevices()) {
      for (Device embeddedDevice : getEmbeddedDevices()) {
        if (embeddedDevice != null)
          errors.addAll(embeddedDevice.validate());
      }
    }
  }
  return errors;
}

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

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

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

protected void generateSpecVersion(Namespace namespace, Device deviceModel, Document descriptor, Element rootElement) {
  Element specVersionElement = appendNewElement(descriptor, rootElement, ELEMENT.specVersion);
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.major, deviceModel.getVersion().getMajor());
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.minor, deviceModel.getVersion().getMinor());
}

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

private void generateSpecVersion(Service serviceModel, Document descriptor, Element rootElement) {
  Element specVersionElement = appendNewElement(descriptor, rootElement, ELEMENT.specVersion);
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.major, serviceModel.getDevice().getVersion().getMajor());
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.minor, serviceModel.getDevice().getVersion().getMinor());
}

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

public List<ValidationError> validate() {
  List<ValidationError> errors = new ArrayList();
  if (getType() != null) {
    // Only validate the graph if we have a device type - that means we validate only if there
    // actually is a fully hydrated graph, not just a discovered device of which we haven't even
    // retrieved the descriptor yet. This assumes that the descriptor will ALWAYS contain a device
    // type. Now that is a risky assumption...
    errors.addAll(getVersion().validate());
    if (getDetails() != null) {
      errors.addAll(getDetails().validate());
    }
    if (hasServices()) {
      for (Service service : getServices()) {
        if (service != null)
          errors.addAll(service.validate());
      }
    }
    if (hasEmbeddedDevices()) {
      for (Device embeddedDevice : getEmbeddedDevices()) {
        if (embeddedDevice != null)
          errors.addAll(embeddedDevice.validate());
      }
    }
  }
  return errors;
}

代码示例来源:origin: org.fourthline.cling/cling-core

protected void generateSpecVersion(Namespace namespace, Device deviceModel, Document descriptor, Element rootElement) {
  Element specVersionElement = appendNewElement(descriptor, rootElement, ELEMENT.specVersion);
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.major, deviceModel.getVersion().getMajor());
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.minor, deviceModel.getVersion().getMinor());
}

代码示例来源:origin: org.fourthline.cling/cling-core

private void generateSpecVersion(Service serviceModel, Document descriptor, Element rootElement) {
  Element specVersionElement = appendNewElement(descriptor, rootElement, ELEMENT.specVersion);
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.major, serviceModel.getDevice().getVersion().getMajor());
  appendNewElementIfNotNull(descriptor, specVersionElement, ELEMENT.minor, serviceModel.getDevice().getVersion().getMinor());
}

代码示例来源:origin: org.fourthline.cling/cling-core

public List<ValidationError> validate() {
  List<ValidationError> errors = new ArrayList<>();
  if (getType() != null) {
    // Only validate the graph if we have a device type - that means we validate only if there
    // actually is a fully hydrated graph, not just a discovered device of which we haven't even
    // retrieved the descriptor yet. This assumes that the descriptor will ALWAYS contain a device
    // type. Now that is a risky assumption...
    errors.addAll(getVersion().validate());
    
    if(getIdentity() != null) {
      errors.addAll(getIdentity().validate());
    }
    if (getDetails() != null) {
      errors.addAll(getDetails().validate());
    }
    if (hasServices()) {
      for (Service service : getServices()) {
        if (service != null)
          errors.addAll(service.validate());
      }
    }
    if (hasEmbeddedDevices()) {
      for (Device embeddedDevice : getEmbeddedDevices()) {
        if (embeddedDevice != null)
          errors.addAll(embeddedDevice.validate());
      }
    }
  }
  return errors;
}

相关文章