Example #1
0
  /**
   * Prints all records.
   *
   * @param records records to print
   * @param more <code>true</code> if more info will be printed after that section
   */
  @Override
  protected void printRecords(IFeedRecords records, boolean more) {
    int numberOfHits = records.getOpenSearchProperties().getNumberOfHits();
    int counter = 0;

    this.dcatSchemas =
        ApplicationContext.getInstance()
            .getConfiguration()
            .getCatalogConfiguration()
            .getDcatSchemas();
    LOGGER.info("Beginning processing " + numberOfHits + " DCAT records...");
    for (int i = 0; i < records.size(); i++) {
      IFeedRecord record = records.get(i);
      Envelope envelope = record.getEnvelope();
      printRecord(record, envelope, i < records.size() - 1);

      if ((++counter) % 1000 == 0) {
        LOGGER.info(
            "Processed "
                + counter
                + "/"
                + numberOfHits
                + " DCAT records ("
                + (100 * counter) / numberOfHits
                + "%)");
      }
    }
  }