//fje = new FSLSesameEvaluator();
// instantiate a Fresnel parser that will create lenses and formats to be applied on a Sesame model
//FresnelSesameParser fp = new FresnelSesameParser(nsr, fhs);
FresnelSesameParser fp = new FresnelSesameParser();
fd = new FresnelDocument();
defaultLenses = new FresnelDocument();
// actually parse a Fresnel document, written in Notation 3
/*loading the RDF data from f file in the Sesame store*/
/*System.out.println("here!!");
Repository fresnelRepository = new SailRepository(new MemoryStore());
System.out.println("here**!");
try {
fresnelRepository.initialize();
System.out.println("here1*!!");
RepositoryConnection connection = fresnelRepository.getConnection();
System.out.println("here1**!!");
connection.add(lensFile, lensFile.toURL().toString(), RDFFormat.N3);
System.out.println("here1***!!");
FSLNSResolver nsr = null;
if (nsr == null) {
RepositoryResult<Namespace> nsi = connection.getNamespaces();
Namespace ns;
nsr = new FSLNSResolver();
while (nsi.hasNext()){
ns = nsi.next();
nsr.addPrefixBinding(ns.getPrefix(), ns.getName());
}
}
System.out.println("here2!!");
}
catch (Exception ex){
System.out.println("Fresnel: Error: Failed to load RDF data from " + lensFile.toString());
ex.printStackTrace();
} */
fd = fp.parse(lenaConfig.getLensFile(), Constants.N3_READER);
//The lenses, formats and groups can then be obtained as follows:
/*
Lens[] lenses = fd.getLenses();
System.out.println("LENSES found:");
for (Lens l:lenses){
System.out.println(l);
}
fr.inria.jfresnel.Format[] formats = fd.getFormats();
System.out.println("FORMATS found:\n");
for (fr.inria.jfresnel.Format f:formats) {
System.out.println(f);
}
*/
// init default lens fresnel document
defaultLenses=fp.parse(lenaConfig.getDefaultLensFile(), Constants.N3_READER);
//renderer=new SesameRenderer();
//renderer=new LenaRenderer();
rendererSetFresnelRepository(fp.getFresnelRepository());
init();
System.out.println("Initialization of JFresnelEngine successfully finished!");
}