Java Code Examples for com.hp.hpl.jena.datatypes.xsd.XSDDatatype

The following examples show how to use com.hp.hpl.jena.datatypes.xsd.XSDDatatype. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 6 votes vote down vote up
public static NodeType typedLiteral(RDFDatatype datatype) {
	// TODO These subclasses can be abolished; just introduce an RDFDatatypeValidator instead
	if (datatype.equals(XSDDatatype.XSDdate)) {
		return XSD_DATE;
	}
	if (datatype.equals(XSDDatatype.XSDtime)) {
		return XSD_TIME;
	}
	if (datatype.equals(XSDDatatype.XSDdateTime)) {
		return XSD_DATETIME;
	}
	if (datatype.equals(XSDDatatype.XSDboolean)) {
		return XSD_BOOLEAN;
	}
	return new LiteralNodeType("", datatype);
}
 
Example 2
Source Project: r2rml-parser   Source File: Generator.java    License: Apache License 2.0 6 votes vote down vote up
private String getStringValue(String field, ResultSet rs) {
	String result = null;
	try {
		if (rs.getObject(field) == null) return null;

		BaseDatatype fieldDataType = findFieldDataType(field, rs);

		if (fieldDataType != null && fieldDataType.getURI().equals(XSDDatatype.XSDdate.getURI())) {
			result = xsdDateFormat.format(rs.getDate(field));
		} else {
			result = rs.getString(field);
		}
	} catch (Exception e) {
		log.error("Failed to get value as string for column " + field, e);
	}
	return result;
}
 
