001: /*****************************************************************************
002: * Source code information
003: * -----------------------
004: * Original author Ian Dickinson, HP Labs Bristol
005: * Author email Ian.Dickinson@hp.com
006: * Package Jena 2
007: * Web http://sourceforge.net/projects/jena/
008: * Created 10 Feb 2003
009: * Filename $RCSfile: Ontology.java,v $
010: * Revision $Revision: 1.12 $
011: * Release status $State: Exp $
012: *
013: * Last modified on $Date: 2008/01/02 12:06:42 $
014: * by $Author: andy_seaborne $
015: *
016: * (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
017: * (see footer for full conditions)
018: * ****************************************************************************/package com.hp.hpl.jena.ontology;
019:
020: // Imports
021: ///////////////
022: import com.hp.hpl.jena.rdf.model.*;
023: import com.hp.hpl.jena.util.iterator.ExtendedIterator;
024:
025: /**
026: * <p>
027: * Interface encapsulating the distinguished instance in a given ontology
028: * document that presents meta-data and other processing data about the document
029: * (including which other documents are imported by a document).
030: * </p>
031: *
032: * @author Ian Dickinson, HP Labs
033: * (<a href="mailto:Ian.Dickinson@hp.com" >email</a>)
034: * @version CVS $Id: Ontology.java,v 1.12 2008/01/02 12:06:42 andy_seaborne Exp $
035: */
036: public interface Ontology extends OntResource {
037: // Constants
038: //////////////////////////////////
039:
040: // External signature methods
041: //////////////////////////////////
042:
043: // imports
044:
045: /**
046: * <p>Assert that this ontology imports only the given ontology. Any existing
047: * statements for <code>sameAs</code> will be removed.</p>
048: * @param res Represents a resource that this ontology imports.
049: * @exception OntProfileException If the {@link Profile#IMPORTS()()} property is not supported in the current language profile.
050: */
051: public void setImport(Resource res);
052:
053: /**
054: * <p>Add a resource representing an ontology that this ontology
055: * (strictly, the ontology reprsented by this node) imports.</p>
056: * @param res Represents a resource that this ontology imports.
057: * @exception OntProfileException If the {@link Profile#IMPORTS()()} property is not supported in the current language profile.
058: */
059: public void addImport(Resource res);
060:
061: /**
062: * <p>Answer a resource that represents an ontology imported by this ontology. If there is
063: * more than one such resource, an arbitrary selection is made.</p>
064: * @return An ont resource representing a resource that this ontology imports
065: * @exception OntProfileException If the {@link Profile#IMPORTS()()} property is not supported in the current language profile.
066: */
067: public OntResource getImport();
068:
069: /**
070: * <p>Answer an iterator over all of the resources representing ontologies imported by this ontology.
071: * Each elemeent of the iterator will be an {@link OntResource}.</p>
072: * @return An iterator over the ontology import resources
073: * @exception OntProfileException If the {@link Profile#IMPORTS()()} property is not supported in the current language profile.
074: */
075: public ExtendedIterator listImports();
076:
077: /**
078: * <p>Answer true if this ontology (the ontology represented by this
079: * resource) imports the given resource.</p>
080: * @param res A resource to test against
081: * @return True if this ontology imports the ontology represented by <code>res</code>
082: */
083: public boolean imports(Resource res);
084:
085: /**
086: * <p>Remove the statement that this ontology imports the ontology represented by the given resource. If this statement
087: * is not true of the current model, nothing happens.</p>
088: * @param res A resource that represents an ontology that is no longer to be imported
089: */
090: public void removeImport(Resource res);
091:
092: // backwardCompatibleWith
093:
094: /**
095: * <p>Assert that this ontology is backward compatible with the given ontology. Any existing
096: * statements for <code>sameAs</code> will be removed.</p>
097: * @param res Represents a resource that this ontology is compatible with.
098: * @exception OntProfileException If the {@link Profile#BACKWARD_COMPATIBLE_WITH} property is not supported in the current language profile.
099: */
100: public void setBackwardCompatibleWith(Resource res);
101:
102: /**
103: * <p>Add a resource representing an ontology that this ontology
104: * (strictly, the ontology reprsented by this node) is backwards compatible with.</p>
105: * @param res Represents a resource that this ontology is compatible with.
106: * @exception OntProfileException If the {@link Profile#BACKWARD_COMPATIBLE_WITH} property is not supported in the current language profile.
107: */
108: public void addBackwardCompatibleWith(Resource res);
109:
110: /**
111: * <p>Answer a resource that represents an ontology that is backwards compatible with this ontology. If there is
112: * more than one such resource, an arbitrary selection is made.</p>
113: * @return An ont resource representing an ontology that this ontology is compatible with
114: * @exception OntProfileException If the {@link Profile#BACKWARD_COMPATIBLE_WITH} property is not supported in the current language profile.
115: */
116: public OntResource getBackwardCompatibleWith();
117:
118: /**
119: * <p>Answer an iterator over all of the resources representing
120: * ontologies that this ontology is backwards compatible with.
121: * Each element of the iterator will be an {@link OntResource}.</p>
122: * @return An iterator over the ontology resources compatible with this ontology
123: * @exception OntProfileException If the {@link Profile#BACKWARD_COMPATIBLE_WITH} property is not supported in the current language profile.
124: */
125: public ExtendedIterator listBackwardCompatibleWith();
126:
127: /**
128: * <p>Answer true if this ontology (the ontology represented by this
129: * resource) is backward compatible with the given resource.</p>
130: * @param res A resource to test against
131: * @return True if this ontology is compatible with the ontology represented by <code>res</code>
132: */
133: public boolean isBackwardCompatibleWith(Resource res);
134:
135: /**
136: * <p>Remove the statement that this ontology is backwards compatible with
137: * the ontology represented by the given resource. If this statement
138: * is not true of the current model, nothing happens.</p>
139: * @param res A resource that represents an ontology that is no longer to be imported
140: */
141: public void removeBackwardCompatibleWith(Resource res);
142:
143: // priorVersion
144:
145: /**
146: * <p>Assert that this ontology is a new version of the given ontology. Any existing
147: * statements for <code>priorVersion</code> will be removed.</p>
148: * @param res Represents a resource that this ontology supercedes.
149: * @exception OntProfileException If the {@link Profile#PRIOR_VERSION} property is not supported in the current language profile.
150: */
151: public void setPriorVersion(Resource res);
152:
153: /**
154: * <p>Add a resource representing an ontology that this ontology
155: * (strictly, the ontology reprsented by this node) supercedes.</p>
156: * @param res Represents a resource that this ontology supercedes.
157: * @exception OntProfileException If the {@link Profile#PRIOR_VERSION} property is not supported in the current language profile.
158: */
159: public void addPriorVersion(Resource res);
160:
161: /**
162: * <p>Answer a resource that represents an ontology that is superceded by this ontology. If there is
163: * more than one such resource, an arbitrary selection is made.</p>
164: * @return An ont resource representing an ontology that this ontology supercedes
165: * @exception OntProfileException If the {@link Profile#PRIOR_VERSION} property is not supported in the current language profile.
166: */
167: public OntResource getPriorVersion();
168:
169: /**
170: * <p>Answer an iterator over all of the resources representing
171: * ontologies that this ontology supercedes.
172: * Each element of the iterator will be an {@link OntResource}.</p>
173: * @return An iterator over the ontology resources superceded by this ontology
174: * @exception OntProfileException If the {@link Profile#PRIOR_VERSION} property is not supported in the current language profile.
175: */
176: public ExtendedIterator listPriorVersion();
177:
178: /**
179: * <p>Answer true if this ontology (the ontology represented by this
180: * resource) supercedes the given resource.</p>
181: * @param res A resource to test against
182: * @return True if this ontology supercedes the ontology represented by <code>res</code>
183: */
184: public boolean hasPriorVersion(Resource res);
185:
186: /**
187: * <p>Remove the statement that the given ontology is a prior version of this ontology. If this statement
188: * is not true of the current model, nothing happens.</p>
189: * @param res A resource that represents an ontology that is no longer a prior version of this ontology
190: */
191: public void removePriorVersion(Resource res);
192:
193: // incompatibleWith
194:
195: /**
196: * <p>Assert that this ontology is incompatible with the given ontology. Any existing
197: * statements for <code>incompatibleWith</code> will be removed.</p>
198: * @param res Represents a resource that this ontology is incompatible with.
199: * @exception OntProfileException If the {@link Profile#INCOMPATIBLE_WITH} property is not supported in the current language profile.
200: */
201: public void setIncompatibleWith(Resource res);
202:
203: /**
204: * <p>Add a resource representing an ontology that this ontology
205: * (strictly, the ontology reprsented by this node) is incompatible with.</p>
206: * @param res Represents a resource that this ontology is incompatible with.
207: * @exception OntProfileException If the {@link Profile#INCOMPATIBLE_WITH} property is not supported in the current language profile.
208: */
209: public void addIncompatibleWith(Resource res);
210:
211: /**
212: * <p>Answer a resource that represents an ontology that is is incompatible with this ontology. If there is
213: * more than one such resource, an arbitrary selection is made.</p>
214: * @return An ont resource representing an ontology that this ontology is incompatible with
215: * @exception OntProfileException If the {@link Profile#INCOMPATIBLE_WITH} property is not supported in the current language profile.
216: */
217: public OntResource getIncompatibleWith();
218:
219: /**
220: * <p>Answer an iterator over all of the resources representing
221: * ontologies that this ontology is incompatible with.
222: * Each element of the iterator will be an {@link OntResource}.</p>
223: * @return An iterator over the ontology resources that this ontology is incompatible with
224: * @exception OntProfileException If the {@link Profile#INCOMPATIBLE_WITH} property is not supported in the current language profile.
225: */
226: public ExtendedIterator listIncompatibleWith();
227:
228: /**
229: * <p>Answer true if this ontology (the ontology represented by this
230: * resource) is incompatible with the given resource.</p>
231: * @param res A resource to test against
232: * @return True if this ontology is incompatible with the ontology represented by <code>res</code>
233: */
234: public boolean isIncompatibleWith(Resource res);
235:
236: /**
237: * <p>Remove the statement that the given ontology is incompatible with this ontology. If this statement
238: * is not true of the current model, nothing happens.</p>
239: * @param res A resource that represents an ontology that is no longer incompatible with this ontology
240: */
241: public void removeIncompatibleWith(Resource res);
242:
243: }
244:
245: /*
246: (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
247: All rights reserved.
248:
249: Redistribution and use in source and binary forms, with or without
250: modification, are permitted provided that the following conditions
251: are met:
252:
253: 1. Redistributions of source code must retain the above copyright
254: notice, this list of conditions and the following disclaimer.
255:
256: 2. Redistributions in binary form must reproduce the above copyright
257: notice, this list of conditions and the following disclaimer in the
258: documentation and/or other materials provided with the distribution.
259:
260: 3. The name of the author may not be used to endorse or promote products
261: derived from this software without specific prior written permission.
262:
263: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
264: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
265: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
266: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
267: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
268: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
269: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
270: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
271: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
272: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
273: */
|