private SQLPPTriplesMap getMapping ( TriplesMap tm ) throws Exception { String sourceQuery = r2rmlParser . getSQLQuery ( tm ) . trim ( ) ; ImmutableList < TargetAtom > body = getMappingTripleAtoms ( tm ) ; //Function head = getHeadAtom(body); //CQIE targetQuery = DATALOG_FACTORY.getCQIE(head, body); // TODO: consider a R2RML-specific type of triples map SQLPPTriplesMap mapping = new OntopNativeSQLPPTriplesMap ( "mapping-" + tm . hashCode ( ) , MAPPING_FACTORY . 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 ; }
Get OBDA mapping axiom from R2RML TriplesMap