View Javadoc

1   /*
2    * $Id: IOWLDocument.java,v 1.11 2004/09/02 20:45:52 jlerner Exp $
3    *
4    * Copyright (c) 1999-2004, BBN Technologies, LLC.
5    * All rights reserved.
6    * http://www.daml.org/legal/opensource/bbn_license.html
7    */
8   
9   package com.bbn.swede.core;
10  
11  import java.util.Map;
12  
13  import org.eclipse.core.resources.IFile;
14  import org.eclipse.core.runtime.IPath;
15  
16  import com.hp.hpl.jena.rdf.arp.MalformedURIException;
17  /***
18   * Protocol specific to OWL document elements.
19   * @author jlerner
20   * @author tself
21   */
22  public interface IOWLDocument extends IOWLElement
23  {
24     /***
25      * Returns document-specific element information.
26      * @return OWLDocumentInfo object that can be used to access the details of
27      *         a document
28      */
29     OWLDocumentInfo getDocumentInfo();
30  
31     /***
32      * Returns the Eclipse file resource that is the basis for this OWLDocument.
33      * @return the document's inner IFile
34      */
35     IFile getFile();
36  
37     /***
38      * Returns the URI that is the xml:base of the document.  If no URI has
39      * been explicitly set, a file: specifying its location on the filesystem
40      * is used.
41      * @return The base URI of the document
42      */
43     String getURI();
44  
45     /***
46      * Sets the base URI of the document.
47      * @param uri The new base URI
48      * @throws MalformedURIException if <code>uri</code> is not a well-formed URI
49      */
50     void setURI(String uri) throws MalformedURIException;
51  
52     /***
53      * Determines if a particular code generator has been run against this
54      * document and returns the path of the generated files.  The returned path
55      * may specify either a file or folder, depending on the number of files
56      * created by the specified generator.
57      * @param sGeneratorID The extension ID of the code generator
58      * @return The project-relative path of the generated code, or null if the
59      *         specified generator has not been run against this document.
60      */
61     IPath getGeneratedCodeLocation(String sGeneratorID);
62  
63     /***
64      * Associates a path with a particular code generator for this document.
65      * At most one path can be associated with a document for each code generator.
66      * @param sGeneratorID The generator to associate with the path
67      * @param path The path of the code generated by the specified generator.
68      *             If <code>null</code> is provided as the path, the document
69      *             will be disassociated from the code generator.
70      */
71     void setGeneratedCodeLocation(String sGeneratorID, IPath path);
72  
73     /***
74      * Returns the map of generated code locations.  The keys are the generator
75      * IDs and the values are the project-relative paths of the generated code.
76      * @return The map of generated code locations
77      */
78     Map getGeneratedCodeMap();
79  }