1 37 package org.webharvest.runtime.processors; 38 39 import org.webharvest.definition.TextDef; 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 TextProcessor extends BaseProcessor { 49 50 private TextDef textDef; 51 52 public TextProcessor(TextDef textDef) { 53 super(textDef); 54 this.textDef = textDef; 55 } 56 57 public IVariable execute(Scraper scraper, ScraperContext context) { 58 IVariable body = getBodyListContent(textDef, scraper, context); 59 return new NodeVariable(body.toText()); 60 } 61 62 } | Popular Tags |