code: private SQLPPMapping extractPPMapping(Optional<SQLPPMapping> ppMapping) throws MappingException, SQLException {
  
          SQLPPMapping mapping;
  	    if (!ppMapping.isPresent()) {
              it.unibz.inf.ontop.spec.mapping.PrefixManager prefixManager = specificationFactory.createPrefixManager(ImmutableMap.of());
              MappingMetadata mappingMetadata = specificationFactory.createMetadata(prefixManager,
  					UriTemplateMatcher.create(Stream.empty(), termFactory));
              mapping = ppMappingFactory.createSQLPreProcessedMapping(ImmutableList.of(), mappingMetadata);
          }
          else
              mapping = ppMapping.get();
  
  		currentMappingIndex = mapping.getTripleMaps().size() + 1;
  		return bootstrapMappings(mapping);
  	}
docs: *
  extract all the mappings from a datasource
  
  @return a new OBDA Model containing all the extracted mappings