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 7804421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:54:31+00:00 2026-06-02T01:54:31+00:00

I am currently developing an ontology using protege and would like to determine if

  • 0

I am currently developing an ontology using protege and would like to determine if a node is a last one of a list. So basically a list points to a node and every node has some content and can have another node:

List startsWith some Node

Node hasContent some Content

Node hasNext some Node

Now I’d like to define a subclass named EndNode that doesn’t point to another Node. This is what I’ve tried so far, but the after classifying, EndNode always equals Nothing:

Node and not(hasNext some Node)

Node and (hasNext exactly 0 Node)

  • 1 1 Answer
  • 0 Views
  • 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-06-02T01:54:34+00:00Added an answer on June 2, 2026 at 1:54 am

    First, there is a built-in List construct in RDF which you can use in the following way:

    ex:mylist  rdf:type  rdf:List .
    ex:myList  rdf:first  ex:firstElement .
    ex:myList  rdf:rest  _:sublist1 .
    _:sublist1 rdf:first  ex:SecondElement .
    _:sublist1  rdf:rest  rdf:nil .
    

    Here, in order to know you reach the end of the list, you need a special list called rdf:nil. This plays the same role as a null pointer at the end of a linked list in programming languages.

    However, even though rdf:List is well used in existing data on the Web, it doesn’t constrain in any way the use of the predicates rdf:first and rdf:rest, so you can have many first elements for a given list without triggering an inconsistency.

    So, if you really want to model linked list in a strict way, you need pretty expressive features of OWL. I did it a while ago and it can be found at http://purl.org/az/List.

    It’s normal that you have an empty class as you specified that a Node must have a nextNode. You should not impose that Nodes have content or next element. You should rather say that the cardinality is maximum 1, that the domain and range of hasNext is Node, and that EndNode is a node with no next node. But it’s still not enough, as it does not impose that there is an EndNode at all. You may have an infinite sequence or a loop.

    If you want to avoid loops or infinite sequence, you have to define the transitive property hasFollower and say that there is at least a follower in the class EndNode.

    All in all, implementing strict lists in OWL completely sucks in term of performance and is most of the time totally useless as rdf:List is sufficient for the wide majority of the situations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im currently developing av price list using SQL Reporting Services. In that report I
Im currently developing my first application in PyQt4, and what i would like to
I'm currently developing a web file browser using jquery and php. One of my
Currently developing an application using the newest version of symfony, obtained through PEAR. This
Im currently developing an In-House Enterprise application. I will publish the app using Apple
I am currently developing a library, HAMMER , and using CMake as its build
Currently developing a connector DLL to HP's Quality Center. I'm using their (insert expelative)
I´m currently developing a web site using Symfony2. On 'dev' environment everything works just
I am currently developing a game and I'm trying to use one AnimationDrawable to
Im currently developing an API, and one thing that I decided was to have

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.