com.bbn.swede.core.libraries
Class OWLLibrary

java.lang.Object
  extended bycom.bbn.swede.core.resources.OWLElement
      extended bycom.bbn.swede.core.libraries.OWLLibrary
All Implemented Interfaces:
ILibraryChangeListener, IOWLElement, IOWLLibrary

public class OWLLibrary
extends OWLElement
implements IOWLLibrary, ILibraryChangeListener

This class is an implementation of the IOWLLibrary interface, providing SWeDE-type (i.e. consistent with IOWLElements, 'Documents, 'Projects, 'Classes, etc.) support for libraries.

Author:
aperezlo

Field Summary
protected  ILibraryDescriptor _library
          The library represented by this OWL library element.
protected  LibraryChangeSupport _libraryChangeSupport
          Delegate object for library change notification handling.
 
Fields inherited from class com.bbn.swede.core.resources.OWLElement
_elemParent, _info, _resource, _sElementName
 
Constructor Summary
OWLLibrary(ILibraryDescriptor library)
          Creats an OWL library element representing a library.
 
Method Summary
 void addLibraryChangeListener(ILibraryChangeListener lcs)
          Registers an object for notifications of changes to this library.
 IOWLElement getCorrespondingElement(IResource resource)
          Locates the OWL Element corresponding to a particular Eclipse resource.
 OWLElementInfo getElementInfo()
          Returns the OWLElementInfo for an OWL resource, creating it first if this is the first time it has been requested.
 String getElementName()
          Returns the name of this element.
 ILibraryDescriptor getLibrary()
          Retrieves the handle of the library associated with this IOWLLibrary resource.
 void libraryChanged(LibraryChangeEvent lce)
          Called when by the library when changes are made.
 void removeLibraryChangeListener(ILibraryChangeListener lcs)
          Unregisters an object from notifications of changes to this library.
 
Methods inherited from class com.bbn.swede.core.resources.OWLElement
accept, contains, getAdapter, getCorrespondingResource, 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, contains, getCorrespondingResource, getLocalURI, getParent, getPath, getResource, getURI, isReadOnly, setParent
 

Field Detail

_library

protected ILibraryDescriptor _library
The library represented by this OWL library element.


_libraryChangeSupport

protected LibraryChangeSupport _libraryChangeSupport
Delegate object for library change notification handling.

Constructor Detail

OWLLibrary

public OWLLibrary(ILibraryDescriptor library)
Creats an OWL library element representing a library.

Parameters:
library - the library
Method Detail

getElementName

public String getElementName()
Description copied from interface: IOWLElement
Returns the name of this element.

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

getLibrary

public ILibraryDescriptor getLibrary()
Description copied from interface: IOWLLibrary
Retrieves the handle of the library associated with this IOWLLibrary resource.

Specified by:
getLibrary in interface IOWLLibrary
Returns:
the handle

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

addLibraryChangeListener

public void addLibraryChangeListener(ILibraryChangeListener lcs)
Registers an object for notifications of changes to this library.

Parameters:
lcs - The listener to register. Duplicate registrations have no effect.

removeLibraryChangeListener

public void removeLibraryChangeListener(ILibraryChangeListener lcs)
Unregisters an object from notifications of changes to this library.

Parameters:
lcs - The listener to unregister. This has no effect if lcs is not registered for change notifications.

getElementInfo

public OWLElementInfo getElementInfo()
Description copied from interface: IOWLElement
Returns the OWLElementInfo for an OWL resource, creating it first if this is the first time it has been requested.

Specified by:
getElementInfo in interface IOWLElement
Overrides:
getElementInfo 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


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