SMILA 1.0 API documentation

org.eclipse.smila.connectivity.framework.compound.impl
Class CompoundManagerImpl

java.lang.Object
  extended by org.eclipse.smila.connectivity.framework.compound.impl.CompoundManagerImpl
All Implemented Interfaces:
CompoundManager

public class CompoundManagerImpl
extends java.lang.Object
implements CompoundManager

Basic Implementation of a CompoundManager.


Constructor Summary
CompoundManagerImpl()
          Default Constructor.
 
Method Summary
 Record adaptCompoundRecord(Record record, DataSourceConnectionConfig config)
          Adapts the input record according to the given configuration.
 void addCompoundHandler(CompoundHandler compoundHandler)
          Adds a CompoundHandler to the internal List of CompoundHandler.
 Crawler extract(Record record, DataSourceConnectionConfig config)
          * Extracts the elements of the given record and returns a Crawler over the extracted elements.
 boolean isCompound(Record record, DataSourceConnectionConfig config)
          Checks if a record is a compound object.
 void removeCompoundHandler(CompoundHandler compoundHandler)
          Removes a CompoundHandler from the internal List of CompoundHandler.
 void setMimeTypeIdentifier(MimeTypeIdentifier mimeTypeIdentifier)
          Sets the MimeTypeIdentifier.
 void unsetMimeTypeIdentifier(MimeTypeIdentifier mimeTypeIdentifier)
          Set the MimeTypeIdentifier to null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundManagerImpl

public CompoundManagerImpl()
Default Constructor.

Method Detail

addCompoundHandler

public void addCompoundHandler(CompoundHandler compoundHandler)
Adds a CompoundHandler to the internal List of CompoundHandler. Used by OSGi Declarative Services.

Parameters:
compoundHandler - the crawler FactoryComponent to add

removeCompoundHandler

public void removeCompoundHandler(CompoundHandler compoundHandler)
Removes a CompoundHandler from the internal List of CompoundHandler. Used by OSGi Declarative Services.

Parameters:
compoundHandler - the crawler FactoryComponent to remove

setMimeTypeIdentifier

public void setMimeTypeIdentifier(MimeTypeIdentifier mimeTypeIdentifier)
Sets the MimeTypeIdentifier. Used by OSGi Declarative Services.

Parameters:
mimeTypeIdentifier - the mimeTypeIdentifier to set

unsetMimeTypeIdentifier

public void unsetMimeTypeIdentifier(MimeTypeIdentifier mimeTypeIdentifier)
Set the MimeTypeIdentifier to null. Used by OSGi Declarative Services.

Parameters:
mimeTypeIdentifier - the mimeTypeIdentifier to unset

isCompound

public boolean isCompound(Record record,
                          DataSourceConnectionConfig config)
                   throws CompoundException
Checks if a record is a compound object.

Specified by:
isCompound in interface CompoundManager
Parameters:
record - the Record
config - the DataSourceConnectionConfig
Returns:
true if the record is a compound object and is extractable by this CompoundManager, false otherwise
Throws:
CompoundException - if any error occurs
See Also:
CompoundManager.isCompound(Record, DataSourceConnectionConfig)

extract

public Crawler extract(Record record,
                       DataSourceConnectionConfig config)
                throws CompoundException
* Extracts the elements of the given record and returns a Crawler over the extracted elements.

Specified by:
extract in interface CompoundManager
Parameters:
record - the Record
config - the DataSourceConnectionConfig
Returns:
a Crawler interface over the extracted elements
Throws:
CompoundException - if any error occurs
See Also:
CompoundManager.extract(Record, DataSourceConnectionConfig)

adaptCompoundRecord

public Record adaptCompoundRecord(Record record,
                                  DataSourceConnectionConfig config)
                           throws CompoundException
Adapts the input record according to the given configuration. The record may be left unmodified, modified or even set to null.

Specified by:
adaptCompoundRecord in interface CompoundManager
Parameters:
record - the Record
config - the DataSourceConnectionConfig
Returns:
the adapted record
Throws:
CompoundException - if any error occurs
See Also:
CompoundManager.adaptCompoundRecord(Record, DataSourceConnectionConfig)

SMILA 1.0 API documentation