org.topbraid.rules.swrl
Class SWRLRowEditorDriver

java.lang.Object
  extended by org.topbraid.rules.swrl.SWRLRowEditorDriver
All Implemented Interfaces:
IRowEditorDriver

public class SWRLRowEditorDriver
extends java.lang.Object
implements IRowEditorDriver


Constructor Summary
SWRLRowEditorDriver()
           
 
Method Summary
 com.hp.hpl.jena.rdf.model.RDFNode createObject(java.lang.String text, com.hp.hpl.jena.rdf.model.Statement s)
          Creates a new object from a given user input, to replace a given statement.
 java.lang.String getError(java.lang.String text, com.hp.hpl.jena.rdf.model.Statement s)
          Checks if a given user input is valid, and returns an error message if not.
 boolean isResponsibleForDisplay(com.hp.hpl.jena.rdf.model.Statement s)
          Checks if this driver assumes responsibility for a given Statement.
 boolean isResponsibleForEditing(java.lang.String text, com.hp.hpl.jena.rdf.model.Statement s)
          Checks if this driver assumes responsibility for control editing and error checking a given text and Statement combination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWRLRowEditorDriver

public SWRLRowEditorDriver()
Method Detail

createObject

public com.hp.hpl.jena.rdf.model.RDFNode createObject(java.lang.String text,
                                                      com.hp.hpl.jena.rdf.model.Statement s)
Description copied from interface: IRowEditorDriver
Creates a new object from a given user input, to replace a given statement. This method is called to create the new value when the user is assigning a value in a row editor. For example, in the SWRL editor, this would return a new swrl:Imp and add its depending triples to the model.

Specified by:
createObject in interface IRowEditorDriver
Parameters:
text - the user input
s - the existing Statement
Returns:
a new RDFNode

getError

public java.lang.String getError(java.lang.String text,
                                 com.hp.hpl.jena.rdf.model.Statement s)
Description copied from interface: IRowEditorDriver
Checks if a given user input is valid, and returns an error message if not.

Specified by:
getError in interface IRowEditorDriver
Parameters:
text - the text to verify
s - the existing Statement that is being edited (may have null object)
Returns:
an error message or null

isResponsibleForDisplay

public boolean isResponsibleForDisplay(com.hp.hpl.jena.rdf.model.Statement s)
Description copied from interface: IRowEditorDriver
Checks if this driver assumes responsibility for a given Statement. If yes, then this will be called to update style ranges.

Specified by:
isResponsibleForDisplay in interface IRowEditorDriver
Parameters:
s - the Statement (may have null object)
Returns:
true if this driver is responsible for displaying the given statement

isResponsibleForEditing

public boolean isResponsibleForEditing(java.lang.String text,
                                       com.hp.hpl.jena.rdf.model.Statement s)
Description copied from interface: IRowEditorDriver
Checks if this driver assumes responsibility for control editing and error checking a given text and Statement combination. If this takes responsibility then it will be asked to check errors, and to generate the new object value.

Specified by:
isResponsibleForEditing in interface IRowEditorDriver
Parameters:
text - the current text entered by the user
s - the old Statement (may have a null object)
Returns:
true if this takes responsibility