/
DatetimeDBTermType.java
55 lines (45 loc) · 1.3 KB
/
DatetimeDBTermType.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package it.unibz.inf.ontop.model.type.impl;
import it.unibz.inf.ontop.model.type.DBTermType;
import it.unibz.inf.ontop.model.type.RDFDatatype;
import it.unibz.inf.ontop.model.type.TermTypeAncestry;
import java.util.Optional;
public class DatetimeDBTermType extends DBTermTypeImpl {
private final RDFDatatype rdfDatatype;
protected DatetimeDBTermType(String name, TermTypeAncestry parentAncestry, RDFDatatype rdfDatatype) {
super(name, parentAncestry, false);
this.rdfDatatype = rdfDatatype;
}
@Override
public Category getCategory() {
return Category.DATETIME;
}
@Override
public Optional<RDFDatatype> getNaturalRDFDatatype() {
return Optional.of(rdfDatatype);
}
/**
* TODO: check if it is safe or not
*/
@Override
public boolean isNeedingIRISafeEncoding() {
return true;
}
/**
* TODO: check if TZ are allowed are not
*/
@Override
public boolean areEqualitiesStrict() {
return false;
}
@Override
public Optional<Boolean> areEqualitiesStrict(DBTermType otherType) {
return Optional.of(false);
}
/**
* TODO: check if TZ are allowed are not
*/
@Override
public boolean areEqualitiesBetweenTwoDBAttributesStrict() {
return false;
}
}