org.topbraid.change
Class DeleteStatementsChange

java.lang.Object
  extended by org.topbraid.core.change.AbstractChange
      extended by org.topbraid.change.DeleteStatementsChange
All Implemented Interfaces:
IChange

public class DeleteStatementsChange
extends AbstractChange


Constructor Summary
DeleteStatementsChange(com.hp.hpl.jena.rdf.model.Statement[] statements)
           
 
Method Summary
 java.lang.String check(ISession session)
          Checks if this can be executed and returns an error string if not.
 void execute(ISession session, org.eclipse.core.runtime.IProgressMonitor monitor)
          Executes the change.
 ImageMetadata getImageMetadata()
          Gets (optional) metadata to describe an image about this change.
 boolean isNoop()
          Checks if this is a no-operation, i.e.
 
Methods inherited from class org.topbraid.core.change.AbstractChange
getLabel, setImage, setImage, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteStatementsChange

public DeleteStatementsChange(com.hp.hpl.jena.rdf.model.Statement[] statements)
Method Detail

check

public java.lang.String check(ISession session)
Description copied from interface: IChange
Checks if this can be executed and returns an error string if not. This method is usually called by the execution environment prior to calling the IChange.execute(org.topbraid.core.session.ISession, org.eclipse.core.runtime.IProgressMonitor) method.

Specified by:
check in interface IChange
Overrides:
check in class AbstractChange
Parameters:
session - the session to check against
Returns:
null if the change can be performed, an error message otherwise

isNoop

public boolean isNoop()
Description copied from interface: IChange
Checks if this is a no-operation, i.e. resulting in no triple changes. This can be used by execution environments to check whether corresponding user interface components shall be activated to the user.

Specified by:
isNoop in interface IChange
Overrides:
isNoop in class AbstractChange
Returns:
true if this is a no-operation

execute

public void execute(ISession session,
                    org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: IChange
Executes the change. This should perform the changes to a Jena model. In case of an unexpected state, the method may throw an IllegalStateException.

Parameters:
session - the session to execute the change on
monitor - a progress monitor for longish operations (may be null)

getImageMetadata

public ImageMetadata getImageMetadata()
Description copied from interface: IChange
Gets (optional) metadata to describe an image about this change.

Specified by:
getImageMetadata in interface IChange
Overrides:
getImageMetadata in class AbstractChange
Returns:
the ImageMetadata or null