com.bbn.swede.core.resources
Class OWLProject

java.lang.Object
  extended bycom.bbn.swede.core.resources.OWLElement
      extended bycom.bbn.swede.core.resources.OWLProject
All Implemented Interfaces:
ILibraryChangeListener, IOWLElement, IOWLProject

public class OWLProject
extends OWLElement
implements IOWLProject, ILibraryChangeListener

Implementation for OWL project elements.

Author:
jlerner

Field Summary
protected  LibraryChangeSupport _libraryChangeSupport
          Delegate object for library change notifications.
 
Fields inherited from class com.bbn.swede.core.resources.OWLElement
_elemParent, _info, _resource, _sElementName
 
Constructor Summary
(package private) OWLProject(IProject project)
          Creates an OWL project element based on an Eclipse project resource.
 
Method Summary
 void addLibraryChangeListener(ILibraryChangeListener lcl)
          Registers an object for notifications of changes to the project's referenced libraries.
 boolean contains(IResource resource)
          Checks if this element or one of its decendents is based on a particular Eclipse resource.
 Object getAdapter(Class adapter)
           
 IContainer getContainer()
          Returns the Eclipse project resource that is the basis for this OWL project, cast as an IContainer.
 IOWLElement getCorrespondingElement(IResource resource)
          Locates the OWL Element corresponding to a particular Eclipse resource.
 IOWLDocument getDocument(String sURI)
          Searches the project for a document with a specific base URI.
 IProject getProject()
          Retrieves the Eclipse project the OWL project element is based on.
 void libraryChanged(LibraryChangeEvent lce)
          Called when by the library when changes are made.
 void removeLibraryChangeListener(ILibraryChangeListener lcl)
          Unregisters an object from notifications of changes to the project's referenced libraries.
 
Methods inherited from class com.bbn.swede.core.resources.OWLElement
accept, getCorrespondingResource, getElementInfo, getElementName, getLocalURI, getParent, getPath, getResource, getURI, isReadOnly, setElementName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bbn.swede.core.IOWLElement
accept, getCorrespondingResource, getElementInfo, getElementName, getLocalURI, getParent, getPath, getResource, getURI, isReadOnly, setParent
 

Field Detail

_libraryChangeSupport

protected LibraryChangeSupport _libraryChangeSupport
Delegate object for library change notifications.

Constructor Detail

OWLProject

OWLProject(IProject project)
Creates an OWL project element based on an Eclipse project resource.

Parameters:
project - The Eclipse project
Method Detail

contains

public boolean contains(IResource resource)
Description copied from interface: IOWLElement
Checks if this element or one of its decendents is based on a particular Eclipse resource.

Specified by:
contains in interface IOWLElement
Overrides:
contains in class OWLElement

getCorrespondingElement

public IOWLElement getCorrespondingElement(IResource resource)
Description copied from interface: IOWLElement
Locates the OWL Element corresponding to a particular Eclipse resource.

Specified by:
getCorrespondingElement in interface IOWLElement
Overrides:
getCorrespondingElement in class OWLElement

addLibraryChangeListener

public void addLibraryChangeListener(ILibraryChangeListener lcl)
Registers an object for notifications of changes to the project's referenced libraries. If the object is already registered for change notifications, this method has no effect.

Parameters:
lcl - The listener to register

removeLibraryChangeListener

public void removeLibraryChangeListener(ILibraryChangeListener lcl)
Unregisters an object from notifications of changes to the project's referenced libraries. If the object is not registered for change notifications, this method has no effect.

Parameters:
lcl - The listener to unregister

libraryChanged

public void libraryChanged(LibraryChangeEvent lce)
Description copied from interface: ILibraryChangeListener
Called when by the library when changes are made.

Specified by:
libraryChanged in interface ILibraryChangeListener
Parameters:
lce -
See Also:
LibraryChangeEvent

getProject

public IProject getProject()
Retrieves the Eclipse project the OWL project element is based on. This is a convenience method, fully equivalent to (IProject)getResource().

Specified by:
getProject in interface IOWLProject
Returns:
The Eclipse project resource.

getContainer

public IContainer getContainer()
Description copied from interface: IOWLProject

Returns the Eclipse project resource that is the basis for this OWL project, cast as an IContainer.

This is a convenience method, fully equivalent to:

(IContainer)getProject()

Specified by:
getContainer in interface IOWLProject
Returns:
The project's inner IProject, cast as an IContainer.

getAdapter

public Object getAdapter(Class adapter)
Overrides:
getAdapter in class OWLElement

getDocument

public IOWLDocument getDocument(String sURI)
Description copied from interface: IOWLProject
Searches the project for a document with a specific base URI.

Specified by:
getDocument in interface IOWLProject
Parameters:
sURI - URI of the document to locate
Returns:
An IOWLDocument matching the specified URI, or null if the project does not contain the requested document.


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.