Package com.levigo.jadice.server.xml
Class PlaintextToXMLWorker
- java.lang.Object
-
- com.levigo.jadice.server.core.NodeWorker<T>
-
- com.levigo.jadice.server.core.StreamWorker<PlaintextToXMLNode>
-
- com.levigo.jadice.server.xml.PlaintextToXMLWorker
-
- All Implemented Interfaces:
QualifiedLogEventReceiver
,WorkerController<PlaintextToXMLNode>
,Runnable
public class PlaintextToXMLWorker extends StreamWorker<PlaintextToXMLNode>
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAMESPACE_URI
-
Constructor Summary
Constructors Constructor Description PlaintextToXMLWorker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
determineCharsetName(com.levigo.jadice.document.io.SeekableInputStream sis, MimeType type, String defaultCharset)
protected Charset
fetchCharsetInformation(Stream stream, MimeType type)
static void
setTikaEncodingCheckActive(String tikaEncodingCheckActive)
protected void
work(Stream stream)
Implement this method in order to work on a single stream.-
Methods inherited from class com.levigo.jadice.server.core.StreamWorker
accept, reject, work
-
Methods inherited from class com.levigo.jadice.server.core.NodeWorker
abort, abortNow, addInputBundle, addOutputBundle, doAbort, doAbortNow, error, error, error, fail, fail, fail, getController, getInputBundle, getInputBundles, getJob, getLimitSupport, getNode, getOutputBundle, getOutputBundles, getServerJob, getState, getStreamTransportFactory, getTransportSender, initialize, isAbortRequested, postWork, preWork, run, setDescriptor, setJob, toString, warn, warn, warn
-
-
-
-
Field Detail
-
NAMESPACE_URI
public static final String NAMESPACE_URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
work
protected void work(Stream stream) throws Throwable
Description copied from class:StreamWorker
Implement this method in order to work on a single stream.- Specified by:
work
in classStreamWorker<PlaintextToXMLNode>
- Parameters:
stream
- theStream
to work on- Throws:
Throwable
- in case of processing failure
-
fetchCharsetInformation
protected Charset fetchCharsetInformation(Stream stream, MimeType type) throws IOException
- Throws:
IOException
-
determineCharsetName
protected String determineCharsetName(com.levigo.jadice.document.io.SeekableInputStream sis, MimeType type, String defaultCharset) throws IOException
- Throws:
IOException
-
setTikaEncodingCheckActive
public static void setTikaEncodingCheckActive(String tikaEncodingCheckActive)
-
-