org.drools.spi
Interface Extractor

All Superinterfaces:
SemanticComponent, java.io.Serializable
All Known Implementing Classes:
ExprExtractor, ExprExtractor, ExprExtractor

public interface Extractor
extends SemanticComponent

Extracts new facts from existing facts.

Author:
bob mcwhirter
See Also:
Tuple, Declaration, Extraction

Method Summary
 java.lang.Object extractFact(Tuple tuple)
          Extract a new fact from the incoming Tuple
 Declaration[] getRequiredTupleMembers()
          Retrieve the array of Declarations required by this Extractor to perform its duties.
 

Method Detail

getRequiredTupleMembers

public Declaration[] getRequiredTupleMembers()
Retrieve the array of Declarations required by this Extractor to perform its duties.

Returns:
The array of Declarations expected on incoming Tuples.

extractFact

public java.lang.Object extractFact(Tuple tuple)
                             throws ExtractionException
Extract a new fact from the incoming Tuple

Parameters:
tuple - The source data tuple.
Returns:
The newly extract fact object.
Throws:
ExtractionException - if an error occurs during fact extraction activities.