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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:42:38+00:00 2026-05-15T08:42:38+00:00

I have created an RDF/OWL file using Protege 4.1 alpha. I also created a

  • 0

I have created an RDF/OWL file using Protege 4.1 alpha.
I also created a defined class in Protege called CheapPhone. This class has a restriction which is shown below :

(hasPrice some integer[< 350])

Whenever, a price of a phone is below 350, it is inferred as CheapPhone.
There is no problem for inferring this in Protege 4.1 alpha. However, I cannot infer this using Jena.

I also created a defined class called SmartPhone. This class also has a restriction which is shown below :

(has3G value true) and (hasInternet value true)

Whenever, a phone has 3G and Internet, it is inferred as SmartPhone.
In this situation, there is no problem inferring this in both Protege and Jena.

I have started to think that there is a problem in default inference engine of Jena.
The code that I use in Java is below :

Reasoner reasoner = ReasonerRegistry.getOWLReasoner();

reasoner = reasoner.bindSchema(ontModel);
    OntModelSpec ontModelSpec = OntModelSpec.OWL_MEM_MINI_RULE_INF;
    ontModelSpec.setReasoner(reasoner);
    // Create ontology model with reasoner support
            // ontModel was created and read before, so I don't share the code in order
            // not to create garbage here
    OntModel model = ModelFactory.createOntologyModel(ontModelSpec, ontModel);

    OntClass sPhone = model.getOntClass(ns + "SmartPhone");
    ExtendedIterator s = sPhone.listInstances();
    while(s.hasNext()) {
        OntResource mp = (OntResource)s.next();
        System.out.println(mp.getURI());
    }

This code works perfectly and returns me the instances, but when I change the code below and make it appropriate for CheapPhone, it doesn’t return anything.

OntClass sPhone = model.getOntClass(ns + "CheapPhone");

Am I doing something wrong ?

  • 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-05-15T08:42:38+00:00Added an answer on May 15, 2026 at 8:42 am

    Data ranges (the [< 350] bit) is a feature of OWL 2. Jena doesn’t support OWL 2. See W3C’s OWL 2 Implementations page for a list of tools with OWL 2 support—you’ll have to use one of those. (Some experimental ongoing work for Jena is listed there, but this definitely hasn’t made it into a Jena release yet.)

    • 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 have created a C# class file by using a XSD-file as an input.
I have this xml file, how can I create RDF triple from it using
I have created a smalldatetime field. I am using a dbml file to access
I have created an EDMX in visual studio 2010 SP1. It has been built
I have created an android application that calls (using kSOAP library) a SOAP based
I have a problem reading OWL/XML files from Java using Jena. I have no
I have created some sample ontology in protege.According to my ontology there is a
I have created a simple web service called TimeServerBean . It's working properly, the
Anyone have any interest in intergrating RDF and/or SPARQL with a PICK database? Has

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.