View Javadoc

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   * In addition to the RDF datatypes, OWL provides one additional construct
12   * for defining a range of data values, namely an enumerated datatype. This
13   * datatype format makes use of the owl:oneOf construct, that is also used
14   * for describing an enumerated class.
15   */
16  public class OdmEnumeration extends OdmDataRange {
17  
18  	Vector oneOf;  //list of DataValue objects
19  	
20  	/***
21  	 * 
22  	 */
23  	public OdmEnumeration(OdmOntology ont, String name, String id) {
24  		super(ont, name, id);					
25  		oneOf = new Vector();
26  	}
27  
28  	public OdmEnumeration(Vector v, OdmOntology ont, String name, String id) {
29  		super(ont, name, id);		
30  		oneOf = v;
31  	}
32  	
33  	public void addElm(OdmDataValue elm) {
34  		//oneOf can not be null
35  		oneOf.add(elm);
36  	}
37  	
38  	public void removeElm(OdmDataValue elm) {
39  		oneOf.remove(elm);
40  	}
41  			
42  	public Vector getOneOf() {
43  		return oneOf;
44  	}
45  	
46  }
47