de.phleisch.app.itsucks.processing.download.http.impl
Class HtmlParser

java.lang.Object
  extended by de.phleisch.app.itsucks.processing.impl.AbstractDataProcessor
      extended by de.phleisch.app.itsucks.processing.impl.AbstractDataParser
          extended by de.phleisch.app.itsucks.processing.download.http.impl.HtmlParser
All Implemented Interfaces:
DataProcessor, org.springframework.context.ApplicationContextAware

public class HtmlParser
extends AbstractDataParser
implements org.springframework.context.ApplicationContextAware, DataProcessor


Field Summary
 
Fields inherited from class de.phleisch.app.itsucks.processing.impl.AbstractDataProcessor
mChain
 
Constructor Summary
HtmlParser()
           
 
Method Summary
 boolean canResume()
          Supports this data processor resuming?
 java.net.URI[] extractURLs(java.lang.CharSequence pData)
           
 void finish()
          Shutdown the data processor.
 void init()
          Initializes the data processor.
 boolean isConsumer()
          'Consumes' (saves, parses etc.) this processor to the data or is it only an filter?
protected  java.util.regex.Pattern[] loadPatterns(java.lang.String propertyName)
           
 boolean needsDataAsWholeChunk()
          Asks the processor if it needs the data from the data retriever in one chunk and not in multiple pieces.
 DataChunk process(DataChunk pDataChunk)
          Processes the given data chunk.
 void resumeAt(long pByteOffset)
          Resumes the processing at the given position.
 void setApplicationContext(org.springframework.context.ApplicationContext pContext)
           
 boolean supports(Job pJob)
          Returns true if this processor supports the given type of job.
 
Methods inherited from class de.phleisch.app.itsucks.processing.impl.AbstractDataProcessor
abort, getProcessorChain, rollback, setProcessorChain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.phleisch.app.itsucks.processing.DataProcessor
abort, rollback, setProcessorChain
 

Constructor Detail

HtmlParser

public HtmlParser()
Method Detail

supports

public boolean supports(Job pJob)
Description copied from interface: DataProcessor
Returns true if this processor supports the given type of job.

Specified by:
supports in interface DataProcessor
Specified by:
supports in class AbstractDataProcessor
Returns:

init

public void init()
          throws ProcessingException
Description copied from interface: DataProcessor
Initializes the data processor. (Create buffers, open file handles etc.)

Specified by:
init in interface DataProcessor
Overrides:
init in class AbstractDataProcessor
Throws:
ProcessingException

finish

public void finish()
Description copied from interface: DataProcessor
Shutdown the data processor. (Release buffers, file handles etc.)

Specified by:
finish in interface DataProcessor
Overrides:
finish in class AbstractDataProcessor

process

public DataChunk process(DataChunk pDataChunk)
Description copied from interface: DataProcessor
Processes the given data chunk.

Specified by:
process in interface DataProcessor
Returns:
The pDataChunk pointer or a new pointer to changed data.

loadPatterns

protected java.util.regex.Pattern[] loadPatterns(java.lang.String propertyName)

extractURLs

public java.net.URI[] extractURLs(java.lang.CharSequence pData)

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext pContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

needsDataAsWholeChunk

public boolean needsDataAsWholeChunk()
Description copied from interface: DataProcessor
Asks the processor if it needs the data from the data retriever in one chunk and not in multiple pieces.

Specified by:
needsDataAsWholeChunk in interface DataProcessor
Returns:

isConsumer

public boolean isConsumer()
Description copied from interface: DataProcessor
'Consumes' (saves, parses etc.) this processor to the data or is it only an filter? If an chain contains no consumer, the data is not processed.

Specified by:
isConsumer in interface DataProcessor
Returns:
true == yes

canResume

public boolean canResume()
Description copied from interface: DataProcessor
Supports this data processor resuming?

Specified by:
canResume in interface DataProcessor
Returns:
true == yes

resumeAt

public void resumeAt(long pByteOffset)
Description copied from interface: DataProcessor
Resumes the processing at the given position.

Specified by:
resumeAt in interface DataProcessor
Parameters:
pByteOffset - The offset position in bytes.


Copyright © 2008. All Rights Reserved.