Class DefaultSQLDBTypeFactory
- java.lang.Object
-
- it.unibz.inf.ontop.model.type.impl.DefaultSQLDBTypeFactory
-
- All Implemented Interfaces:
DBTypeFactory,SQLDBTypeFactory
- Direct Known Subclasses:
DB2DBTypeFactory,DenodoDBTypeFactory,DremioSQLDBTypeFactory,H2SQLDBTypeFactory,MySQLDBTypeFactory,OracleDBTypeFactory,PostgreSQLDBTypeFactory,SparkSQLDBTypeFactory,SQLServerDBTypeFactory,TeiidSQLDBTypeFactory
public class DefaultSQLDBTypeFactory extends Object implements SQLDBTypeFactory
See https://www.w3.org/TR/r2rml/#natural-mapping
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDefaultSQLDBTypeFactory.DefaultTypeCode-
Nested classes/interfaces inherited from interface it.unibz.inf.ontop.model.type.DBTypeFactory
DBTypeFactory.Factory
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultSQLDBTypeFactory(Map<String,DBTermType> typeMap, it.unibz.inf.ontop.com.google.common.collect.ImmutableMap<DefaultSQLDBTypeFactory.DefaultTypeCode,String> defaultTypeCodeMap)
-
Method Summary
-
-
-
Field Detail
-
ABSTRACT_DB_TYPE_STR
protected static final String ABSTRACT_DB_TYPE_STR
- See Also:
- Constant Field Values
-
TEXT_STR
public static final String TEXT_STR
- See Also:
- Constant Field Values
-
CHAR_STR
public static final String CHAR_STR
- See Also:
- Constant Field Values
-
CHARACTER_STR
protected static final String CHARACTER_STR
- See Also:
- Constant Field Values
-
VARCHAR_STR
protected static final String VARCHAR_STR
- See Also:
- Constant Field Values
-
CHAR_VAR_STR
protected static final String CHAR_VAR_STR
- See Also:
- Constant Field Values
-
CLOB_STR
protected static final String CLOB_STR
- See Also:
- Constant Field Values
-
CHAR_LARGE_STR
protected static final String CHAR_LARGE_STR
- See Also:
- Constant Field Values
-
NATIONAL_TEXT_STR
public static final String NATIONAL_TEXT_STR
- See Also:
- Constant Field Values
-
NTEXT_STR
public static final String NTEXT_STR
- See Also:
- Constant Field Values
-
NATIONAL_CHAR_STR
protected static final String NATIONAL_CHAR_STR
- See Also:
- Constant Field Values
-
NCHAR_STR
protected static final String NCHAR_STR
- See Also:
- Constant Field Values
-
NATIONAL_CHAR_VAR_STR
protected static final String NATIONAL_CHAR_VAR_STR
- See Also:
- Constant Field Values
-
NVARCHAR_STR
protected static final String NVARCHAR_STR
- See Also:
- Constant Field Values
-
NATIONAL_CHAR_LARGE_STR
protected static final String NATIONAL_CHAR_LARGE_STR
- See Also:
- Constant Field Values
-
INTEGER_STR
public static final String INTEGER_STR
- See Also:
- Constant Field Values
-
INT_STR
protected static final String INT_STR
- See Also:
- Constant Field Values
-
TINYINT_STR
public static final String TINYINT_STR
- See Also:
- Constant Field Values
-
SMALLINT_STR
public static final String SMALLINT_STR
- See Also:
- Constant Field Values
-
BIGINT_STR
protected static final String BIGINT_STR
- See Also:
- Constant Field Values
-
NUMERIC_STR
protected static final String NUMERIC_STR
- See Also:
- Constant Field Values
-
DECIMAL_STR
protected static final String DECIMAL_STR
- See Also:
- Constant Field Values
-
FLOAT_STR
protected static final String FLOAT_STR
- See Also:
- Constant Field Values
-
REAL_STR
protected static final String REAL_STR
- See Also:
- Constant Field Values
-
DOUBLE_STR
protected static final String DOUBLE_STR
- See Also:
- Constant Field Values
-
DOUBLE_PREC_STR
protected static final String DOUBLE_PREC_STR
- See Also:
- Constant Field Values
-
BOOLEAN_STR
protected static final String BOOLEAN_STR
- See Also:
- Constant Field Values
-
DATE_STR
public static final String DATE_STR
- See Also:
- Constant Field Values
-
TIME_STR
public static final String TIME_STR
- See Also:
- Constant Field Values
-
TIMESTAMP_STR
public static final String TIMESTAMP_STR
- See Also:
- Constant Field Values
-
BINARY_STR
protected static final String BINARY_STR
- See Also:
- Constant Field Values
-
BINARY_VAR_STR
protected static final String BINARY_VAR_STR
- See Also:
- Constant Field Values
-
VARBINARY_STR
protected static final String VARBINARY_STR
- See Also:
- Constant Field Values
-
BINARY_LARGE_STR
protected static final String BINARY_LARGE_STR
- See Also:
- Constant Field Values
-
BLOB_STR
protected static final String BLOB_STR
- See Also:
- Constant Field Values
-
defaultStrictEqSupport
protected final NonStringNonNumberNonBooleanNonDatetimeDBTermType.StrictEqSupport defaultStrictEqSupport
-
-
Constructor Detail
-
DefaultSQLDBTypeFactory
protected DefaultSQLDBTypeFactory(Map<String,DBTermType> typeMap, it.unibz.inf.ontop.com.google.common.collect.ImmutableMap<DefaultSQLDBTypeFactory.DefaultTypeCode,String> defaultTypeCodeMap)
-
-
Method Detail
-
createDefaultSQLTypeMap
protected static Map<String,DBTermType> createDefaultSQLTypeMap(TermType rootTermType, TypeFactory typeFactory)
Returns a mutable map so that it can be modified by sub-classes
-
createDefaultSQLCodeMap
protected static Map<DefaultSQLDBTypeFactory.DefaultTypeCode,String> createDefaultSQLCodeMap()
Returns a mutable map so that it can be modified by sub-classes NB: we use the largest option among the DB datatypes mapped to the same XSD type.
-
getDBTermType
public DBTermType getDBTermType(String typeName)
- Specified by:
getDBTermTypein interfaceDBTypeFactory
-
getDBTermType
public DBTermType getDBTermType(String typeName, int columnSize)
- Specified by:
getDBTermTypein interfaceDBTypeFactory
-
getDBTrueLexicalValue
public String getDBTrueLexicalValue()
- Specified by:
getDBTrueLexicalValuein interfaceDBTypeFactory
-
getDBFalseLexicalValue
public String getDBFalseLexicalValue()
- Specified by:
getDBFalseLexicalValuein interfaceDBTypeFactory
-
getNullLexicalValue
public String getNullLexicalValue()
- Specified by:
getNullLexicalValuein interfaceDBTypeFactory
-
getDBNaNLexicalValue
public Optional<String> getDBNaNLexicalValue()
- Specified by:
getDBNaNLexicalValuein interfaceDBTypeFactory
-
preprocessTypeName
protected String preprocessTypeName(String typeName, int columnSize)
By default, ignore the column size Can be overridden
-
getDBStringType
public DBTermType getDBStringType()
- Specified by:
getDBStringTypein interfaceDBTypeFactory
-
getDBLargeIntegerType
public DBTermType getDBLargeIntegerType()
- Specified by:
getDBLargeIntegerTypein interfaceDBTypeFactory
-
getDBDecimalType
public DBTermType getDBDecimalType()
- Specified by:
getDBDecimalTypein interfaceDBTypeFactory
-
getDBBooleanType
public DBTermType getDBBooleanType()
- Specified by:
getDBBooleanTypein interfaceDBTypeFactory
-
getDBDateType
public DBTermType getDBDateType()
- Specified by:
getDBDateTypein interfaceDBTypeFactory
-
getDBTimeType
public DBTermType getDBTimeType()
- Specified by:
getDBTimeTypein interfaceDBTypeFactory
-
getDBDateTimestampType
public DBTermType getDBDateTimestampType()
- Specified by:
getDBDateTimestampTypein interfaceDBTypeFactory
-
getDBDoubleType
public DBTermType getDBDoubleType()
- Specified by:
getDBDoubleTypein interfaceDBTypeFactory
-
getDBGeometryType
public DBTermType getDBGeometryType()
- Specified by:
getDBGeometryTypein interfaceDBTypeFactory
-
getDBGeographyType
public DBTermType getDBGeographyType()
- Specified by:
getDBGeographyTypein interfaceDBTypeFactory
-
supportsDBGeometryType
public boolean supportsDBGeometryType()
- Specified by:
supportsDBGeometryTypein interfaceDBTypeFactory
-
supportsDBGeographyType
public boolean supportsDBGeographyType()
- Specified by:
supportsDBGeographyTypein interfaceDBTypeFactory
-
supportsDBDistanceSphere
public boolean supportsDBDistanceSphere()
- Specified by:
supportsDBDistanceSpherein interfaceDBTypeFactory
-
getDBHexBinaryType
public DBTermType getDBHexBinaryType()
- Specified by:
getDBHexBinaryTypein interfaceDBTypeFactory
-
getAbstractRootDBType
public DBTermType getAbstractRootDBType()
- Specified by:
getAbstractRootDBTypein interfaceDBTypeFactory
-
-