* First check if the literals' datatypes are comparable. If so,
* compile the comparison into a datatype reasoner
* satisfiability check.
*/
if( dtr.isSatisfiable( Arrays.asList( type1, type2 ) ) ) {
Facet f = lt
? inclusive
? Facet.XSD.MIN_INCLUSIVE
: Facet.XSD.MIN_EXCLUSIVE
: inclusive
? Facet.XSD.MAX_INCLUSIVE
: Facet.XSD.MAX_EXCLUSIVE;
final ATermAppl canon1 = dtr.getCanonicalRepresentation( term1 );
final ATermAppl baseType = (ATermAppl) canon1
.getArgument( ATermUtils.LIT_URI_INDEX );
final ATermAppl dr = ATermUtils
.makeRestrictedDatatype( baseType, new ATermAppl[] { ATermUtils
.makeFacetRestriction( f.getName(), canon1 ) } );
if( dtr.isSatisfiable( Collections.singleton( dr ), l2val ) )
return true;
else
return false;
}