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