OClass.java |
1 /* 2 * OClass.java 3 * 4 * Copyright (c) 2002, The University of Sheffield. 5 * 6 * This file is part of GATE (see http://gate.ac.uk/), and is free 7 * software, licenced under the GNU Library General Public License, 8 * Version 2, June1991. 9 * 10 * A copy of this licence is included in the distribution in the file 11 * licence.html, and is also available at http://gate.ac.uk/gate/licence.html. 12 * 13 * Kalina Bontcheva 11/2003 14 * 15 * $Id: OClass.java,v 1.7 2004/07/23 17:45:30 kalina Exp $* 16 */ 17 18 package gate.creole.ontology; 19 20 import java.util.Set; 21 22 public interface OClass extends TClass { 23 24 /** Indicates that these are disjoint classes */ 25 public void setDisjointWith(OClass theClass); 26 27 /** Indicates that these classes are the same */ 28 public void setSameClassAs(OClass theClass); 29 30 /** Returns a set of all classes that are disjoint with ours. Null if 31 * no such classes. 32 */ 33 public Set getDisjointClasses(); 34 35 /** Returns a set of all classes that are the same as ours. Null if 36 * no such classes. 37 */ 38 public Set getSameClasses(); 39 40 /** 41 * Returns a set of all KBProperty (ako relations) for which this class is 42 * the domain (first predicate). The properties are associated with classes, 43 * not independent of them and attached via anonymous classes and restrictions 44 * as it is in DAML/OWL. Therefore our model is closer to the Protege 45 * frame-based model. The advantage of having this kind of model is that it 46 * can be generalised API both for Protege and DAML/OWL/RDF ontologies. 47 */ 48 public Set getProperties(); 49 50 /** 51 * Returns the set of properties with the given name. The set elements are 52 * instances of KBProperty or sub-classes. The reason why we need a set 53 * is because a class can have more than one property with the same name 54 * but different ranges. 55 * @param name 56 * @return a {@link Set} value. 57 */ 58 public Set getPropertiesByName(String name); 59 60 /** 61 * This method supplies all KBProperty inherited from the superclasses of the 62 * given class. Null if no such properties exist. 63 * Note that to get all properties (both inherited and associated with the 64 * current class) one needs to call both getInheritedProperties and 65 * getProperties. 66 */ 67 public Set getInheritedProperties(); 68 69 }