semantic web - How to import rdf file into named graph? -
i new rdf. have foaffriends.rdf file in working directory. need import , use named graph store in tdb model rather unnamed model , store in external xml file. following code produces blank files. how can fix this? how know uri use?
string directory = "mydatabases/dataset1" ; dataset dataset = tdbfactory.createdataset(directory) ; dataset.begin(readwrite.read) ; model model = dataset.getnamedmodel("foaffriends.rdf") ; dataset.commit(); fileoutputstream fout=new fileoutputstream( "samresult.xml"); model.write(fout); dataset.end();
Comments
Post a Comment