Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package it.unibz.krdb.obda.sesame.r2rml;
  
  /*
   * #%L
   * ontop-obdalib-sesame
   * %%
   * Copyright (C) 2009 - 2014 Free University of Bozen-Bolzano
   * %%
   * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * #L%
  */

Author(s):
timea bagosi Class responsible to construct an OBDA model from an R2RML mapping file or graph.
 
 
 import java.io.File;
 import java.net.URI;
 
 
 public class R2RMLReader {
 	
 	private R2RMLManager manager;
 	private OBDADataFactory fac = OBDADataFactoryImpl.getInstance();
 
 	
 	private Graph graph ;
 	
 	public R2RMLReader(Graph graph) {
 		 = new R2RMLManager(graph);
 		this. = graph;
 	}
 	
 	public R2RMLReader(String file)
 	{
 		this(new File(file));
 	}
 	
 	public R2RMLReader(File fileOBDAModel model)
 	{
 		this(file);
 		 = model;
 	}
 	
 	public R2RMLReader(File file)
 	{
 		 = new R2RMLManager(file);
 	}
 	
 	public void setOBDAModel(OBDAModel model)
 	{
 		this. = model;
 	}

the method that gives the obda model based on the given graph

Parameters:
sourceUri - the uri of the datasource of the model
Returns:
the read obda model
 
 	public OBDAModel readModel(URI sourceUri){
 		try {
 			//add to the model the mappings retrieved from the manager
 		} catch (DuplicateMappingException e) {
 		}
 		return ;
 	}

method to read the mappings from the graph

Returns:
list of obdaMappingAxioms
 
 	}
 	
 
 	public static void main(String args[])
 	{
		String file = "/Users/timi/Documents/hdd/Project/Test Cases/mapping1.ttl";
	//	"C:/Project/Timi/Workspace/obdalib-parent/quest-rdb2rdf-compliance/src/main/resources/D014/r2rmla.ttl";
	//"C:/Project/Timi/Workspace/obdalib-parent/quest-rdb2rdf-compliance/src/main/resources/D004/WRr2rmlb.ttl";
		R2RMLReader reader = new R2RMLReader(file);
		for (OBDAMappingAxiom ax : axioms)
	}
New to GrepCode? Check out our FAQ X