01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.sail.lubm;
07:
08: import info.aduna.io.FileUtil;
09:
10: import java.io.File;
11:
12: import junit.framework.TestCase;
13: import edu.lehigh.swat.bench.uba.Generator;
14:
15: /**
16: *
17: */
18: public class LUBMTest extends TestCase {
19:
20: public LUBMTest(String name) {
21: super (name);
22: }
23:
24: public void test1() throws Exception {
25: File tmpDir = FileUtil.createTempDir("lubm-data");
26: generateDataFiles(tmpDir);
27: }
28:
29: private void generateDataFiles(File dataDir) {
30: // LUBM Generator writes the data files in the directory
31: // indicated by the "user.dir" system property
32: String userDir = System.getProperty("user.dir");
33: System.setProperty("user.dir", dataDir.getPath());
34:
35: int univNum = 1;
36: int startIndex = 0;
37: int seed = 0;
38: boolean daml = false;
39: String ontology = "http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl";
40:
41: System.out.println("Generating data files in directory "
42: + dataDir);
43:
44: Generator dataGenerator = new Generator();
45: dataGenerator.start(univNum, startIndex, seed, daml, ontology);
46:
47: System.setProperty("user.dir", userDir);
48: }
49: }
|