示例#1
0
  @Override
  public List<Record> search(Context context, String title, String author, int year)
      throws HttpException, IOException {
    if (appId == null) {
      throw new RuntimeException("No CiNii Application ID is specified!");
    }

    return ciniiService.searchByTerm(title, author, year, getMaxResults(), getAppId());
  }
示例#2
0
  @Override
  public List<Record> getByIdentifier(Context context, Map<String, Set<String>> keys)
      throws HttpException, IOException {
    if (appId == null) {
      throw new RuntimeException("No CiNii Application ID is specified!");
    }

    List<Record> results = new ArrayList<Record>();
    if (keys != null) {
      Set<String> ciniiids = keys.get(CINII);
      if (ciniiids != null && ciniiids.size() > 0) {
        for (String ciniiid : ciniiids) {
          Record record = ciniiService.getByCiNiiID(ciniiid, getAppId());
          if (record != null) {
            results.add(convertFields(record));
          }
        }
      }
    }
    return results;
  }