1 37 package org.webharvest.runtime.processors; 38 39 import org.webharvest.definition.FunctionDef; 40 import org.webharvest.runtime.Scraper; 41 import org.webharvest.runtime.ScraperContext; 42 import org.webharvest.runtime.variables.EmptyVariable; 43 import org.webharvest.runtime.variables.IVariable; 44 45 48 public class FunctionProcessor extends BaseProcessor { 49 50 private FunctionDef functionDef; 51 52 public FunctionProcessor(FunctionDef functionDef) { 53 super(functionDef); 54 this.functionDef = functionDef; 55 } 56 57 public IVariable execute(Scraper scraper, ScraperContext context) { 58 scraper.getConfiguration().addFunctionDef( functionDef ); 59 60 return new EmptyVariable(); 61 } 62 63 } | Popular Tags |