KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > ontology > Ontology


1 /*****************************************************************************
2  * Source code information
3  * -----------------------
4  * Original author Ian Dickinson, HP Labs Bristol
5  * Author email Ian.Dickinson@hp.com
6  * Package Jena 2
7  * Web http://sourceforge.net/projects/jena/
8  * Created 10 Feb 2003
9  * Filename $RCSfile: Ontology.java,v $
10  * Revision $Revision: 1.9 $
11  * Release status $State: Exp $
12  *
13  * Last modified on $Date: 2005/02/21 12:04:36 $
14  * by $Author: andy_seaborne $
15  *
16  * (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
17  * (see footer for full conditions)
18  * ****************************************************************************/

19
20 // Package
21
///////////////
22
package com.hp.hpl.jena.ontology;
23
24
25
26 // Imports
27
///////////////
28
import com.hp.hpl.jena.rdf.model.*;
29 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
30
31
32 /**
33  * <p>
34  * Interface encapsulating the distinguished instance in a given ontology
35  * document that presents meta-data and other processing data about the document
36  * (including which other documents are imported by a document).
37  * </p>
38  *
39  * @author Ian Dickinson, HP Labs
40  * (<a HREF="mailto:Ian.Dickinson@hp.com" >email</a>)
41  * @version CVS $Id: Ontology.java,v 1.9 2005/02/21 12:04:36 andy_seaborne Exp $
42  */

