Package org.ghost4j.analyzer
Class InkAnalyzer
- java.lang.Object
-
- org.ghost4j.AbstractComponent
-
- org.ghost4j.AbstractRemoteComponent
-
- org.ghost4j.analyzer.AbstractRemoteAnalyzer
-
- org.ghost4j.analyzer.InkAnalyzer
-
- All Implemented Interfaces:
Analyzer
,RemoteAnalyzer
,Component
public class InkAnalyzer extends AbstractRemoteAnalyzer implements Analyzer
Ink analyzer: analyze ink coverage of a document. For some reason, the API crashed when trying to analyze a document on more than one page. To prevent the crash, each page of the document is analyzed separately.
-
-
Field Summary
-
Fields inherited from class org.ghost4j.AbstractRemoteComponent
maxProcessCount, processCount
-
Fields inherited from class org.ghost4j.AbstractComponent
supportedDocumentClasses
-
-
Constructor Summary
Constructors Constructor Description InkAnalyzer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private InkAnalysisItem
analyzeSinglePage(Document page)
Performs ink analysis on a single page document.static void
main(java.lang.String[] args)
Main method used to start the analyzer in standalone 'slave mode'.private double
parseValue(java.lang.String value)
Parse a comma value to a doublejava.util.List<AnalysisItem>
run(Document document)
-
Methods inherited from class org.ghost4j.analyzer.AbstractRemoteAnalyzer
analyze, startRemoteAnalyzer
-
Methods inherited from class org.ghost4j.AbstractRemoteComponent
buildJavaFork, getMaxProcessCount, getProcessCount, getRemoteComponent, isStandAloneModeSupported, setMaxProcessCount, startRemoteServer, waitForFreeProcess
-
Methods inherited from class org.ghost4j.AbstractComponent
assertDeviceSupported, assertDocumentSupported, copySettings, extractSettings, isDeviceSupported
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ghost4j.Component
copySettings, extractSettings
-
Methods inherited from interface org.ghost4j.analyzer.RemoteAnalyzer
setMaxProcessCount
-
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws AnalyzerException
Main method used to start the analyzer in standalone 'slave mode'.- Parameters:
args
-- Throws:
AnalyzerException
-
analyzeSinglePage
private InkAnalysisItem analyzeSinglePage(Document page) throws java.io.IOException, AnalyzerException, DocumentException
Performs ink analysis on a single page document.- Parameters:
page
- Single page document- Returns:
- An AnalysisItem
- Throws:
java.io.IOException
AnalyzerException
DocumentException
-
parseValue
private double parseValue(java.lang.String value) throws java.text.ParseException
Parse a comma value to a double- Parameters:
value
- Value as String- Returns:
- a double
- Throws:
java.text.ParseException
-
run
public java.util.List<AnalysisItem> run(Document document) throws java.io.IOException, AnalyzerException, DocumentException
- Specified by:
run
in classAbstractRemoteAnalyzer
- Throws:
java.io.IOException
AnalyzerException
DocumentException
-
-