Esempio n. 1
0
  /**
   * 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();
    }
  }
Esempio n. 2
0
  /**
   * 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;
    }
  }