Пример #1
0
  /**
   * This method takes a property URI and returns ranges of that property. If @param recursive is
   * true, it also returns the children of the domains.
   *
   * @param propertyUri
   * @param recursive
   * @return
   */
  public HashSet<String> getRangesOfProperty(String propertyUri, boolean recursive) {

    HashSet<String> results = new HashSet<String>();
    HashSet<String> direct = null;
    HashSet<String> indirect = null;

    direct = ontCache.getPropertyDirectRanges().get(propertyUri);
    if (direct != null) results.addAll(direct);
    if (recursive) indirect = ontCache.getPropertyIndirectRanges().get(propertyUri);
    if (indirect != null) results.addAll(indirect);

    return results;
  }