org.topbraid.core.session
Interface IResourceSelection

All Known Subinterfaces:
ISession
All Known Implementing Classes:
AbstractSession, TBCSession

public interface IResourceSelection

An interface for objects that can manage a "globally" selected resource. This is a super interface of ISession to separate concerns.

Author:
Holger Knublauch

Method Summary
 void addResourceSelectionListener(IResourceSelectionListener l)
          Adds an IResourceSelectionListener to receive events whenever the resource selection changes.
 com.hp.hpl.jena.rdf.model.Resource getPreviouslySelectedResource()
           
 com.hp.hpl.jena.rdf.model.Resource getSelectedResource()
          Gets the currently selected Resource.
 void removeResourceSelectionListener(IResourceSelectionListener l)
          Removes an IResourceSelectionListener that was previously added.
 void setSelectedResource(com.hp.hpl.jena.rdf.model.Resource resource)
           
 

Method Detail

addResourceSelectionListener

void addResourceSelectionListener(IResourceSelectionListener l)
Adds an IResourceSelectionListener to receive events whenever the resource selection changes.

Parameters:
l - the listener to add

getPreviouslySelectedResource

com.hp.hpl.jena.rdf.model.Resource getPreviouslySelectedResource()

getSelectedResource

com.hp.hpl.jena.rdf.model.Resource getSelectedResource()
Gets the currently selected Resource. This is typically the target (subject) of operations and usually displayed in the center of the screen. The Resource should have the selected OntModel as its associated model.

Returns:
the selected Resource or null

removeResourceSelectionListener

void removeResourceSelectionListener(IResourceSelectionListener l)
Removes an IResourceSelectionListener that was previously added.

Parameters:
l - the listener to remove

setSelectedResource

void setSelectedResource(com.hp.hpl.jena.rdf.model.Resource resource)