de.fuberlin.wiwiss.d2rq.types
Class DateTimeTranslator
java.lang.Object
de.fuberlin.wiwiss.d2rq.types.DateTimeTranslator
- All Implemented Interfaces:
- Translator
public class DateTimeTranslator
- extends Object
- implements Translator
Translates from MySQL DATETIME values to xsd:dateTime values.
- Version:
- $Id: DateTimeTranslator.java,v 1.3 2006/09/11 22:29:20 cyganiak Exp $
- Author:
- Richard Cyganiak (richard@cyganiak.de)
Method Summary |
String |
toDBValue(String rdfValue)
Translates a value that comes from an RDF source (for example a query)
to a database value. |
String |
toRDFValue(String dbValue)
Translates a value that comes from the database to an RDF value
(URI, literal label, or blank node ID). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateTimeTranslator
public DateTimeTranslator()
toRDFValue
public String toRDFValue(String dbValue)
- Description copied from interface:
Translator
- Translates a value that comes from the database to an RDF value
(URI, literal label, or blank node ID). The mapping must be unique.
- Specified by:
toRDFValue
in interface Translator
- Parameters:
dbValue
- a value coming from the database
- Returns:
- the corresponding RDF value, or null if no
RDF statements should be created from the database value
toDBValue
public String toDBValue(String rdfValue)
- Description copied from interface:
Translator
- Translates a value that comes from an RDF source (for example a query)
to a database value. The mapping must be unique.
- Specified by:
toDBValue
in interface Translator
- Parameters:
rdfValue
- a value coming from an RDF source
- Returns:
- the corresponding database value, or null if the
RDF value cannot be mapped to a database value