1 /*
2 * @author Giorgos Anestis, TUC/MUSIC
3 *
4 * @version 2.0
5 */
6 package org.dbe.studio.tools.ontologyviewer.metamodels.odm;
7
8 import java.util.Vector;
9
10 /***
11 * An exhaustive enumeration of individuals that together form the
12 * instances of a class.
13 * A class description of the "enumeration" kind is defined with the
14 * owl:oneOf property. The value of this built-in OWL property must be
15 * a list of individuals that are the instances of the class. This enables
16 * a class to be described by exhaustively enumerating its instances.
17 * The class extension of a class described with owl:oneOf contains exactly
18 * the enumerated individuals, no more, no less. The list of individuals is
19 * typically represented with the help of the RDF construct
20 * rdf:parseType="Collection", which provides a convenient shorthand for
21 * writing down a set of list elements.
22 *
23 */
24 public class OdmEnumeratedClass extends OdmOntologyClass {
25
26 Vector oneOf;
27
28 public OdmEnumeratedClass() {
29 oneOf = new Vector();
30 }
31
32 /***
33 * @param ontology
34 * @param name
35 * @param id
36 */
37 public OdmEnumeratedClass(OdmOntology ontology, String name, String id) {
38 super(ontology, name, id);
39 oneOf = new Vector();
40 }
41
42 public OdmEnumeratedClass(OdmOntology ontology, String name, String id, Vector oneOf) {
43 super(ontology, name, id);
44 this.oneOf = oneOf;
45 }
46
47 public void setOneOf(Vector oneOf) {
48 this.oneOf = oneOf;
49 }
50
51 public Vector getOneOf() {
52 return oneOf;
53 }
54
55 public void addIndividual(OdmOntologyClassInst individual) {
56 oneOf.add(individual);
57 }
58
59 public void removeIndividual(OdmOntologyClassInst individual) {
60 oneOf.remove(individual);
61 }
62 }