View Javadoc

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.wsmo.factory;
27  
28  
29  import java.math.*;
30  import java.util.*;
31  
32  import org.omwg.ontology.*;
33  import org.wsmo.common.*;
34  
35  
36  public interface DataFactory {
37      
38      public static final String DATAFACTORY_WSMO_FACTORY = "wsmo_factory";
39  
40      WsmlDataType createWsmlDataType(IRI typeIRI);
41  
42      WsmlDataType createWsmlDataType(String typeIRI);
43  
44      DataValue createDataValueFromJavaObject(WsmlDataType type, Object value);
45  
46      ComplexDataValue createDataValue(ComplexDataType type, SimpleDataValue[] argumentValues);
47  
48      ComplexDataValue createDataValue(ComplexDataType type, SimpleDataValue argumentValues);
49  
50      SimpleDataValue createWsmlString(String value);
51  
52      SimpleDataValue createWsmlDecimal(BigDecimal value);
53      SimpleDataValue createWsmlDecimal(String value);
54  
55      SimpleDataValue createWsmlInteger(BigInteger value);
56      SimpleDataValue createWsmlInteger(String value);
57  
58      ComplexDataValue createWsmlFloat(Float value);
59      ComplexDataValue createWsmlFloat(String value);
60  
61      ComplexDataValue createWsmlDouble(Double value);
62      ComplexDataValue createWsmlDouble(String value);
63  
64      ComplexDataValue createWsmlBoolean(Boolean value);
65      ComplexDataValue createWsmlBoolean(String value);
66  
67      ComplexDataValue createWsmlDuration(int year, int month, int day, int hour, int minute, int second);
68      ComplexDataValue createWsmlDuration(String year, String month, String day, String hour, String minute, String second);
69  
70      ComplexDataValue createWsmlDateTime(Calendar value);
71      ComplexDataValue createWsmlDateTime(int year, int month, int day, int hour, int minute, int second, int tzHour, int tzMinute);
72      ComplexDataValue createWsmlDateTime(int year, int month, int day, int hour, int minute, float second, int tzHour, int tzMinute);
73      ComplexDataValue createWsmlDateTime(String year, String month, String day, String hour, String minute, String second, String tzHour, String tzMinute);
74  
75      ComplexDataValue createWsmlTime(Calendar value);
76      ComplexDataValue createWsmlTime(int hour, int minute, int second, int tzHour, int tzMinute);
77      ComplexDataValue createWsmlTime(int hour, int minute, float second, int tzHour, int tzMinute);
78      ComplexDataValue createWsmlTime(String hour, String minute, String second, String tzHour, String tzMinute);
79  
80      ComplexDataValue createWsmlDate(Calendar value);
81      ComplexDataValue createWsmlDate(int year, int month, int day, int tzHour, int tzMinute);
82      ComplexDataValue createWsmlDate(String year, String month, String day, String tzHour, String tzMinute);
83  
84      ComplexDataValue createWsmlGregorianYearMonth(int year, int month);
85      ComplexDataValue createWsmlGregorianYearMonth(String year, String month);
86  
87      ComplexDataValue createWsmlGregorianYear(int year);
88      ComplexDataValue createWsmlGregorianYear(String year);
89  
90      ComplexDataValue createWsmlGregorianMonthDay(int month, int day);
91      ComplexDataValue createWsmlGregorianMonthDay(String month, String day);
92  
93      ComplexDataValue createWsmlGregorianMonth(int month);
94      ComplexDataValue createWsmlGregorianMonth(String month);
95  
96      ComplexDataValue createWsmlGregorianDay(int day);
97      ComplexDataValue createWsmlGregorianDay(String day);
98  
99      ComplexDataValue creatWsmlHexBinary(byte[] value);
100 
101     ComplexDataValue createWsmlBase64Binary(byte[] value);
102 }
103 /*
104  * $Log$
105  * Revision 1.11  2007/09/04 08:17:53  lcekov
106  * DataTypeFactory.createWsmlTime must support milliseconds
107  * https://sourceforge.net/tracker/?func=detail&atid=665346&aid=1723466&group_id=113501
108  *
109  * Revision 1.10  2007/06/22 12:35:22  lcekov
110  * DataTypeFactory.createWsmlDateTime must support milliseconds
111  * https://sourceforge.net/tracker/?func=detail&atid=665346&aid=1723466&group_id=113501
112  *
113  * Revision 1.9  2005/09/23 12:20:42  holgerlausen
114  * *** empty log message ***
115  *
116  * Revision 1.8  2005/09/17 08:50:15  vassil_momtchev
117  * wsmo_factory constant added to be used in the map of the constructor
118  *
119  * Revision 1.7  2005/09/16 12:07:05  marin_dimitrov
120  * wsmo4j.properties moved
121  *
122  * Revision 1.6  2005/09/15 15:36:19  holgerlausen
123  * additional createXXX methods for data values and /some/ unit tests
124  *
125  * Revision 1.5  2005/09/12 12:00:22  marin_dimitrov
126  * added specific createXXX methods
127  *
128  * Revision 1.4  2005/09/12 11:16:23  marin_dimitrov
129  * overloaded createWsmlDecimal and createWsmlInteger
130  *
131  * Revision 1.3  2005/09/09 10:45:51  marin_dimitrov
132  * formatting
133  *
134  */