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   /***
9    * Data values are instances of the RDF Schema class rdfs:Literal. Literals
10   * can be either plain (no datatype) or typed. Datatypes are instances of the
11   * class rdfs:Datatype. In RDF/XML, the type of a literal is specified by an
12   * rdf:datatype attribute.
13   */
14  public class OdmDataValue {
15  
16  	String value;
17  	OdmDataType type;
18  	/***
19  	 * 
20  	 */
21  	public OdmDataValue(String v) {
22  		value = v;
23  		type = null;
24  	}
25  	
26  	public OdmDataValue(String v, OdmDataType t) {
27  		value = v;
28  		type = t;
29  	}
30  	
31  	public boolean isPlain() {
32  		if (type == null) {
33  			return true;
34  		}
35  		else {
36  			return false;
37  		}
38  	}
39  	
40  	//****************** setters/getters ********************
41  	
42  	public String getValue() {
43  		return value;
44  	}
45  	
46  	public OdmDataType getType() {
47  		return type;
48  	}
49  }