コード例 #1
0
  private static void addFixitySet(SolrInputDocument doc, Collection<DcsFixity> set) {
    if (set == null || set.size() == 0) {
      return;
    }

    for (DcsFixity fix : set) {
      setadd(doc, FixityField.ALGORITHM, fix.getAlgorithm());
      setadd(doc, FixityField.VALUE, fix.getValue());
    }
  }
コード例 #2
0
  private static Set<DcsFixity> getFixitySet(SolrDocument doc) {
    Set<DcsFixity> set = new HashSet<DcsFixity>();

    String[] algs = setgetAll(doc, FixityField.ALGORITHM);
    String[] values = setgetAll(doc, FixityField.VALUE);

    for (int i = 0; i < algs.length; i++) {
      DcsFixity fix = new DcsFixity();

      fix.setAlgorithm(algs[i]);
      fix.setValue(values[i]);

      set.add(fix);
    }

    return set;
  }