org.topbraid.core.session
Interface IModelSelection

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

public interface IModelSelection

An interface for objects that can manage a selected OntModel (together with its base URI and some other things). This is essentially just introduced as a super interface of ISession to separate concerns.

Author:
Holger Knublauch

Method Summary
 void addModelSelectionListener(IModelSelectionListener l)
          Adds an IModelSelectionListener to receive events whenever the session's global model selection changes.
 com.hp.hpl.jena.rdf.model.Model getSelectedBaseModel()
          Gets the currently selected base model.
 java.net.URI getSelectedBaseURI()
           
 com.hp.hpl.jena.ontology.OntModel getSelectedOntModel()
          Gets the currently selected OntModel.
 boolean isFastModelSelected()
          Checks if the currently selected OntModel is a "fast" model so that callers can make assumptions about the performance of certain operations.
 void removeModelSelectionListener(IModelSelectionListener l)
          Removes a previously added IModelSelectionListener.
 void setSelectedBaseURI(java.net.URI baseURI)
           
 

Method Detail

addModelSelectionListener

void addModelSelectionListener(IModelSelectionListener l)
Adds an IModelSelectionListener to receive events whenever the session's global model selection changes.

Parameters:
l - the IModelSelectionListener to add

getSelectedBaseModel

com.hp.hpl.jena.rdf.model.Model getSelectedBaseModel()
Gets the currently selected base model. If an OntModel is selected, then this should be the base model of it.

Returns:
the base Model or null

getSelectedBaseURI

java.net.URI getSelectedBaseURI()

getSelectedOntModel

com.hp.hpl.jena.ontology.OntModel getSelectedOntModel()
Gets the currently selected OntModel.

Returns:
the OntModel or null

isFastModelSelected

boolean isFastModelSelected()
Checks if the currently selected OntModel is a "fast" model so that callers can make assumptions about the performance of certain operations. Fast models typically have only in-memory graphs. This check has been factored into a method so that implementations can optimize response times by caching values.

Returns:
true if this is a fast model

removeModelSelectionListener

void removeModelSelectionListener(IModelSelectionListener l)
Removes a previously added IModelSelectionListener.

Parameters:
l - the IModelSelectionListener to remove

setSelectedBaseURI

void setSelectedBaseURI(java.net.URI baseURI)