org.semanticdesktop.aperture.subcrawler.compress
Class CompressSubCrawler

java.lang.Object
  extended by org.semanticdesktop.aperture.subcrawler.base.AbstractSubCrawler
      extended by org.semanticdesktop.aperture.subcrawler.base.AbstractCompressorSubCrawler
          extended by org.semanticdesktop.aperture.subcrawler.compress.CompressSubCrawler
All Implemented Interfaces:
SubCrawler

public class CompressSubCrawler
extends AbstractCompressorSubCrawler

A SubCrawler Implementation working with GZIP archives.


Constructor Summary
CompressSubCrawler()
           
 
Method Summary
protected  URI getContentUri(URI archiveUri)
          Returns the uri of the content file, this method is supposed to strip the compressor-specific suffix (like .gz or .bz2).
protected  InputStream getUncompressedStream(InputStream stream)
          Returns a stream that uncompresses the data
 String getUriPrefix()
          Returns the prefix used when generating uris.
 
Methods inherited from class org.semanticdesktop.aperture.subcrawler.base.AbstractCompressorSubCrawler
stopSubCrawler, subCrawl
 
Methods inherited from class org.semanticdesktop.aperture.subcrawler.base.AbstractSubCrawler
createChildUri, getDataObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompressSubCrawler

public CompressSubCrawler()
Method Detail

getUncompressedStream

protected InputStream getUncompressedStream(InputStream stream)
                                     throws IOException
Description copied from class: AbstractCompressorSubCrawler
Returns a stream that uncompresses the data

Specified by:
getUncompressedStream in class AbstractCompressorSubCrawler
Parameters:
stream - InputStream with the compressed data
Returns:
stream with the uncompressed data
Throws:
IOException

getContentUri

protected URI getContentUri(URI archiveUri)
Description copied from class: AbstractCompressorSubCrawler
Returns the uri of the content file, this method is supposed to strip the compressor-specific suffix (like .gz or .bz2). It is meant to be overridden by the concrete compressor subcrawler subclasses.

Overrides:
getContentUri in class AbstractCompressorSubCrawler
Parameters:
archiveUri - the uri of the archive
Returns:
the uri of the compressed file content

getUriPrefix

public String getUriPrefix()
Description copied from class: AbstractSubCrawler
Returns the prefix used when generating uris. See the documentation for SubCrawler class for more details.

Specified by:
getUriPrefix in class AbstractSubCrawler
Returns:
the prefix used when generating uris.


Copyright © 2010 Aperture Development Team. All Rights Reserved.