poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yegor Kozlov <ye...@dinom.ru>
Subject Re[2]: Moving POIDocument out of scratchpad?
Date Thu, 20 Sep 2007 07:52:06 GMT
> While I'm on the subject of getting my own codebase down in size, what do
> people think about a POI text extractor for hssf? We currently have a text
> extractor for hslf, hwpf and hdgf. For hssf, everyone's forced to write
> their own based on hssf.dev.HSSF, so having a common one as standard might
> be handy for users. What do we all think?

I don't mind having a common HSSF text extractor.

If text extraction is a common task it makes sense to create a superclass or interface for
it.
For instance, the user code might look something like this:

TextExtractor extractor = new HSSFTextExtractor(workbook); //or new HSLFTextExtractor(slideshow)
or whatever

Iterator it = extractor.textIterator();
while(it.hasNext()){
  String txt = (String)it.next();
  //process the text 
}  


Yegor




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message