org.drools.semantics.java
Class ExprExtractor

java.lang.Object
  |
  +--org.drools.semantics.java.Interp
        |
        +--org.drools.semantics.java.Expr
              |
              +--org.drools.semantics.java.ExprExtractor
All Implemented Interfaces:
ConfigurableExtractor, Extractor, SemanticComponent

public class ExprExtractor
extends Expr
implements ConfigurableExtractor

Java expression semantics Extractor.

Version:
$Id: ExprExtractor.java,v 1.7 2002/08/21 05:46:13 bob Exp $
Author:
bob@werken.com

Constructor Summary
ExprExtractor()
          Construct, partially.
ExprExtractor(java.lang.String expr, Declaration[] availDecls)
          Construct.
 
Method Summary
 java.lang.Object extractFact(Tuple tuple)
          Extract a new fact from the incoming Tuple
 java.lang.String toString()
          Produce a debug string.
 
Methods inherited from class org.drools.semantics.java.Expr
configure, getExpression, getRequiredTupleMembers, setExpression
 
Methods inherited from class org.drools.semantics.java.Interp
evaluate, evaluate, getText, setText, setUpNameSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.smf.ConfigurableExtractor
configure
 
Methods inherited from interface org.drools.spi.Extractor
getRequiredTupleMembers
 

Constructor Detail

ExprExtractor

public ExprExtractor()
Construct, partially.
See Also:
Expr.configure(java.lang.String, org.drools.rule.Declaration[])

ExprExtractor

public ExprExtractor(java.lang.String expr,
                     Declaration[] availDecls)
              throws ConfigurationException
Construct.
Parameters:
expr - The expression.
availDecls - The available declarations.
Throws:
ConfigurationException - If an error occurs while attempting to perform configuration.
Method Detail

extractFact

public java.lang.Object extractFact(Tuple tuple)
                             throws ExtractionException
Extract a new fact from the incoming Tuple
Specified by:
extractFact in interface Extractor
Parameters:
tuple - The source data tuple.
Returns:
The newly extract fact object.
Throws:
ExtractionException - if an error occurs during fact extraction activities.

toString

public java.lang.String toString()
Produce a debug string.
Overrides:
toString in class java.lang.Object
Returns:
The debug string.


Copyright © 2001-2003 The Werken Company. All Rights Reserved.