Examples of harvest()


Examples of crazypants.enderio.machine.farm.farmers.TreeHarvestUtil.harvest()

      int powerStored = getStoredPower(evt.getPlayer());
   
      TreeHarvestUtil harvester = new TreeHarvestUtil();
      HarvestResult res = new HarvestResult();
      BlockCoord bc = new BlockCoord(evt.x, evt.y, evt.z);
      harvester.harvest(evt.getPlayer().worldObj, bc, res);
     
      List<BlockCoord> sortedTargets = new ArrayList<BlockCoord>(res.getHarvestedBlocks());
      harvestComparator.refPoint = bc;
      Collections.sort(sortedTargets, harvestComparator);
           
View Full Code Here

Examples of nz.govt.natlib.meta.Harvester.harvest()

            .newInstance();
        // go to it...
        LogManager.getInstance().logMessage(
            LogMessage.WORTHLESS_CHATTER,
            "Using :" + harvester.getClass().getName());
        harvester.harvest(config, source, props,
            new HarvestProgressListener());
        LogManager.getInstance().logMessage(
            LogMessage.WORTHLESS_CHATTER, "Harvesting complete");
      } catch (Exception ex) {
        LogMessage msg = new LogMessage(LogMessage.ERROR, ex, ex
View Full Code Here

Examples of nz.govt.natlib.meta.Harvester.harvest()

                // there on this machine...
      System.out.println("Output: " + outDir.getAbsolutePath());

      Harvester harvester = new POCHarvester();
      Timer.start("adapter.handle");
      harvester.harvest(config, new FileWrapper(file), null, null);
      Timer.end("adapter.handle");
    }

    Timer.report();
  }
View Full Code Here

Examples of nz.govt.natlib.meta.harvester.POCHarvester.harvest()

                // there on this machine...
      System.out.println("Output: " + outDir.getAbsolutePath());

      Harvester harvester = new POCHarvester();
      Timer.start("adapter.handle");
      harvester.harvest(config, new FileWrapper(file), null, null);
      Timer.end("adapter.handle");
    }

    Timer.report();
  }
View Full Code Here

Examples of org.fao.geonet.kernel.harvest.harvester.fragment.FragmentHarvester.harvest()

      //--- remove any previously harvested metadata/sub-templates
      deleteExistingMetadata(getUri(ds));
     
      //--- Create metadata/subtemplates from fragments
      FragmentHarvester fragmentHarvester = ds.hasNestedDatasets() ? collectionFragmentHarvester : atomicFragmentHarvester;
      HarvestSummary fragmentResult = fragmentHarvester.harvest(fragments, getUri(ds));
     
      //--- Include fragment results in thredds results
      result.fragmentsReturned += fragmentResult.fragmentsReturned;
      result.fragmentsUnknownSchema += fragmentResult.fragmentsUnknownSchema;
      result.subtemplatesAdded += fragmentResult.fragmentsAdded;
View Full Code Here

Examples of org.geotools.coverage.grid.io.StructuredGridCoverage2DReader.harvest()

            GridCoverageReader reader = info.getGridCoverageReader(null, null);
            StructuredGridCoverage2DReader sr = (StructuredGridCoverage2DReader) reader;
            // This method returns a List of the harvested files.
            final List<File> uploadedFiles = doFileUpload(method, workspace, coveragestore, format);
            // File Harvesting
            sr.harvest(null, uploadedFiles, GeoTools.getDefaultHints());
        } catch(IOException e) {
            throw new RestletException("File harvest failed", Status.SERVER_ERROR_INTERNAL, e);
        }
    }
   
View Full Code Here

Examples of org.geotools.gce.imagemosaic.ImageMosaicReader.harvest()

           
            // now add another netcdf and harvest it
            File nc2 = TestData.file(this,"polyphemus_20130302_test.nc");
            FileUtils.copyFileToDirectory(nc2, mosaic);
            File fileToHarvest = new File(mosaic, "polyphemus_20130302_test.nc");
            List<HarvestedSource> harvestSummary = reader.harvest(null, fileToHarvest, null);
            assertEquals(1, harvestSummary.size());
            HarvestedSource hf = harvestSummary.get(0);
            assertEquals("polyphemus_20130302_test.nc", ((File) hf.getSource()).getName());
            assertTrue(hf.success());
            assertEquals(1, reader.getGridCoverageNames().length);
View Full Code Here

Examples of org.geotools.gce.imagemosaic.ImageMosaicReader.harvest()

            // now replace the netcdf file with a more up to date version of the same
            File nc2 = TestData.file(this,"polyphemus_20130301_test_more_times.nc");
            File target = new File(mosaic, "polyphemus_20130301_test.nc");
            FileUtils.copyFile(nc2, target, false);
            File fileToHarvest = new File(mosaic, "polyphemus_20130301_test.nc");
            List<HarvestedSource> harvestSummary = reader.harvest(null, fileToHarvest, null);
            assertEquals(1, harvestSummary.size());
            HarvestedSource hf = harvestSummary.get(0);
            assertEquals("polyphemus_20130301_test.nc", ((File) hf.getSource()).getName());
            assertTrue(hf.success());
            assertEquals(1, reader.getGridCoverageNames().length);
View Full Code Here

Examples of org.geotools.gce.imagemosaic.ImageMosaicReader.harvest()

           
            // now add another netcdf and harvest it
            File nc2 = TestData.file(this,"polyphemus_20130301_NO2.nc");
            FileUtils.copyFileToDirectory(nc2, mosaic);
            File fileToHarvest = new File(mosaic, "polyphemus_20130301_NO2.nc");
            List<HarvestedSource> harvestSummary = reader.harvest(null, fileToHarvest, null);
            assertEquals(1, harvestSummary.size());
            HarvestedSource hf = harvestSummary.get(0);
            assertEquals("polyphemus_20130301_NO2.nc", ((File) hf.getSource()).getName());
            assertTrue(hf.success());
            // check we have two coverages now
View Full Code Here

Examples of org.geotools.gce.imagemosaic.ImageMosaicReader.harvest()

            // now add another netcdf and harvest it
            File nc2 =  TestData.file(this,"20130116.METOPA.GOME2.NO2.DUMMY.nc");
            FileUtils.copyFileToDirectory(nc2, mosaic);
            File fileToHarvest = new File(mosaic, "20130116.METOPA.GOME2.NO2.DUMMY.nc");
            List<HarvestedSource> harvestSummary = reader.harvest("NO2", fileToHarvest, null);
            assertEquals(1, harvestSummary.size());
            granules = source.getGranules(q);
            assertEquals(2, granules.size());
           
            HarvestedSource hf = harvestSummary.get(0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.