01 /*
02 * ObjectProperty.java
03 *
04 * Niraj Aswani, 09/March/07
05 *
06 * $Id: ObjectProperty.java 11598 2009-10-13 13:44:17Z johann_p $
07 */
08 package gate.creole.ontology;
09
10 import java.util.Set;
11
12 /**
13 * ObjectProperty is a sub type of the RDFProperty. This property takes
14 * a set of OClasses as its domain and range. The property can be then
15 * assigned to an instance, where the subject instance must belongs to
16 * all the OClasses (Transitive closure) specified in the domain and the
17 * object instance must belongs to all the OClass (Transitive Closure)
18 * specified in the range.
19 *
20 * @author Niraj Aswani
21 * @author Johann Petrak
22 *
23 */
24 public interface ObjectProperty extends RDFProperty {
25 /**
26 * Returns the set of inverse properties for this property.
27 *
28 * @return a {@link Set} of {@link ObjectProperty} value.
29 */
30 public Set<ObjectProperty> getInverseProperties();
31
32 /**
33 * Set theInverse as inverse property to this property.
34 *
35 * @param theInverse
36 */
37 public void setInverseOf(ObjectProperty theInverse);
38
39 /**
40 * Returns the set of domain restrictions for this property.
41 */
42 public Set<OResource> getDomain();
43
44 /**
45 * Gets the set of range restrictions for this property.
46 *
47 * @return a set of {@link OClass} or {@link Class} objects.
48 */
49 public Set<OResource> getRange();
50
51 /**
52 * Checks whether the provided instance is compatible with the range
53 * restrictions on the property.
54 *
55 * @param anInstance the Instance
56 * @return true if this instance is compatible with the range
57 * restrictions on the property. False otherwise.
58 */
59 public boolean isValidRange(OInstance anInstance);
60
61 /**
62 * Checks whether the provided instance is compatible with the domain
63 * restrictions on the property.
64 *
65 * @param anInstance the Instance
66 * @return true if this instance is compatible with the domain
67 * restrictions on the property. False otherwise.
68 */
69 public boolean isValidDomain(OInstance anInstance);
70
71 }
|