com.bbn.swede.core
Interface IOWLDocument

All Superinterfaces:
IOWLElement
All Known Subinterfaces:
IOWLExternalDocument
All Known Implementing Classes:
LibraryOWLDocument, OWLDocument, OWLExternalDocument

public interface IOWLDocument
extends IOWLElement

Protocol specific to OWL document elements.

Author:
jlerner, tself

Method Summary
 OWLDocumentInfo getDocumentInfo()
          Returns document-specific element information.
 IFile getFile()
          Returns the Eclipse file resource that is the basis for this OWLDocument.
 IPath getGeneratedCodeLocation(String sGeneratorID)
          Determines if a particular code generator has been run against this document and returns the path of the generated files.
 Map getGeneratedCodeMap()
          Returns the map of generated code locations.
 String getURI()
          Returns the URI that is the xml:base of the document.
 void setGeneratedCodeLocation(String sGeneratorID, IPath path)
          Associates a path with a particular code generator for this document.
 void setURI(String uri)
          Sets the base URI of the document.
 
Methods inherited from interface com.bbn.swede.core.IOWLElement
accept, contains, getCorrespondingElement, getCorrespondingResource, getElementInfo, getElementName, getLocalURI, getParent, getPath, getResource, isReadOnly, setParent
 

Method Detail

getDocumentInfo

public OWLDocumentInfo getDocumentInfo()
Returns document-specific element information.

Returns:
OWLDocumentInfo object that can be used to access the details of a document

getFile

public IFile getFile()
Returns the Eclipse file resource that is the basis for this OWLDocument.

Returns:
the document's inner IFile

getURI

public String getURI()
Returns the URI that is the xml:base of the document. If no URI has been explicitly set, a file: specifying its location on the filesystem is used.

Specified by:
getURI in interface IOWLElement
Returns:
The base URI of the document

setURI

public void setURI(String uri)
            throws MalformedURIException
Sets the base URI of the document.

Parameters:
uri - The new base URI
Throws:
MalformedURIException - if uri is not a well-formed URI

getGeneratedCodeLocation

public IPath getGeneratedCodeLocation(String sGeneratorID)
Determines if a particular code generator has been run against this document and returns the path of the generated files. The returned path may specify either a file or folder, depending on the number of files created by the specified generator.

Parameters:
sGeneratorID - The extension ID of the code generator
Returns:
The project-relative path of the generated code, or null if the specified generator has not been run against this document.

setGeneratedCodeLocation

public void setGeneratedCodeLocation(String sGeneratorID,
                                     IPath path)
Associates a path with a particular code generator for this document. At most one path can be associated with a document for each code generator.

Parameters:
sGeneratorID - The generator to associate with the path
path - The path of the code generated by the specified generator. If null is provided as the path, the document will be disassociated from the code generator.

getGeneratedCodeMap

public Map getGeneratedCodeMap()
Returns the map of generated code locations. The keys are the generator IDs and the values are the project-relative paths of the generated code.

Returns:
The map of generated code locations


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