com.bbn.swede.core
Interface IOWLModel

All Superinterfaces:
IOWLElement
All Known Implementing Classes:
OWLModel

public interface IOWLModel
extends IOWLElement

Protocol specific to the OWL model element.

Author:
jlerner, tself

Method Summary
 IOWLElement add(IOWLElement e)
          Adds any IOWLElement (except IOWLProject) to model.
 boolean addLibrary(IOWLProject project, String libraryNameToAdd)
          Tells the model to associate the globally available Ontology Library with a Semantic Web project.
 void build()
          Builds the OWL model.
 boolean contains(IResource resource)
          Indicates whether the OWL model contains an IOWLElement based on the given resource.
 IOWLExternalDocument getImportedDocument(IOWLProject proj, String uri)
          Returns the OWL document imported from a URI into this project.
 IOWLExternalDocument[] getImportedDocuments(IOWLProject proj)
          Returns the OWL documents in this project that were imported from the web.
 IOWLProject getOWLProject(String sProjectName)
          Returns an OWL project with a given name, which may or may not exist.
 IOWLProject[] getOWLProjects()
          Returns the OWL projects within the model.
 IWorkspace getWorkspace()
          Returns the workspace associated with this OWL model.
 IOWLFolder makeOWLFolder(IFolder folder)
          Creates an OWL folder based on an Eclipse folder resource.
 boolean removeLibrary(IOWLProject project, String libraryNameToRemove)
          Tells the model to disassociate a globally available Ontology Library from a specific Semantic Web project.
 
Methods inherited from interface com.bbn.swede.core.IOWLElement
accept, getCorrespondingElement, getCorrespondingResource, getElementInfo, getElementName, getLocalURI, getParent, getPath, getResource, getURI, isReadOnly, setParent
 

Method Detail

add

public IOWLElement add(IOWLElement e)
Adds any IOWLElement (except IOWLProject) to model.

Parameters:
e - IOWLElement object
Returns:
IOWLElement representing the object added

getOWLProject

public IOWLProject getOWLProject(String sProjectName)
Returns an OWL project with a given name, which may or may not exist.

Parameters:
sProjectName - name of the desired project
Returns:
an OWL project with the specified name

getOWLProjects

public IOWLProject[] getOWLProjects()
Returns the OWL projects within the model.

Returns:
An array containing all OWL projects in the model, or an empty array if there are none

getWorkspace

public IWorkspace getWorkspace()
Returns the workspace associated with this OWL model.

Returns:
the workspace associated with this OWL model

contains

public boolean contains(IResource resource)
Indicates whether the OWL model contains an IOWLElement based on the given resource.

Specified by:
contains in interface IOWLElement
Parameters:
resource - the resource to locate in the OWL model
Returns:
true if the specified resource exists in the model

makeOWLFolder

public IOWLFolder makeOWLFolder(IFolder folder)
Creates an OWL folder based on an Eclipse folder resource. If the folder does not contain any OWL elements, no OWL folder will be created.

Parameters:
folder - The folder to integrate into the OWL model
Returns:
An IOWLFolder representing the folder resource. This may be one that already existed in the model, or null if folder contains now OWL elements.

getImportedDocuments

public IOWLExternalDocument[] getImportedDocuments(IOWLProject proj)
Returns the OWL documents in this project that were imported from the web.

Parameters:
proj - IOWLProject to search in
Returns:
Array of IOWLExternalDocument objects

getImportedDocument

public IOWLExternalDocument getImportedDocument(IOWLProject proj,
                                                String uri)
Returns the OWL document imported from a URI into this project.

Parameters:
proj - The project to check for the document
uri - external URI of document
Returns:
IOWLExternalDocument of local cached copy of the document, or null if no document exists in proj with the given URI.

addLibrary

public boolean addLibrary(IOWLProject project,
                          String libraryNameToAdd)

Tells the model to associate the globally available Ontology Library with a Semantic Web project.

If the name is not that of an available library, no change will occur to the project's library registry, and the method will return false. Otherwise, the library will be added, and the method will return true.

Parameters:
project - The project
libraryNameToAdd - The name of the library to add
Returns:
true if the library is added successfully, false if there is no library matching the specified name.

removeLibrary

public boolean removeLibrary(IOWLProject project,
                             String libraryNameToRemove)

Tells the model to disassociate a globally available Ontology Library from a specific Semantic Web project.

If the name is not included in the project's registry, no change will occur, and the method will return false. Otherwise, the library will be removed, and the method will return true.

Parameters:
project - The project
libraryNameToRemove - The name of the library to remove
Returns:
true if the library reference is removed successfully, false if there was no reference to remove.

build

public void build()
Builds the OWL model. Only the first level of the model (i.e. the projects) is determined, as further levels of detail are not needed until element info is requested for a project.



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