Example 3
Source Project: micro-integrator   Source File: SparqlQueryBase.java    License: Apache License 2.0 5 votes vote down vote up
private String convertRSToString (QuerySolution soln, String colName) {
	if (soln.getLiteral(colName).getDatatype() == null) {
		return soln.getLiteral(colName).getString();
	} else {
		String colType = soln.getLiteral(colName).getDatatype().getURI();
		if (colType.equals(XSDDatatype.XSDdecimal.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil.convertToDecimal(soln
							.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDdouble.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToDouble(soln.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDfloat.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToFloat(soln.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDstring.getURI())) {
			return soln.getLiteral(colName).getString();
		} else if (colType.equals(XSDDatatype.XSDboolean.getURI())) {
			return ConverterUtil
					.convertToString(ConverterUtil.convertToBoolean(soln
							.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDlong.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToLong(soln.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDdate.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToDate(soln.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDdateTime.getURI())) {
			return ConverterUtil
					.convertToString(ConverterUtil.convertToDateTime(soln
							.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDtime.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToTime(soln.getLiteral(colName).getString()));
		} else {
			return soln.getLiteral(colName).getString();
		}
	}	
}
 
Example 4
Source Project: micro-integrator   Source File: SPARQLQuery.java    License: Apache License 2.0 5 votes vote down vote up
private String convertRSToString (QuerySolution soln, String colName) {
	if (soln.getLiteral(colName).getDatatype() == null) {
		return soln.getLiteral(colName).getString();
	} else {
		String colType = soln.getLiteral(colName).getDatatype().getURI();
		if (colType.equals(XSDDatatype.XSDdecimal.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil.convertToDecimal(soln
							.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDdouble.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToDouble(soln.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDfloat.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToFloat(soln.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDstring.getURI())) {
			return soln.getLiteral(colName).getString();
		} else if (colType.equals(XSDDatatype.XSDboolean.getURI())) {
			return ConverterUtil
					.convertToString(ConverterUtil.convertToBoolean(soln
							.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDlong.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToLong(soln.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDdate.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToDate(soln.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDdateTime.getURI())) {
			return ConverterUtil
					.convertToString(ConverterUtil.convertToDateTime(soln
							.getLiteral(colName).getString()));
		} else if (colType.equals(XSDDatatype.XSDtime.getURI())) {
			return ConverterUtil.convertToString(ConverterUtil
					.convertToTime(soln.getLiteral(colName).getString()));
		} else {
			return soln.getLiteral(colName).getString();
		}
	}	
}
 
Example 5
Source Project: GeoTriples   Source File: JenaGraphExample.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
	// Load mapping file
	Model mapModel = FileManager.get().loadModel("doc/example/mapping-iswc.ttl");
	
	// Read mapping file
	D2RQReader reader = new D2RQReader(mapModel, "http://localhost:2020/");
	Mapping mapping = reader.getMapping();
	
	// Compile mapping for D2RQ engine
	CompiledMapping compiled = mapping.compile();

	// Set up the GraphD2RQ
	GraphD2RQ g = new GraphD2RQ(compiled);

	// Create a find(spo) pattern 
	Node subject = Node.ANY;
	Node predicate = DC.date.asNode();
	Node object = Node.createLiteral("2003", null, XSDDatatype.XSDgYear);
	Triple pattern = new Triple(subject, predicate, object);

	// Query the graph
	Iterator<Triple> it = g.find(pattern);
	
	// Output query results
	while (it.hasNext()) {
		Triple t = it.next();
	    System.out.println("Published in 2003: " + t.getSubject());
	}
	g.close();
}
 
Example 6
Source Project: micro-integrator   Source File: SparqlQueryBase.java    License: Apache License 2.0 4 votes vote down vote up
public RDFNode convertTypeLiteral(Model model, InternalParam param)
		throws DataServiceFault {
	String value = param.getValue().getScalarValue();
	String type = param.getSqlType();
	if (type == null) {
		return model.createTypedLiteral(value);
	} else if (DBConstants.XSDTypes.INTEGER.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDinteger);
	} else if (DBConstants.XSDTypes.ANYURI.equals(type)) {
		return model.createResource(value);
	} else if (DBConstants.XSDTypes.DECIMAL.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDdecimal);
	} else if (DBConstants.XSDTypes.DOUBLE.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDdouble);
	} else if (DBConstants.XSDTypes.FLOAT.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDfloat);
	} else if (DBConstants.XSDTypes.STRING.equals(type)) {
		return model.createTypedLiteral(value);
	} else if (DBConstants.XSDTypes.BOOLEAN.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDboolean);
	} else if (DBConstants.XSDTypes.LONG.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDlong);
	} else if (DBConstants.XSDTypes.DATE.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDdate);
	} else if (DBConstants.XSDTypes.DATETIME.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDdateTime);
	} else if (DBConstants.XSDTypes.TIME.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDtime);
	} else if (DBConstants.XSDTypes.GYEARMONTH.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgYearMonth);
	} else if (DBConstants.XSDTypes.GYEAR.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgYear);
	} else if (DBConstants.XSDTypes.GMONTHDAY.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgMonthDay);
	} else if (DBConstants.XSDTypes.GDAY.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgDay);
	} else if (DBConstants.XSDTypes.GMONTH.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgMonth);
	} else if (DBConstants.XSDTypes.HEXBINARY.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDhexBinary);
	} else if (DBConstants.XSDTypes.BASE64BINARY.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDbase64Binary);
	} else if (DBConstants.XSDTypes.QNAME.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDQName);
	} else if (DBConstants.XSDTypes.NOTATION.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDNOTATION);
	} else {
		throw new DataServiceFault("[" + this.getDataService().getName()
				+ "]  Found Unsupported data type : " + type
				+ " as input parameter.");
	}

}
 
