package rbench.rbenchgui; import rbench.FORTH_RDF_Generator; /** * This test shows how you can generate RDF/S data using FORTH_RDF_Generator * * @author Yannis Theoharis * @version 1.0 (24 December 2005) */ public class TestRBenchAPI { private int numOfResourcesG=0; private int depthOfSchemaTreeG=0; private int reprG=0; private double skewFactorZG = 0.0; private int levelOfFavouredSubtreeG=0; private String schemaFileG=null; private String dataFileG=null; private String dbUrlG=null; private String dbLoginG=null; private String dbPasswordG=null; private FORTH_RDF_Generator gen=null; public TestRBenchAPI() throws Exception { int repr = FORTH_RDF_Generator.SchemaAware_ISA; //int repr = FORTH_RDF_Generator.SchemaAware_NOISA; //int repr = FORTH_RDF_Generator.HYBRID; String path = "C:"; int depthOfSchemaTree = 4; int levelOfFavouredSubtree = 0; int numOfResources = 1000; double skewFactorZ = 1.0; String schemaFile = new String(path + "/schema.rdf"); String dataFile = new String(path + "/data.rdf"); String dbUrl = new String("localhost:5432/test1"); String dbLogin = new String("theohari"); String dbPassword = new String(""); //Use this constructor if you want to use RSSDB FORTH_RDF_Generator gen = new FORTH_RDF_Generator(repr, depthOfSchemaTree, levelOfFavouredSubtree, numOfResources, skewFactorZ, schemaFile, dataFile, dbUrl, dbLogin, dbPassword); //Use this constructor if you want to only the files stored on your disc. //FORTH_RDF_Generator gen = new FORTH_RDF_Generator(depthOfSchemaTree, levelOfFavouredSubtree, numOfResources, skewFactorZ, schemaFile, dataFile); boolean createSchema=true; gen.createRDFFiles(createSchema); gen.loadFilesIntoDBUsingRSSDB(createSchema); } public static void main(String[] args) throws Exception { new TestRBenchAPI(); } }