org.topbraid.core.change
Class AbstractChange

java.lang.Object
  extended by org.topbraid.core.change.AbstractChange
All Implemented Interfaces:
IChange
Direct Known Subclasses:
AbstractConvertChange, AbstractInferenceChange, AbstractReplaceObjectChange, AddDifferentStatementsChange, AddStatementChange, AddStatementsChange, AddSubclassAxiomsChange, AddSubjectToStatementsChange, AddSuperClassChange, AddUnionDomainPropertyChange, AssertStatementsChange, ChangeDatatypeChange, ConvertToBNodeChange, ConvertToDefinedClassChange, ConvertToPrimitiveClassChange, CreateCloneChange, CreateEnumerationChange, CreateInstanceChange, CreateReifiedStatementChange, CreateSubClassChange, DeleteRedundantOntologiesOperation, DeleteResourcesChange, DeleteStatementChange, DeleteStatementsChange, ExtractClassChange, FixLiteralsChange, MoveObjectChange, MoveResourcesIntoModelChange, MoveStatementsToSubjectChange, MoveTriplesChange, RemoveRedundantSuperClassesChange, RemoveUnionDomainPropertyChange, RemoveUsagesChange, RenameResourceChange, ReplaceInfGraphChange, ReplaceNamespaceOperation, ReplaceSuperClassesChange, ReplaceSuperPropertiesChange, ReplaceTriplesChange, ReplaceTypeChange

public abstract class AbstractChange
extends java.lang.Object
implements IChange

An abstract base implementation of the IChange interface.

Author:
Holger Knublauch

Constructor Summary
AbstractChange()
           
AbstractChange(java.lang.String label)
           
AbstractChange(java.lang.String label, ImageMetadata im)
           
 
Method Summary
 java.lang.String check(ISession session)
          Checks if this can be executed and returns an error string if not.
 ImageMetadata getImageMetadata()
          Gets (optional) metadata to describe an image about this change.
 java.lang.String getLabel()
          Gets an (optional) textual representation of this change.
 boolean isNoop()
          Checks if this is a no-operation, i.e.
 void setImage(ImageMetadata im)
           
 void setImage(java.lang.String pluginId, java.lang.String partialName)
           
 void setLabel(java.lang.String label)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.topbraid.core.change.IChange
execute
 

Constructor Detail

AbstractChange

public AbstractChange()

AbstractChange

public AbstractChange(java.lang.String label)

AbstractChange

public AbstractChange(java.lang.String label,
                      ImageMetadata im)
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
Parameters:
session - the session to check against
Returns:
null if the change can be performed, an error message otherwise

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
Returns:
the ImageMetadata or null

getLabel

public java.lang.String getLabel()
Description copied from interface: IChange
Gets an (optional) textual representation of this change.

Specified by:
getLabel in interface IChange
Returns:
the text or null

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
Returns:
true if this is a no-operation

setImage

public void setImage(ImageMetadata im)

setImage

public void setImage(java.lang.String pluginId,
                     java.lang.String partialName)

setLabel

public void setLabel(java.lang.String label)