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

    for (SeadPerson creator : set) {
      setadd(doc, SeadSolrField.CreatorField.CREATORID, creator.getId());
      setadd(doc, SeadSolrField.CreatorField.CREATORIDTYPE, creator.getIdType());
      setadd(doc, SeadSolrField.CreatorField.NAME, creator.getName());
    }
  }
コード例 #2
0
  private static SeadPerson getSubmitter(SolrDocument doc) {
    SeadPerson submitter = new SeadPerson();

    String name = getFirst(doc, SeadSolrField.SubmitterField.NAME);
    String id = getFirst(doc, SeadSolrField.SubmitterField.SUBMITTERID);
    String type = getFirst(doc, SeadSolrField.SubmitterField.SUBMITTERIDTYPE);
    submitter.setName(name);
    submitter.setId(id);
    submitter.setIdType(type);

    return submitter;
  }
コード例 #3
0
  private static Set<SeadPerson> getCreatorSet(SolrDocument doc) {
    Set<SeadPerson> set = new HashSet<SeadPerson>();

    String[] names = setgetAll(doc, SeadSolrField.CreatorField.NAME);
    String[] ids = setgetAll(doc, SeadSolrField.CreatorField.CREATORID);
    String[] types = setgetAll(doc, SeadSolrField.CreatorField.CREATORIDTYPE);

    for (int i = 0; i < names.length; i++) {
      SeadPerson cr = new SeadPerson();

      cr.setName(names[i]);
      cr.setId(ids[i]);
      cr.setIdType(types[i]);

      set.add(cr);
    }

    return set;
  }
コード例 #4
0
 private static void addSubmitter(SolrInputDocument doc, SeadPerson submitter) {
   add(doc, SeadSolrField.SubmitterField.NAME, submitter.getName());
   add(doc, SeadSolrField.SubmitterField.SUBMITTERID, submitter.getId());
   add(doc, SeadSolrField.SubmitterField.SUBMITTERIDTYPE, submitter.getIdType());
 }