Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 271871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:13:51+00:00 2026-05-12T00:13:51+00:00

I am using rowlex in my project. I have a property assigned to an

  • 0

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?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:13:52+00:00Added an answer on May 12, 2026 at 12:13 am

    For every ontology class, ROWLEX generates two .NET classes a “full” and a “light” one. The two autogenerated classes are differentiated by naming convention. If your OWL class is named “Student” than the light class will be named “Student”, too. The full class is named “Student_”. They are completely exchangeable with one another, the sheer purpose of having two is convenience. The full class contains every possible methods/properties you need. The light class contains only the most frequently used ones. The problem with full classes that they get really crowded. For every single OWL property you will get 10 (!) properties and methods for in your .NET class:

    • Add (typesafe)
    • Add (not typesafe)
    • Remove (typesafe)
    • Remove (not typesafe)
    • Replace (typesafe)
    • Replace (not typesafe)
    • Non array property (typesafe)
    • Non array property (not typesafe)
    • Array property (typesafe)
    • Array property (not typesafe)

    If you have just 5 OWL properties to cater for, the autogenerated .NET full class will have 5×10 methods/properties. These high number of members easily defeat the usefulness of intellisense. Hence generally the use of light classes are recommended.

    On the light class, you have only the non array property implemented (unless cardinality restrictions explicitly direct otherwise) and that property internally calls the replace method. In your case you need to use the full class.

    This is how you get and use the full class (I did not verify the code):

    Student_ student = (Student_)rdfDoc.GetIndividual(uri_stu, Student.Uri, false);
    student.AddstudyMemberOf(new Project(uri_proj, rdfDoc));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using android 2.3.3, I have a background Service which has a socket connection. There's
when using Rowlex OwlGrinder to generate an assembly from an OWL file the above
Using MVC2 I have an AJAX form which is posting to a bound model.
I'm recently working on a semantic web application project using Rowlex. I've reached some
Using Java,I have to fetch multiple sets of values from an XML file to
Using MVVM. I have a DataTemplate which I am using to display an expander
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
Using C# for ASP.NET and MOSS development, we often have to embed JavaScript into
Using the HTML5 File API I can get the Binary String representation of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.