1
2
3
4
5
6 package org.dbe.studio.tools.ontologyviewer.metamodels.odm;
7
8 import java.util.Vector;
9
10 /***
11 * Object properties link individuals to individuals. They are relations
12 * between instances of two classes
13 */
14
15 public class OdmObjectProperty extends OdmProperty {
16
17
18
19
20
21
22
23 OdmObjectProperty inverseOf;
24
25
26
27
28
29
30
31
32
33
34
35
36 boolean isInverseFunctional;
37
38
39
40
41
42
43
44
45
46
47 boolean isSymmetric;
48
49
50
51
52
53
54
55
56
57
58
59 boolean isTransitive;
60
61 /***
62 *
63 */
64 public OdmObjectProperty() {
65 super();
66 }
67
68 public OdmObjectProperty(OdmObjectProperty op) {
69 super(op.getOntology(), op.getName(), op.getId());
70 }
71
72
73 /***
74 * @param ontology
75 * @param name
76 * @param id
77 */
78 public OdmObjectProperty(OdmOntology ontology, String name, String id) {
79 super(ontology, name, id);
80 }
81
82 public void addRange(OdmOntologyClass oc) {
83 if (range == null) {
84 range = new Vector();
85 }
86 range.add(oc);
87 }
88
89 public void removeRange(OdmOntologyClass oc) {
90 if (range != null) {
91 range.remove(oc);
92 }
93 }
94
95 public void setInverseOf(OdmObjectProperty op) {
96 inverseOf = op;
97 }
98
99 public OdmObjectProperty getInverseOf() {
100 return inverseOf;
101 }
102
103 public void setIsInverseFunctional(boolean iif) {
104 isInverseFunctional = iif;
105 }
106
107 public void setIsSymmetric(boolean is) {
108 isSymmetric = is;
109 }
110
111 public void setIsTransitive(boolean it) {
112 isTransitive = it;
113 }
114
115 public boolean getIsInverseFunctional() {
116 return isInverseFunctional;
117 }
118
119 public boolean getIsSymmetric() {
120 return isSymmetric;
121 }
122
123 public boolean getIsTransitive() {
124 return isTransitive;
125 }
126 }