Ejemplo n.º 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());
    }
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 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());
 }