kumar rohit
2016-12-01 20:30:48 UTC
Hi
I want to create student instances of my Student class and enter his
details. Then at the end I writes model to the file.
OntClass std = model.getOntClass(ns + "Student");
Individual mystd = std.createIndividual(ns + stdname);
In the file when I enter name of a student, i-e Bob, it saves to the file
along other information like department, address etc.
Next time, when I enter another student name, i-e Alice, it replaces
previous instances of students and currently only one student is saved to
file.
I want record of all students so need all student instances. I used for
file writing.
try (FileOutputStream write = new FileOutputStream("D://students.owl")) {
model.write(write, "RDF/XML");
I want to create student instances of my Student class and enter his
details. Then at the end I writes model to the file.
OntClass std = model.getOntClass(ns + "Student");
Individual mystd = std.createIndividual(ns + stdname);
In the file when I enter name of a student, i-e Bob, it saves to the file
along other information like department, address etc.
Next time, when I enter another student name, i-e Alice, it replaces
previous instances of students and currently only one student is saved to
file.
I want record of all students so need all student instances. I used for
file writing.
try (FileOutputStream write = new FileOutputStream("D://students.owl")) {
model.write(write, "RDF/XML");