org.topbraid.strings.labels.impl
Class ResourceLabelManagerImpl

java.lang.Object
  extended by org.topbraid.strings.labels.impl.ResourceLabelManagerImpl
All Implemented Interfaces:
IChangeEngineListener, IResourceLabelManager

public class ResourceLabelManagerImpl
extends java.lang.Object
implements IResourceLabelManager, IChangeEngineListener


Constructor Summary
ResourceLabelManagerImpl(ISession session)
           
 
Method Summary
 void addListener(IResourceLabelListener listener)
           
 void changeOperationPerformed(ChangeOperation operation, boolean undone)
          Notifies the receiver that changes to one or more Graphs have been performed.
protected  java.lang.String createLabel(com.hp.hpl.jena.rdf.model.Resource subject)
           
 void dispose()
           
 java.lang.String getLabel(com.hp.hpl.jena.rdf.model.Resource resource)
          Gets the label of a given resource.
 void graphChangePerformed()
          Notifies the receiver that a global change to the current model has been performed.
 void graphDirty(com.hp.hpl.jena.graph.Graph graph)
          Called when a Graph has been set to dirty.
 java.util.Iterator<com.hp.hpl.jena.rdf.model.Resource> listMatchingResources(java.lang.String prefix, java.lang.String fromAfter)
           
 void removeListener(IResourceLabelListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLabelManagerImpl

public ResourceLabelManagerImpl(ISession session)
Method Detail

addListener

public void addListener(IResourceLabelListener listener)
Specified by:
addListener in interface IResourceLabelManager

changeOperationPerformed

public void changeOperationPerformed(ChangeOperation operation,
                                     boolean undone)
Description copied from interface: IChangeEngineListener
Notifies the receiver that changes to one or more Graphs have been performed.

Specified by:
changeOperationPerformed in interface IChangeEngineListener
Parameters:
operation - the ModelOperation that was executed, redone or undone
undone - true if the operation has been undone

createLabel

protected java.lang.String createLabel(com.hp.hpl.jena.rdf.model.Resource subject)

dispose

public void dispose()

graphChangePerformed

public void graphChangePerformed()
Description copied from interface: IChangeEngineListener
Notifies the receiver that a global change to the current model has been performed. This is typically called when new sub-Graphs have been added or removed, allowing the receiver to do a complete refresh.

Specified by:
graphChangePerformed in interface IChangeEngineListener

graphDirty

public void graphDirty(com.hp.hpl.jena.graph.Graph graph)
Description copied from interface: IChangeEngineListener
Called when a Graph has been set to dirty.

Specified by:
graphDirty in interface IChangeEngineListener
Parameters:
graph - the Graph that has changed

getLabel

public java.lang.String getLabel(com.hp.hpl.jena.rdf.model.Resource resource)
Description copied from interface: IResourceLabelManager
Gets the label of a given resource.

Specified by:
getLabel in interface IResourceLabelManager
Parameters:
resource - the resource to get the label of
Returns:
the label or null if none is registered

listMatchingResources

public java.util.Iterator<com.hp.hpl.jena.rdf.model.Resource> listMatchingResources(java.lang.String prefix,
                                                                                    java.lang.String fromAfter)
Specified by:
listMatchingResources in interface IResourceLabelManager

removeListener

public void removeListener(IResourceLabelListener listener)
Specified by:
removeListener in interface IResourceLabelManager