43 public interface Ontology
44     extends OntResource
45 {
46     // Constants
47
//////////////////////////////////
48

49
50
51     // External signature methods
52
//////////////////////////////////
53

54     // imports
55

56     /**
57      * <p>Assert that this ontology imports only the given ontology. Any existing
58      * statements for <code>sameAs</code> will be removed.</p>
59      * @param res Represents a resource that this ontology imports.
60      * @exception OntProfileException If the {@link Profile#IMPORTS()()} property is not supported in the current language profile.
61      */

62     public void setImport( Resource res );
63
64     /**
65      * <p>Add a resource representing an ontology that this ontology
66      * (strictly, the ontology reprsented by this node) imports.</p>
67      * @param res Represents a resource that this ontology imports.
68      * @exception OntProfileException If the {@link Profile#IMPORTS()()} property is not supported in the current language profile.
69      */

70     public void addImport( Resource res );
71
72     /**
73      * <p>Answer a resource that represents an ontology imported by this ontology. If there is
74      * more than one such resource, an arbitrary selection is made.</p>
75      * @return An ont resource representing a resource that this ontology imports
76      * @exception OntProfileException If the {@link Profile#IMPORTS()()} property is not supported in the current language profile.
77      */

78     public OntResource getImport();
79
80     /**
81      * <p>Answer an iterator over all of the resources representing ontologies imported by this ontology.
82      * Each elemeent of the iterator will be an {@link OntResource}.</p>
83      * @return An iterator over the ontology import resources
84      * @exception OntProfileException If the {@link Profile#IMPORTS()()} property is not supported in the current language profile.
85      */

86     public ExtendedIterator listImports();
87
88     /**
89      * <p>Answer true if this ontology (the ontology represented by this
90      * resource) imports the given resource.</p>
91      * @param res A resource to test against
92      * @return True if this ontology imports the ontology represented by <code>res</code>
93      */

94     public boolean imports( Resource res );
95     
96     /**
97      * <p>Remove the statement that this ontology imports the ontology represented by the given resource. If this statement
98      * is not true of the current model, nothing happens.</p>
99      * @param res A resource that represents an ontology that is no longer to be imported
100      */

101     public void removeImport( Resource res );
102     
103
104     // backwardCompatibleWith
105

106     /**
107      * <p>Assert that this ontology is backward compatible with the given ontology. Any existing
108      * statements for <code>sameAs</code> will be removed.</p>
109      * @param res Represents a resource that this ontology is compatible with.
110      * @exception OntProfileException If the {@link Profile#BACKWARD_COMPATIBLE_WITH} property is not supported in the current language profile.
111      */

112     public void setBackwardCompatibleWith( Resource res );
113
114     /**
115      * <p>Add a resource representing an ontology that this ontology
116      * (strictly, the ontology reprsented by this node) is backwards compatible with.</p>
117      * @param res Represents a resource that this ontology is compatible with.
118      * @exception OntProfileException If the {@link Profile#BACKWARD_COMPATIBLE_WITH} property is not supported in the current language profile.
119      */

120     public void addBackwardCompatibleWith( Resource res );
121
122     /**
123      * <p>Answer a resource that represents an ontology that is backwards compatible with this ontology. If there is
124      * more than one such resource, an arbitrary selection is made.</p>
125      * @return An ont resource representing an ontology that this ontology is compatible with
126      * @exception OntProfileException If the {@link Profile#BACKWARD_COMPATIBLE_WITH} property is not supported in the current language profile.
127      */

128     public OntResource getBackwardCompatibleWith();
129
130     /**
131      * <p>Answer an iterator over all of the resources representing
132      * ontologies that this ontology is backwards compatible with.
133      * Each element of the iterator will be an {@link OntResource}.</p>
134      * @return An iterator over the ontology resources compatible with this ontology
135      * @exception OntProfileException If the {@link Profile#BACKWARD_COMPATIBLE_WITH} property is not supported in the current language profile.
136      */

137     public ExtendedIterator listBackwardCompatibleWith();
138
139     /**
140      * <p>Answer true if this ontology (the ontology represented by this
141      * resource) is backward compatible with the given resource.</p>
142      * @param res A resource to test against
143      * @return True if this ontology is compatible with the ontology represented by <code>res</code>
144      */

145     public boolean isBackwardCompatibleWith( Resource res );
146     
147     /**
148      * <p>Remove the statement that this ontology is backwards compatible with
149      * the ontology represented by the given resource. If this statement
150      * is not true of the current model, nothing happens.</p>
151      * @param res A resource that represents an ontology that is no longer to be imported
152      */

153     public void removeBackwardCompatibleWith( Resource res );
154     
155
156     // priorVersion
157

158     /**
159      * <p>Assert that this ontology is a new version of the given ontology. Any existing
160      * statements for <code>priorVersion</code> will be removed.</p>
161      * @param res Represents a resource that this ontology supercedes.
162      * @exception OntProfileException If the {@link Profile#PRIOR_VERSION} property is not supported in the current language profile.
163      */

164     public void setPriorVersion( Resource res );
165
166     /**
167      * <p>Add a resource representing an ontology that this ontology
168      * (strictly, the ontology reprsented by this node) supercedes.</p>
169      * @param res Represents a resource that this ontology supercedes.
170      * @exception OntProfileException If the {@link Profile#PRIOR_VERSION} property is not supported in the current language profile.
171      */

172     public void addPriorVersion( Resource res );
173
174     /**
175      * <p>Answer a resource that represents an ontology that is superceded by this ontology. If there is
176      * more than one such resource, an arbitrary selection is made.</p>
177      * @return An ont resource representing an ontology that this ontology supercedes
178      * @exception OntProfileException If the {@link Profile#PRIOR_VERSION} property is not supported in the current language profile.
179      */

180     public OntResource getPriorVersion();
181
182     /**
183      * <p>Answer an iterator over all of the resources representing
184      * ontologies that this ontology supercedes.
185      * Each element of the iterator will be an {@link OntResource}.</p>
186      * @return An iterator over the ontology resources superceded by this ontology
187      * @exception OntProfileException If the {@link Profile#PRIOR_VERSION} property is not supported in the current language profile.
188      */

189     public ExtendedIterator listPriorVersion();
190
191     /**
192      * <p>Answer true if this ontology (the ontology represented by this
193      * resource) supercedes the given resource.</p>
194      * @param res A resource to test against
195      * @return True if this ontology supercedes the ontology represented by <code>res</code>
196      */

197     public boolean hasPriorVersion( Resource res );
198     
199     /**
200      * <p>Remove the statement that the given ontology is a prior version of this ontology. If this statement
201      * is not true of the current model, nothing happens.</p>
202      * @param res A resource that represents an ontology that is no longer a prior version of this ontology
203      */

204     public void removePriorVersion( Resource res );
205     
206     // incompatibleWith
207

208     /**
209      * <p>Assert that this ontology is incompatible with the given ontology. Any existing
210      * statements for <code>incompatibleWith</code> will be removed.</p>
211      * @param res Represents a resource that this ontology is incompatible with.
212      * @exception OntProfileException If the {@link Profile#INCOMPATIBLE_WITH} property is not supported in the current language profile.
213      */

214     public void setIncompatibleWith( Resource res );
215
216     /**
217      * <p>Add a resource representing an ontology that this ontology
218      * (strictly, the ontology reprsented by this node) is incompatible with.</p>
219      * @param res Represents a resource that this ontology is incompatible with.
220      * @exception OntProfileException If the {@link Profile#INCOMPATIBLE_WITH} property is not supported in the current language profile.
221      */

222     public void addIncompatibleWith( Resource res );
223
224     /**
225      * <p>Answer a resource that represents an ontology that is is incompatible with this ontology. If there is
226      * more than one such resource, an arbitrary selection is made.</p>
227      * @return An ont resource representing an ontology that this ontology is incompatible with
228      * @exception OntProfileException If the {@link Profile#INCOMPATIBLE_WITH} property is not supported in the current language profile.
229      */

230     public OntResource getIncompatibleWith();
231
232     /**
233      * <p>Answer an iterator over all of the resources representing
234      * ontologies that this ontology is incompatible with.
235      * Each element of the iterator will be an {@link OntResource}.</p>
236      * @return An iterator over the ontology resources that this ontology is incompatible with
237      * @exception OntProfileException If the {@link Profile#INCOMPATIBLE_WITH} property is not supported in the current language profile.
238      */

239     public ExtendedIterator listIncompatibleWith();
240
241     /**
242      * <p>Answer true if this ontology (the ontology represented by this
243      * resource) is incompatible with the given resource.</p>
244      * @param res A resource to test against
245      * @return True if this ontology is incompatible with the ontology represented by <code>res</code>
246      */

247     public boolean isIncompatibleWith( Resource res );
248     
249     /**
250      * <p>Remove the statement that the given ontology is incompatible with this ontology. If this statement
251      * is not true of the current model, nothing happens.</p>
252      * @param res A resource that represents an ontology that is no longer incompatible with this ontology
253      */

254     public void removeIncompatibleWith( Resource res );
255     
256 }
257
258
259 /*
260     (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
261     All rights reserved.
262
263     Redistribution and use in source and binary forms, with or without
264     modification, are permitted provided that the following conditions
265     are met:
266
267     1. Redistributions of source code must retain the above copyright
268        notice, this list of conditions and the following disclaimer.
269
270     2. Redistributions in binary form must reproduce the above copyright
271        notice, this list of conditions and the following disclaimer in the
272        documentation and/or other materials provided with the distribution.
273
274     3. The name of the author may not be used to endorse or promote products
275        derived from this software without specific prior written permission.
276
277     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
278     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
279     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
280     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
281     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
282     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
283     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
284     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
285     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
286     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
287 */

288
Popular Tags