@Deprecated private Term getExplicitTypedObject(String string) { Term typedObject = null; String[] strings = string.split("<"); if (strings.length > 1) { String consts = strings[0]; consts = consts.substring(0, consts.length() - 2); consts = trim(consts); String type = strings[1]; if (type.endsWith(">")) type = type.substring(0, type.length() - 1); DatatypePredicate predicate = new DatatypePredicateImpl(type, COL_TYPE.OBJECT); Term constant = fac.getConstantLiteral(consts); typedObject = fac.getFunction(predicate, constant); } return typedObject; }
/** * get a typed atom of a specific type * * @param type * - iri, blanknode or literal * @param string * - the atom as string * @return the contructed Function atom */ private Function getTermTypeAtom(String string, Object type, String joinCond) { if (type.equals(R2RMLVocabulary.iri)) { return getURIFunction(string, joinCond); } else if (type.equals(R2RMLVocabulary.blankNode)) { return getTypedFunction(string, 2, joinCond); } else if (type.equals(R2RMLVocabulary.literal)) { return getTypedFunction(trim(string), 3, joinCond); } return null; }
String var = trim(string.substring(begin + 1, end));