org.topbraidcomposer.operations
Class RenameResourceChange
java.lang.Object
org.topbraid.core.change.AbstractChange
org.topbraidcomposer.operations.RenameResourceChange
- All Implemented Interfaces:
- IChange, IRenamingChange
public class RenameResourceChange
- extends AbstractChange
- implements IRenamingChange
|
Constructor Summary |
RenameResourceChange(com.hp.hpl.jena.rdf.model.Resource oldResource,
java.lang.String newURI)
|
RenameResourceChange(com.hp.hpl.jena.rdf.model.Resource oldResource,
java.lang.String newURI,
java.util.Set<com.hp.hpl.jena.rdf.model.Model> ontModels)
|
|
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. |
java.util.Map<com.hp.hpl.jena.rdf.model.Resource,com.hp.hpl.jena.rdf.model.Resource> |
getRenamedResources()
A Map of old Resources to new Resources, containing all resources
that have changed their "name" during this change. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isRenaming
public static boolean isRenaming
isRenamingOld
public static com.hp.hpl.jena.rdf.model.Resource isRenamingOld
RenameResourceChange
public RenameResourceChange(com.hp.hpl.jena.rdf.model.Resource oldResource,
java.lang.String newURI)
RenameResourceChange
public RenameResourceChange(com.hp.hpl.jena.rdf.model.Resource oldResource,
java.lang.String newURI,
java.util.Set<com.hp.hpl.jena.rdf.model.Model> ontModels)
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)
- 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.
- Specified by:
execute in interface IChange
- Parameters:
session - the session to execute the change onmonitor - a progress monitor for longish operations (may be null)
getRenamedResources
public java.util.Map<com.hp.hpl.jena.rdf.model.Resource,com.hp.hpl.jena.rdf.model.Resource> getRenamedResources()
- Description copied from interface:
IRenamingChange
- A Map of old Resources to new Resources, containing all resources
that have changed their "name" during this change.
- Specified by:
getRenamedResources in interface IRenamingChange
- Returns:
- a Map (Resource -> Resource)