/** * Get OBDA mapping axiom from R2RML TriplesMap * @param tm * @return * @throws Exception */ private OBDAMappingAxiom getMapping(TriplesMap tm) throws Exception { String sourceQuery = r2rmlParser.getSQLQuery(tm).trim(); List<Function> body = getMappingTripleAtoms(tm); //Function head = getHeadAtom(body); //CQIE targetQuery = fac.getCQIE(head, body); OBDAMappingAxiom mapping = fac.getRDBMSMappingAxiom("mapping-"+tm.hashCode(), fac.getSQLQuery(sourceQuery), body); if (body.isEmpty()){ //we do not have a target query System.out.println("WARNING a mapping without target query will not be introduced : "+ mapping.toString()); return null; } return mapping; }