org.topbraid.actions.statement
Interface IStatementAction

All Superinterfaces:
IAction
All Known Implementing Classes:
AbstractMoveStatementAction, AbstractStatementAction, AddMax1StatementAction, AssertStatementAction, ConvertObjectToBNodeAction, CreateReifiedStatementAction, DeleteReifiedStatementAction, DeleteStatementAction, ExecuteQueryAction, InferencesExplanationsStatementAction, MoveDownStatementAction, MoveUpStatementAction, ReplaceInstanceStatementAction, ViewReifiedStatementAction

public interface IStatementAction
extends IAction

An action that is applied to a given Jena Statement (triple). IStatementActions are declared using the corresponding Eclipse extension point, so that user interfaces can add the actions to drop down menus etc.

Author:
Holger Knublauch

Method Summary
 boolean isEnabledFor(com.hp.hpl.jena.rdf.model.Statement statement)
          Checks if this action is enabled for a given statement.
 boolean isVisibleFor(com.hp.hpl.jena.rdf.model.Statement statement)
          Checks if this action shall appear in a UI (drop down menu) for a given statement.
 void run(com.hp.hpl.jena.rdf.model.Statement statement)
          Executes the action for a given Statement.
 
Methods inherited from interface org.topbraid.actions.IAction
getImageMetadata, getText
 

Method Detail

isEnabledFor

boolean isEnabledFor(com.hp.hpl.jena.rdf.model.Statement statement)
Checks if this action is enabled for a given statement. This method is only called if isVisibleFor(statement) has delivered true.

Parameters:
statement - the Statement to test against
Returns:
true if this is enabled for statement

isVisibleFor

boolean isVisibleFor(com.hp.hpl.jena.rdf.model.Statement statement)
Checks if this action shall appear in a UI (drop down menu) for a given statement. Being visible does not automatically mean that the action is also enabled - it may show up in gray if a further call to isEnabledFor returns false.

Parameters:
statement - the Statement to test against
Returns:
true if this is visible for statement

run

void run(com.hp.hpl.jena.rdf.model.Statement statement)
Executes the action for a given Statement. This method is only called when the action is visible and enabled for the Statement. Typical implementation create an IChange and execute it.

Parameters:
statement - the Statement to operate on