示例#1
0
文件: Item.java 项目: roger-diaz/core
  /**
   * Queries multiple descriptor node text values. First looks in the properties, if not found it
   * executes the XPath query.
   */
  public List<String> queryDescriptorValues(String xPathQuery) {
    if (descriptorDom != null) {
      List<String> value = (List<String>) getProperty(xPathQuery);
      if (CollectionUtils.isEmpty(value)) {
        value = XmlUtils.selectNodeValues(descriptorDom, xPathQuery);
      }

      return value;
    } else {
      return Collections.emptyList();
    }
  }
示例#2
0
文件: Item.java 项目: roger-diaz/core
  /**
   * Queries a single descriptor node text value. First looks in the properties, if not found it
   * executes the XPath query.
   */
  public String queryDescriptorValue(String xPathQuery) {
    if (descriptorDom != null) {
      String value = (String) getProperty(xPathQuery);
      if (value == null) {
        value = XmlUtils.selectSingleNodeValue(descriptorDom, xPathQuery);
      }

      return value;
    } else {
      return null;
    }
  }