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 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, or null
      stream - document input stream, or null
      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 interface org.apache.jackrabbit.server.io.IOContext
      See Also:
      • IOContext.getIOListener()
    • getImportRoot

      public javax.jcr.Item getImportRoot()
      Specified by:
      getImportRoot in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
      • ImportContext.getImportRoot()
    • hasStream

      public boolean hasStream()
      Specified by:
      hasStream in interface org.apache.jackrabbit.server.io.IOContext
      See Also:
      • IOContext.hasStream()
    • getInputStream

      public InputStream getInputStream()
      Returns a new InputStream to the temporary file created during instanciation or null, if this context does not provide a stream.
      Specified by:
      getInputStream in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
    • getSystemId

      public String getSystemId()
      Specified by:
      getSystemId in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
      • ImportContext.getSystemId()
    • getModificationTime

      public long getModificationTime()
      Specified by:
      getModificationTime in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
      • ImportContext.getModificationTime()
    • getContentLanguage

      public String getContentLanguage()
      Specified by:
      getContentLanguage in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
      • ImportContext.getContentLanguage()
    • getContentLength

      public long getContentLength()
      Specified by:
      getContentLength in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
      • ImportContext.getContentLength()
    • getMimeType

      public String getMimeType()
      Specified by:
      getMimeType in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
      • ImportContext.getMimeType()
    • getEncoding

      public String getEncoding()
      Specified by:
      getEncoding in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
      • ImportContext.getEncoding()
    • getProperty

      public Object getProperty(Object propertyName)
      Specified by:
      getProperty in interface org.apache.jackrabbit.server.io.ImportContext
      See Also:
      • ImportContext.getProperty(Object)
    • informCompleted

      public void informCompleted(boolean success)
      Specified by:
      informCompleted in interface org.apache.jackrabbit.server.io.IOContext
      See Also:
      • IOContext.informCompleted(boolean)
    • isCompleted

      public boolean isCompleted()
      Specified by:
      isCompleted in interface org.apache.jackrabbit.server.io.IOContext
      See Also:
      • IOContext.isCompleted()