/** * the method that gives the obda model based on the given graph * @param sourceUri - the uri of the datasource of the model * @return the read obda model */ public OBDAModel readModel(URI sourceUri){ try { //add to the model the mappings retrieved from the manager obdaModel.addMappings(sourceUri, manager.getMappings(m)); } catch (DuplicateMappingException e) { e.printStackTrace(); } return obdaModel; }
/** * the method that gives the obda model based on the given graph * @param dataSource - the datasource of the model * @return the read obda model */ public OBDAModel readModel(OBDADataSource dataSource){ try { obdaModel.addSource(dataSource); URI sourceUri = dataSource.getSourceID(); //add to the model the mappings retrieved from the manager obdaModel.addMappings(sourceUri, manager.getMappings(m)); } catch (DuplicateMappingException e) { e.printStackTrace(); } return obdaModel; }