public abstract class DataType extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DataType.GenericType |
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
DataType(Vendor sqlSyntax,
String name) |
Modifier and Type | Method and Description |
---|---|
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).
|
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 valuepublic String value(ResultSet resultSet, int column) throws SQLException
resultSet
- Result of a SELECT querycolumn
- The column index to retrieve; leftmost columns is 1null
if SQL result was null or is not representable in the XSD typeSQLException
public String valueRegex()
protected Vendor syntax()
public String name()