Example 7
Source Project: micro-integrator   Source File: SPARQLQuery.java    License: Apache License 2.0 4 votes vote down vote up
private RDFNode convertTypeLiteral(Model model, InternalParam param)
           throws DataServiceFault {
	String value = param.getValue().getScalarValue();
	String type = param.getSqlType();
	if (type == null) {
		return model.createTypedLiteral(value);
	} else if (DBConstants.XSDTypes.INTEGER.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDinteger);
	} else if (DBConstants.XSDTypes.ANYURI.equals(type)) {
		return model.createResource(value);
	} else if (DBConstants.XSDTypes.DECIMAL.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDdecimal);
	} else if (DBConstants.XSDTypes.DOUBLE.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDdouble);
	} else if (DBConstants.XSDTypes.FLOAT.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDfloat);
	} else if (DBConstants.XSDTypes.STRING.equals(type)) {
		return model.createTypedLiteral(value);
	} else if (DBConstants.XSDTypes.BOOLEAN.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDboolean);
	} else if (DBConstants.XSDTypes.LONG.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDlong);
	} else if (DBConstants.XSDTypes.DATE.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDdate);
	} else if (DBConstants.XSDTypes.DATETIME.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDdateTime);
	} else if (DBConstants.XSDTypes.TIME.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDtime);
	} else if (DBConstants.XSDTypes.GYEARMONTH.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgYearMonth);
	} else if (DBConstants.XSDTypes.GYEAR.equals(type) ) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgYear);
	} else if (DBConstants.XSDTypes.GMONTHDAY.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgMonthDay);
	} else if (DBConstants.XSDTypes.GDAY.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgDay);
	} else if (DBConstants.XSDTypes.GMONTH.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDgMonth);
	} else if (DBConstants.XSDTypes.HEXBINARY.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDhexBinary);
	} else if (DBConstants.XSDTypes.BASE64BINARY.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDbase64Binary);
	} else if (DBConstants.XSDTypes.QNAME.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDQName);
	} else if (DBConstants.XSDTypes.NOTATION.equals(type)) {
		return model.createTypedLiteral(value,XSDDatatype.XSDNOTATION);
	} else {
		throw new DataServiceFault("[" + this.getDataService().getName()
				+ "]  Found Unsupported data type : " + type
				+ " as input parameter.");
	}

}
 
Example 8
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
DateLiteralNodeType() {
	super("", XSDDatatype.XSDdate);
}
 
Example 9
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
public boolean matches(Node node) {
	return super.matches(node) && XSDDatatype.XSDdate.isValid(node.getLiteralLexicalForm());
}
 
Example 10
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
public Node makeNode(String value) {
	if (!XSDDatatype.XSDdate.isValid(value)) return null;
	return Node.createLiteral(value, null, XSDDatatype.XSDdate);
}
 
Example 11
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
TimeLiteralNodeType() {
	super("", XSDDatatype.XSDtime);
}
 
Example 12
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
public boolean matches(Node node) {
	return super.matches(node) && XSDDatatype.XSDtime.isValid(node.getLiteralLexicalForm());
}
 
Example 13
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
public Node makeNode(String value) {
	if (!XSDDatatype.XSDtime.isValid(value)) return null;
	return Node.createLiteral(value, null, XSDDatatype.XSDtime);
}
 
Example 14
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
DateTimeLiteralNodeType() {
	super("", XSDDatatype.XSDdateTime);
}
 
Example 15
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
public boolean matches(Node node) {
	return super.matches(node) && XSDDatatype.XSDdateTime.isValid(node.getLiteralLexicalForm());
}
 
Example 16
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
public Node makeNode(String value) {
	if (!XSDDatatype.XSDdateTime.isValid(value)) return null;
	return Node.createLiteral(value, null, XSDDatatype.XSDdateTime);
}
 
Example 17
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
BooleanLiteralNodeType() {
	super("", XSDDatatype.XSDboolean);
}
 
Example 18
Source Project: GeoTriples   Source File: TypedNodeMaker.java    License: Apache License 2.0 4 votes vote down vote up
public boolean matches(Node node) {
	return super.matches(node) && XSDDatatype.XSDboolean.isValid(node.getLiteralLexicalForm());
}
 
Example 19
Source Project: r2rml-parser   Source File: UtilImpl.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * returns an XSD datatype according to an XSD declaration
 */
