Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.openfuxml.addon.wiki.processor.net;
 
 import java.io.File;
 
 import  net.sf.exlp.util.io.txt.ExlpTxtWriter;
 
 import  org.openfuxml.addon.wiki.data.jaxb.Category;
 import  org.openfuxml.addon.wiki.data.jaxb.Content;
 import  org.openfuxml.addon.wiki.data.jaxb.Page;
import  org.slf4j.Logger;
import  org.slf4j.LoggerFactory;
public class WikiContentFetcher extends AbstractWikiProcessor implements WikiProcessor
	final static Logger logger = LoggerFactory.getLogger(WikiContentFetcher.class);
	private WikiBotFactory wbf;
	private ExlpTxtWriter txtWriter;
	{
		this.=wbf;
		 = new ExlpTxtWriter();
	}
	public void setDirectories(File srcDirFile dstDir)
	{
		super.setDirectories(srcDirdstDir);
		.setDirName(dstDir.getAbsolutePath());
	}
	protected void processPage(Content content)
	{
		.clear();
		Page page = content.getPage();
		page.setFile(WikiContentIO.getFileFromSource(content.getSource()));
		.setFileName(page.getFile()+".txt");
		wpf.fetchText(page.getName());
	}
	protected void processCategory(Content content)
	{
		Category category = content.getCategory();
		wcf.fetchCategory(category.getName());
		wcf.setTargetFilePrefix(WikiContentIO.getFileFromSource(content.getSource(), ""));
		wcf.fetchArticles(,category);
	}
New to GrepCode? Check out our FAQ X