public FDLTest(String name){
super(name);
}
public void doFDL(String outputFDLFile) {
SesameRenderer renderer = new SesameRenderer();
org.w3c.dom.Document doc;
try {
/* Set up the repository that contains Fresnel lenses and formats */
fresnelRepository = new SailRepository(new MemoryStore());
fresnelRepository.initialize();
RepositoryConnection fresnelConnection = fresnelRepository.getConnection();
File fresnelFile = new File(TEST_FRESNEL_PROGRAM_FILE_NAME);
fresnelConnection.add(fresnelFile, fresnelFile.toURL().toString(), RDFFormat.N3);
/* Set up the repository that contains RDF data */
dataRepository = new SailRepository(new MemoryStore());
dataRepository.initialize();
RepositoryConnection dataConnection = dataRepository.getConnection();
File dataFile = new File(FOAF_TEST_MODEL_FILE);
dataConnection.add(dataFile, dataFile.toURL().toString(), RDFFormat.RDFXML);
doc = renderer.render(fresnelRepository, "", dataRepository);
if (outputFDLFile != null) {
StreamResult res = new StreamResult(new File(outputFDLFile));
RendererUtils.printDoc(doc, res);
}