Package org.apache.tika.example
Class ImportContextImpl
java.lang.Object
org.apache.tika.example.ImportContextImpl
- All Implemented Interfaces:
org.apache.jackrabbit.server.io.ImportContext
,org.apache.jackrabbit.server.io.IOContext
public class ImportContextImpl
extends Object
implements org.apache.jackrabbit.server.io.ImportContext
ImportContextImpl
...-
Constructor Summary
ConstructorDescriptionImportContextImpl
(javax.jcr.Item importRoot, String systemId, org.apache.jackrabbit.webdav.io.InputContext ctx, InputStream stream, org.apache.jackrabbit.server.io.IOListener ioListener, Detector detector) Creates a new item import context. -
Method Summary
Modifier and TypeMethodDescriptionlong
javax.jcr.Item
Returns a newInputStream
to the temporary file created during instanciation ornull
, if this context does not provide a stream.org.apache.jackrabbit.server.io.IOListener
long
getProperty
(Object propertyName) boolean
void
informCompleted
(boolean success) boolean
-
Constructor Details
-
ImportContextImpl
public ImportContextImpl(javax.jcr.Item importRoot, String systemId, org.apache.jackrabbit.webdav.io.InputContext ctx, InputStream stream, org.apache.jackrabbit.server.io.IOListener ioListener, Detector detector) throws IOException Creates a new item import context. The specified InputStream is written to a temporary file in order to avoid problems with multiple IOHandlers that try to run the import but fail. The temporary file is deleted as soon as this context is informed that the import has been completed and it will not be used any more.- Parameters:
importRoot
-systemId
-ctx
- input context, ornull
stream
- document input stream, ornull
ioListener
-detector
- content type detector- Throws:
IOException
- See Also:
-
IOContext.informCompleted(boolean)
-
-
Method Details
-
getIOListener
public org.apache.jackrabbit.server.io.IOListener getIOListener()- Specified by:
getIOListener
in interfaceorg.apache.jackrabbit.server.io.IOContext
- See Also:
-
IOContext.getIOListener()
-
getImportRoot
public javax.jcr.Item getImportRoot()- Specified by:
getImportRoot
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getImportRoot()
-
hasStream
public boolean hasStream()- Specified by:
hasStream
in interfaceorg.apache.jackrabbit.server.io.IOContext
- See Also:
-
IOContext.hasStream()
-
getInputStream
Returns a newInputStream
to the temporary file created during instanciation ornull
, if this context does not provide a stream.- Specified by:
getInputStream
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getInputStream()
hasStream()
-
getSystemId
- Specified by:
getSystemId
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getSystemId()
-
getModificationTime
public long getModificationTime()- Specified by:
getModificationTime
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getModificationTime()
-
getContentLanguage
- Specified by:
getContentLanguage
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getContentLanguage()
-
getContentLength
public long getContentLength()- Specified by:
getContentLength
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getContentLength()
-
getMimeType
- Specified by:
getMimeType
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getMimeType()
-
getEncoding
- Specified by:
getEncoding
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getEncoding()
-
getProperty
- Specified by:
getProperty
in interfaceorg.apache.jackrabbit.server.io.ImportContext
- See Also:
-
ImportContext.getProperty(Object)
-
informCompleted
public void informCompleted(boolean success) - Specified by:
informCompleted
in interfaceorg.apache.jackrabbit.server.io.IOContext
- See Also:
-
IOContext.informCompleted(boolean)
-
isCompleted
public boolean isCompleted()- Specified by:
isCompleted
in interfaceorg.apache.jackrabbit.server.io.IOContext
- See Also:
-
IOContext.isCompleted()
-