Пример #1
0
  /** Add all vocabulary items from all declaring classes. */
  private void addAllDecls() {

    for (VocabularyDecl decl : decls) {

      final Iterator<URI> itr = decl.values();

      while (itr.hasNext()) {

        // Convert to BigdataValues when adding to the collection.
        final BigdataValue value = valueFactory.asValue(itr.next());

        // Add to the collection.
        if (val2iv.put(value, value) != null) {

          /*
           * This has already been declared by some vocabulary. There
           * is no harm in this, but the vocabularies should be
           * distinct.
           */

          log.warn("Duplicate declaration: " + value);

        } else {

          if (log.isDebugEnabled()) log.debug(decl.getClass().getName() + ":" + value);
        }
      }
    }
  }