code: private Term evalStr(Function term) {
  		Term innerTerm = term.getTerm(0);
  		if (innerTerm instanceof Function) {
  			Function function = (Function) innerTerm;
  			Predicate predicate = function.getFunctionSymbol();
  			Term parameter = function.getTerm(0);
  			if (function.isDataTypeFunction()) {
  				if (isXsdString(predicate) ) { // R: was datatype.equals(OBDAVocabulary.RDFS_LITERAL_URI)
  					return termFactory.getTypedTerm(
  							termFactory.getVariable(parameter.toString()), typeFactory.getXsdStringDatatype());
  				} 
  
  				else {
  					return termFactory.getTypedTerm(
  							termFactory.getFunctionCast(termFactory.getVariable(parameter.toString()),
  									termFactory.getConstantLiteral(typeFactory.getXsdStringDatatype().getIRI().getIRIString())),
  										typeFactory.getXsdStringDatatype());
  				}
  			} 
  			else if (predicate instanceof URITemplatePredicate) {
  				return termFactory.getTypedTerm(function.clone(), typeFactory.getXsdStringDatatype());
  			} 
  			else if (predicate instanceof BNodePredicate) {
  				return valueNull;
  			}
  		}
  		return term;
  	}
docs: /*
  Expression evaluator for str() function