1 /*
2 wsmo4j - a WSMO API and Reference Implementation
3
4 Copyright (c) 2004-2005, OntoText Lab. / SIRMA
5
6 This library is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the Free
8 Software Foundation; either version 2.1 of the License, or (at your option)
9 any later version.
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 details.
14 You should have received a copy of the GNU Lesser General Public License along
15 with this library; if not, write to the Free Software Foundation, Inc.,
16 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 /**
20 * <p>Title: WSMO4J</p>
21 * <p>Description: WSMO API and a Reference Implementation</p>
22 * <p>Copyright: Copyright (c) 2004-2005</p>
23 * <p>Company: OntoText Lab. / SIRMA </p>
24 */
25
26 package org.omwg.ontology;
27
28 import org.omwg.logicalexpression.terms.Term;
29
30
31 /**
32 * Data Value reoresents wsml data values (correspond to xml data values).
33 *
34 * The following is a table of the java binding for wsml data values:
35 * <pre>
36 * _string _string("any-character*") java.lang.String
37 * _decimal _decimal("'-'?numeric+.numeric+") java.math.BigDecimal
38 * _integer _integer("'-'?numeric+") java.math.BigInteger
39 * _float _float("see XML Schema document") java.lang.Float
40 * _double _double("see XML Schema document") java.lang.Double
41 * _iri _iri("iri-according-to-rfc3987") java.lang.String
42 * _sqname _sqname("iri-rfc3987", "localname") java.lang.String[]
43 * _boolean _boolean("true-or-false") java.lang.Boolean
44 * _duration _duration(year, month, day, hour, minute, second) java.lang.String
45 * _dateTime _dateTime(year, month, day, hour, minute, second, timezone-hour, timezone-minute)
46 * _dateTime(year, month, day, hour, minute, second) java.util.Calendar
47 * _time _time(hour, minute, second, timezone-hour, timezone-minute)
48 * _time(hour, minute, second) java.util.Calendar
49 * _date _date(year, month, day, timezone-hour, timezone-minute)
50 * _date(year, month, day) java.util.Calendar
51 * _gyearmonth _gyearmonth(year, month) java.lang.Integer[]
52 * _gyear _gyear(year) java.lang.Integer
53 * _gmonthday _gmonthday(month, day) java.lang.Integer[]
54 * _gday _gday(day) java.lang.Integer
55 * _gmonth _gmonth(month) java.lang.Integer
56 * _hexbinary _hexbinary(hexadecimal-encoding) java.lang.String
57 * _base64binary _base64binary(hexadecimal-encoding) java.lang.String
58 * </pre>
59 * <p>Note that for the Calendar types you one can for the mapping only rely on the fields
60 * given by the corresponding wsml value, e.g. if you ask the Calendar object for Calendar.hour
61 * that you got from a _wsml#date value, the API provides no gurantue
62 * on the return value.</p>
63 * <pre>
64 * Created on Sep 6, 2005
65 * Committed by $Author: holgerlausen $
66 * $Source$,
67 * </pre>
68 *
69 * @author Holger Lausen (holger.lausen@deri.org)
70 *
71 * @see org.omwg.ontology.ComplexDataValue
72 * @see org.omwg.ontology.SimpleDataValue
73 * @version $Revision: 1030 $ $Date: 2005-09-21 11:15:39 +0300 (Wed, 21 Sep 2005) $
74 */
75 public interface DataValue extends Value, Term {
76
77 WsmlDataType getType();
78
79 Object getValue();
80
81 /**
82 * @supplierCardinality 1
83 * @supplierRole has-type
84 * @directed
85 */
86 /*# WsmlDataType lnkWsmlDataType; */
87 }
88
89 /*
90 * $Log$
91 * Revision 1.9 2005/09/21 08:15:39 holgerlausen
92 * fixing java doc, removing asString()
93 *
94 * Revision 1.8 2005/09/06 18:23:53 holgerlausen
95 * removed createSimpleTypes from LogicalExpressionFactory
96 * splited DataValue into simple and complex value classes
97 * removed explicit classes for simple datavalues (now all org.omwg.ontology.SimpledataValue)
98 * adopted Term visitor to new data structure
99 *
100 * Revision 1.7 2005/09/02 13:32:43 ohamano
101 * move logicalexpression packages from ext to core
102 * move tests from logicalexpression.test to test module
103 *
104 * Revision 1.6 2005/09/02 09:43:28 ohamano
105 * integrate wsmo-api and le-api on api and reference implementation level; full parser, serializer and validator integration will be next step
106 *
107 * Revision 1.5 2005/08/19 08:59:38 marin_dimitrov
108 * -
109 *
110 */