public BaseDatatype findDataType(String dataType) {
	if ("anyURI".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDanyURI;
   	} else if ("base64Binary".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDbase64Binary;
   	} else if ("boolean".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDboolean;
   	} else if ("byte".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDbyte;
   	} else if ("date".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDdate;
   	} else if ("dateTime".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDdateTime;
   	} else if ("decimal".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDdecimal;
   	} else if ("double".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDdouble;
   	} else if ("duration".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDduration;
   	} else if ("ENTITY".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDENTITY;
   	} else if ("float".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDfloat;
   	} else if ("gDay".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDgDay;
   	} else if ("gMonth".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDgMonth;
   	} else if ("gMonthDay".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDgMonthDay;
   	} else if ("gYear".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDgYear;
   	} else if ("gYearMonth".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDgYearMonth;
   	} else if ("hexBinary".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDhexBinary;
   	} else if ("ID".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDID;
   	} else if ("IDREF".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDIDREF;
   	} else if ("int".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDint;
   	} else if ("integer".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDinteger;
   	} else if ("language".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDlanguage;
   	} else if ("long".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDlong;
   	} else if ("Name".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDName;
   	} else if ("NCName".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDNCName;
   	} else if ("negativeInteger".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDnegativeInteger;
   	} else if ("NMTOKEN".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDNMTOKEN;
   	} else if ("nonNegativeInteger".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDnonNegativeInteger;
   	} else if ("nonPositiveInteger".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDnonPositiveInteger;
   	} else if ("normalizedString".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDnormalizedString;
   	} else if ("NOTATION".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDNOTATION;
   	} else if ("positiveInteger".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDpositiveInteger;
   	} else if ("QName".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDQName;
   	} else if ("short".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDshort;
   	} else if ("string".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDstring;
   	} else if ("time".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDtime;
   	} else if ("token".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDtoken;
   	} else if ("unsignedByte".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDunsignedByte;
   	} else if ("unsignedInt".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDunsignedInt;
   	} else if ("unsignedLong".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDunsignedLong;
   	} else if ("unsignedShort".equalsIgnoreCase(dataType)) {
   		return XSDDatatype.XSDunsignedShort;
   	} else {
   		log.error("Found unknown datatype " + dataType);
   		System.exit(1);
   	}
	return null;
}
 
Example 20
Source Project: r2rml-parser   Source File: UtilImpl.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * returns an XSD datatype according to the type of an SQL field
 */
public BaseDatatype findDataTypeFromSql(String sqlDataType) {
	sqlDataType = sqlDataType.toLowerCase();
	if (sqlDataType.equals("character")
			|| sqlDataType.equals("text") 
			|| sqlDataType.contains("varchar")
			|| sqlDataType.contains("char")
			|| sqlDataType.contains("varbit")
			|| sqlDataType.contains("cidr")
			|| sqlDataType.contains("inet")
			|| sqlDataType.contains("macaddr")
			|| sqlDataType.contains("uuid")) {
   		//return XSDDatatype.XSDstring;
		//if the sql field type is a string, it is ok to omit the xsd datatype from the result
		return null;
   	} else if (sqlDataType.equals("binary")
   			|| sqlDataType.equals("bytea")) {
   		return XSDDatatype.XSDbase64Binary;
   	} else if (sqlDataType.contains("numeric")
   			|| sqlDataType.contains("decimal")) {
   		return XSDDatatype.XSDdecimal;
   	} else if (sqlDataType.equals("smallint") 
   			|| sqlDataType.equals("integer") 
   			|| sqlDataType.equals("bigint")
   			|| sqlDataType.equals("int")
   			|| sqlDataType.equals("int2")
   			|| sqlDataType.equals("int4")
   			|| sqlDataType.equals("int8")
   			|| sqlDataType.equals("serial")
   			|| sqlDataType.equals("serial4")
   			|| sqlDataType.equals("bigserial")) {
       	return XSDDatatype.XSDinteger;
   	} else if (sqlDataType.equals("float")
   			|| sqlDataType.equals("float4")
   			|| sqlDataType.equals("float8")
   			|| sqlDataType.equals("real")
   			|| sqlDataType.equals("double precision")
   			|| sqlDataType.equals("number")) {
       	return XSDDatatype.XSDdouble;
   	} else if (sqlDataType.equals("boolean")
   			|| sqlDataType.equals("bool")) {
       	return XSDDatatype.XSDboolean;
   	} else if (sqlDataType.equals("date")) {
       	return XSDDatatype.XSDdate;
   	} else if (sqlDataType.equals("time")
   			|| sqlDataType.equals("timetz")) {
       	return XSDDatatype.XSDtime;
   	} else if (sqlDataType.equals("timestamp")
   			|| sqlDataType.equals("timestamptz")) {
       	return XSDDatatype.XSDdateTime;
       } else {
   		log.error("Found unknown SQL sqlDataType " + sqlDataType);
   		System.exit(1);
   	}
	return null;
}