Hello, I am using rowlex in my project. I have a property assigned to an individual in my RDF file, which has a value. For example for individual 'Student', there is a property 'isMemberOf', with value of a class uri 'class00021'. Then I want to add a second value to this property. For instance a 'Project' value with uri 'proj000052'.
The problem appears here: after adding the second value, first value is thrown out of property 'isMemberOf', even out of its individual (student), and is stored as a new individual.
The code I used for this operation is like this:
//Add a class to a student
public void Add_Class
(string uri_stu, string uri_class)
{
//Open RDF
RdfDocument rdfDoc = new RdfDocument(@"RDF_Repository\RDF_Student.rdf");
//Find the student
//Student student = new Student(uri_stu, rdfDoc);
Student student = (Student)rdfDoc.GetIndividual(uri_stu);
//Add a class
student.studyMemberOf = new ClassOfCourse(uri_class, rdfDoc);
rdfDoc.ExportToRdfXml(@"RDF_Repository\RDF_Student.rdf");
}
//Add a project to a student
public void Add_Project
(string uri_stu, string uri_proj)
{
//Open RDF
RdfDocument rdfDoc = new RdfDocument(@"RDF_Repository\RDF_Student.rdf");
//Find the student
Student student = (Student)rdfDoc.GetIndividual(uri_stu);
//Add a project
student.studyMemberOf = new Project(uri_proj, rdfDoc);
rdfDoc.ExportToRdfXml(@"RDF_Repository\RDF_Student.rdf");
}
The resulted RDF is like this:
<?xml version="1.0"?>
<rdf:RDF xmlns:Ontologyowl="http://www.owl-ontologies.com/Ontology1243411901.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Ontologyowl:Student rdf:about="stu000012">
<Ontologyowl:studyMemberOf>
<Ontologyowl:Project rdf:about="proj000052"/>
</Ontologyowl:studyMemberOf>
</Ontologyowl:Student>
<Ontologyowl:ClassOfCourse rdf:about="class000021"/>
</rdf:RDF>
... and if we continue adding, the previous property will be thrown out. So how can I overcome this problem?