Posts

Showing posts with the label jena

read and write from file using java and the RDF model

Image
Clash Royale CLAN TAG #URR8PPP read and write from file using java and the RDF model I want to read from a file then write it in a RDF/XML model in a file using java, I've done the initial part in reading the file, but i didn't know how to write it in a file withe the RDF/XML model so I cam have the correct format. here is part of the read file code: try { File file1 = new File("Data/960.txt"); FileReader fileReader1 = new FileReader(file1); BufferedReader bufferedReader1 = new BufferedReader(fileReader1); StringBuffer stringBuffer = new StringBuffer(); String line1; System.out.println("Proteins & Synonyms:"); int count = 0; while ((line1=bufferedReader1.readLine()) != null) { String list1 = line1.split("t"); if (list1.length < 2) continue; proteinG=model2.createResource(ProtURI+list1[0]); ...