org.deri.wsmo4j.rule
Class UpdateRI

java.lang.Object
  extended by org.deri.wsmo4j.rule.AbstractUpdateRule
      extended by org.deri.wsmo4j.rule.UpdateRI
All Implemented Interfaces:
ChoreographyRule, Rule, Update, UpdateRule

public class UpdateRI
extends AbstractUpdateRule
implements Update

Reference implementation for the Update rule.

        Created on Jul 26, 2005
       Committed by $Author: vassil_momtchev $
       $Source$
 

Version:
$Revision: 1844 $ $Date: 2006-10-24 17:11:48 +0300 (Tue, 24 Oct 2006) $
Author:
Thomas Haselwanter, James Scicluna

Field Summary
protected  CompoundFact oldFact
           
 
Fields inherited from class org.deri.wsmo4j.rule.AbstractUpdateRule
fact
 
Constructor Summary
UpdateRI(CompoundFact newFact)
           
UpdateRI(CompoundFact newFact, CompoundFact oldFact)
           
 
Method Summary
 void accept(Visitor visitor)
          Acceptor method for the Visitor.
 CompoundFact getNewFact()
          Returns the new fact defined by the update rule.
 CompoundFact getOldFact()
          Returns the old fact defined by the update rule.
 void setNewFact(CompoundFact newFact)
          Sets the new fact associated with the update rule.
 void setOldFact(CompoundFact oldFact)
          Sets the old fact associated with the update rule.
 String toString()
           
 String toString(org.wsmo.common.TopEntity te)
          Returns a string representation of the Rule.
 
Methods inherited from class org.deri.wsmo4j.rule.AbstractUpdateRule
getFact, setFact
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.wsmo.service.rule.UpdateRule
getFact, setFact
 

Field Detail

oldFact

protected CompoundFact oldFact
Constructor Detail

UpdateRI

public UpdateRI(CompoundFact newFact)

UpdateRI

public UpdateRI(CompoundFact newFact,
                CompoundFact oldFact)
         throws org.wsmo.common.exception.InvalidModelException
Parameters:
newFact - A CompoundFact object defining the new fact of the update rule.
oldFact - A CompoundFact object defining the old fact of the update rule.
Throws:
org.wsmo.common.exception.InvalidModelException
Method Detail

setOldFact

public void setOldFact(CompoundFact oldFact)
Description copied from interface: Update
Sets the old fact associated with the update rule.

Specified by:
setOldFact in interface Update
Parameters:
oldFact - A CompoundFact object representing the old fact to be deleted from the knowledge base

getOldFact

public CompoundFact getOldFact()
Description copied from interface: Update
Returns the old fact defined by the update rule.

Specified by:
getOldFact in interface Update
Returns:
A CompoundFact object representing the old fact to be deleted from the knowledge base

setNewFact

public void setNewFact(CompoundFact newFact)
Description copied from interface: Update
Sets the new fact associated with the update rule.

Specified by:
setNewFact in interface Update
Parameters:
newFact - A CompoundFact object representing the new fact to be added to the knowledge base

getNewFact

public CompoundFact getNewFact()
Description copied from interface: Update
Returns the new fact defined by the update rule.

Specified by:
getNewFact in interface Update
Returns:
A CompoundFact object representing the new fact to be added to the knowledge base

accept

public void accept(Visitor visitor)
Description copied from interface: Rule
Acceptor method for the Visitor.

Specified by:
accept in interface Rule
Parameters:
visitor - Rule-Visitor object

toString

public String toString(org.wsmo.common.TopEntity te)
Description copied from interface: Rule
Returns a string representation of the Rule.

Specified by:
toString in interface Rule
Returns:
String representing the rule object.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.