소스 검색

Author and book test

Christophe Debruyne 8 년 전
부모
커밋
b3468867d3
1개의 변경된 파일34개의 추가작업 그리고 22개의 파일을 삭제
  1. 34 22
      test/test/TestR2RMLCOL.java

+ 34 - 22
test/test/TestR2RMLCOL.java

@@ -50,33 +50,45 @@ public class TestR2RMLCOL extends TestCase {
 //		model.write(System.out, "Turtle");
 //		model.write(System.out, "Turtle");
 //	}
 //	}
 	
 	
-	public void testExampleCSV04() {
-		Configuration configuration = new Configuration();
-		configuration.setMappingFile("./test/resources/COL04.mapping.ttl");
-		configuration.getCSVFiles().add("./test/resources/COLAUTHOR.CSV");
-		configuration.getCSVFiles().add("./test/resources/COLBOOK.CSV");
-		R2RMLProcessor engine = new R2RMLProcessor(configuration);
-		engine.execute();
-		Model model = engine.getDataset().getDefaultModel();
-		model.setNsPrefix("ex", "http://example.com/ns#");
-		model.setNsPrefix("person", "http://example.com/person/");
-		model.setNsPrefix("book", "http://example.com/book/");
-		model.setNsPrefix("rdf", RDF.uri);
-		model.write(System.out, "Turtle");
-	}
+//	public void testExampleCSV04() {
+//		Configuration configuration = new Configuration();
+//		configuration.setMappingFile("./test/resources/COL04.mapping.ttl");
+//		configuration.getCSVFiles().add("./test/resources/COLAUTHOR.CSV");
+//		configuration.getCSVFiles().add("./test/resources/COLBOOK.CSV");
+//		R2RMLProcessor engine = new R2RMLProcessor(configuration);
+//		engine.execute();
+//		Model model = engine.getDataset().getDefaultModel();
+//		model.setNsPrefix("ex", "http://example.com/ns#");
+//		model.setNsPrefix("person", "http://example.com/person/");
+//		model.setNsPrefix("book", "http://example.com/book/");
+//		model.setNsPrefix("rdf", RDF.uri);
+//		model.write(System.out, "Turtle");
+//	}
+//	
+//	public void testExampleCSV05() {
+//		Configuration configuration = new Configuration();
+//		configuration.setMappingFile("./test/resources/COL05.mapping.ttl");
+//		configuration.getCSVFiles().add("./test/resources/COLAUTHOR.CSV");
+//		configuration.getCSVFiles().add("./test/resources/COLBOOK.CSV");
+//		R2RMLProcessor engine = new R2RMLProcessor(configuration);
+//		engine.execute();
+//		Model model = engine.getDataset().getDefaultModel();
+//		model.setNsPrefix("ex", "http://example.com/ns#");
+//		model.setNsPrefix("person", "http://example.com/person/");
+//		model.setNsPrefix("book", "http://example.com/book/");
+//		model.setNsPrefix("rdf", RDF.uri);
+//		model.write(System.out, "Turtle");
+//	}
 	
 	
-	public void testExampleCSV05() {
+	public void testExampleCSV03() {
 		Configuration configuration = new Configuration();
 		Configuration configuration = new Configuration();
-		configuration.setMappingFile("./test/resources/COL05.mapping.ttl");
-		configuration.getCSVFiles().add("./test/resources/COLAUTHOR.CSV");
-		configuration.getCSVFiles().add("./test/resources/COLBOOK.CSV");
+		configuration.setMappingFile("./test/resources/COL03.mapping.ttl");
+		configuration.setUser("root");
+		configuration.setPassword("root");
+		configuration.setConnectionURL("jdbc:mysql://127.0.0.1/modseditor2");
 		R2RMLProcessor engine = new R2RMLProcessor(configuration);
 		R2RMLProcessor engine = new R2RMLProcessor(configuration);
 		engine.execute();
 		engine.execute();
 		Model model = engine.getDataset().getDefaultModel();
 		Model model = engine.getDataset().getDefaultModel();
-		model.setNsPrefix("ex", "http://example.com/ns#");
-		model.setNsPrefix("person", "http://example.com/person/");
-		model.setNsPrefix("book", "http://example.com/book/");
-		model.setNsPrefix("rdf", RDF.uri);
 		model.write(System.out, "Turtle");
 		model.write(System.out, "Turtle");
 	}
 	}