org.topbraid.change
Class MoveStatementsToSubjectChange
java.lang.Object
org.topbraid.core.change.AbstractChange
org.topbraid.change.MoveStatementsToSubjectChange
- All Implemented Interfaces:
- IChange
public class MoveStatementsToSubjectChange
- extends AbstractChange
Moves a list of predicate/object pairs to a given subject.
If objects are blank nodes, the system will create deep copies.
- Author:
- Holger Knublauch
|
Constructor Summary |
MoveStatementsToSubjectChange(com.hp.hpl.jena.rdf.model.Resource newSubject,
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MoveStatementsToSubjectChange
public MoveStatementsToSubjectChange(com.hp.hpl.jena.rdf.model.Resource newSubject,
com.hp.hpl.jena.rdf.model.Statement[] statements)
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
execute
public void execute(ISession session,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws java.lang.InterruptedException
- 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 onmonitor - a progress monitor for longish operations (may be null)
- Throws:
java.lang.InterruptedException - if the user has cancelled the execution,
e.g. using the provided monitor