Package org.fao.geonet.kernel.harvest.harvester

Examples of org.fao.geonet.kernel.harvest.harvester.RecordInfo


    @SuppressWarnings("unchecked")
        List<Element> list = channel.getChildren();

    for (Element record :list) {
      if (!record.getName().equals("item")) continue; // skip all the other crap
      RecordInfo recInfo = getRecordInfo((Element)record.clone());
      if (recInfo != null) records.add(recInfo);
    }

    log.info("Records added to result list : "+ records.size());
View Full Code Here


      modified = new ISODate(modDate.getTime(), false).toString();
      if (modified != null && modified.length() == 0) modified = null;

      if (log.isDebugEnabled())
        log.debug("getRecordInfo: adding "+identif+" with modification date "+modified);
      return new RecordInfo(identif, modified);
        } catch (UnsupportedEncodingException e) {
            HarvestError harvestError = new HarvestError(e, log);
            harvestError.setDescription(harvestError.getDescription() + "\n record: " + Xml.getString(record));
            errors.add(harvestError);
        } catch (ParseException e) {
View Full Code Here

        String uuid       = info.getChildText("uuid");
        String schema     = info.getChildText("schema");
        String changeDate = info.getChildText("changeDate");
        String source     = info.getChildText("source");

        records.add(new RecordInfo(uuid, changeDate, schema, source));
      }
    }

    log.info("Records added to result list : "+ records.size());
View Full Code Here

      int counter = 0;

      log.debug("Extracting all elements in the csw harvesting response");
      for (Element record :list) {
                try {
            RecordInfo recInfo= getRecordInfo((Element)record.clone());

            if (recInfo != null)
              records.add(recInfo);

            counter++;
View Full Code Here

     
      String modified = dm.extractDateModified(schema, record);
      if (modified.length() == 0) modified = null;
            if(log.isDebugEnabled())
                log.debug("getRecordInfo: adding "+identif+" with modification date "+modified);
      return new RecordInfo(identif, modified);
    } catch (Exception e) {
      log.warning("Skipped record not in supported format : "+ name);
      e.printStackTrace();
    }
View Full Code Here

        String uuid       = info.getChildText("uuid");
        String schema     = info.getChildText("schema");
        String changeDate = info.getChildText("changeDate");
        String source     = info.getChildText("source");

        records.add(new RecordInfo(uuid, changeDate, schema, source));
      }
            } catch (Exception e) {
                HarvestError harvestError = new HarvestError(e, log);
                harvestError.setDescription("Malformed element '"
                        + o.toString() + "'");
View Full Code Here

TOP

Related Classes of org.fao.geonet.kernel.harvest.harvester.RecordInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.