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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:09:51+00:00 2026-06-08T16:09:51+00:00

my ontology has a Road class, and a shop class. The Road class has

  • 0

my ontology has a Road class, and a shop class.

The Road class has an individual called ‘highstreetroad’ which is related to 8 different shop individuals.

I’m trying to print all the existing statements where ‘Road hasShop Shop’. There should be 8 statements, but it only ever gives me one. I am using Jena to do this. Here is an example from my code:

ExtendedIterator<Individual> i = model.listIndividuals(RoadCls);
        while (i.hasNext())
        {
          Individual indi = i.next();
          System.out.println( indi.getProperty(hasShopCls) );
        }

I believe the reason is due to the ‘getProperty’ as the javadoc says that only one will be returned, but i want more than one:

“Answer some statement (this, p, O) in the associated model. If there are several such statements, any one of them may be returned. If no such statements exist, null is returned – in this is differs from getRequiredProperty.”

thanks

  • 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-08T16:09:52+00:00Added an answer on June 8, 2026 at 4:09 pm

    In that case, you want OntResource.listPropertyValues.

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

Sidebar

Related Questions

I have simple ontology called campus.owl.There is a class calledLecturer and which has two
I'm trying to comprehend ontology basics. Here's an example: car (class) 2009 VW CC
I have an ontology where arc_cfp is an individual of class Arc . I
I have an owl ontology in which has a DatatypeProperty hasAge Can anyone tell
I am trying to parse the xml file which has collection of nested tags.I
I'm trying to read an ontology manually designed on Protege 4 to update It
I am trying to use Rowlex for the opencalais ontology found here http://www.opencalais.com/files/owl.opencalais-4.3a.xml I
I am trying to work with the owlim library to edit the owl ontology
I have some ontology (campus.owl). There are tree classes (Student, Sport, Lecturer). Student class
I am currently constructing an OWL ontology, which - until very recently classified rapidly

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.