|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.d2rq.sql.types.DataType
public abstract class DataType
Represents a SQL data type. TODO: Data types should know whether they can be used in DISTINCT queries
Nested Class Summary | |
---|---|
static class |
DataType.GenericType
|
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
DataType(Vendor sqlSyntax,
String name)
|
Method Summary | |
---|---|
boolean |
isIRISafe()
|
boolean |
isUnsupported()
|
String |
name()
Returns the datatype's name as reported by JDBC metadata (or closest equivalent), for debugging |
String |
rdfType()
Return the appropriate RDF datatype for a SQL data type. |
boolean |
supportsDistinct()
|
protected Vendor |
syntax()
|
String |
toSQLLiteral(String value)
Creates a SQL literal for the given value, suitable for comparison to a column of this indicated type. |
String |
toString()
|
String |
value(ResultSet resultSet,
int column)
Retrieves a string value in preferred format (canonical form of the closest XSD type) from a SQL ResultSet. |
String |
valueRegex()
A regular expression that covers the lexical form of all values of this datatype (in their RDF representation). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public DataType(Vendor sqlSyntax, String name)
name
- Name as reported by JDBC metadata, for debuggingMethod Detail |
---|
public String rdfType()
null
indicates a known SQL type that cannot be mapped to RDF.
xsd:string
etc.public boolean isIRISafe()
public boolean supportsDistinct()
true
if this column can be used in SELECT DISTINCT
queriespublic boolean isUnsupported()
public String toSQLLiteral(String value)
NULL
is returned.
value
- A value
public String value(ResultSet resultSet, int column) throws SQLException
resultSet
- Result of a SELECT querycolumn
- The column index to retrieve; leftmost columns is 1
null
if SQL result was null or is not representable in the XSD type
SQLException
public String valueRegex()
public String toString()
toString
in class Object
protected Vendor syntax()
public String name()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |