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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:47:12+00:00 2026-06-05T18:47:12+00:00

I’m trying to read an ontology manually designed on Protege 4 to update It

  • 0

I’m trying to read an ontology manually designed on Protege 4 to update It in Eclipse with Jena. now to do simple, I just want to read the ontology from the file and to print the content back to the console.

Here is the java Jena code.

package soctrace;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.InputStreamReader;

import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.ontology.ProfileRegistry;
import com.hp.hpl.jena.rdf.model.ModelFactory;

public class Intology {

    static String xmlbase = "http://www.soctrace.org/ontologies/#";
    static String ontopath = "./ontologies/tima.owl";

    public static void main(String[] args) throws FileNotFoundException {

        manageOntologies();
    }

    public static void manageOntologies() throws FileNotFoundException{
        OntModel domainModel =ModelFactory.createOntologyModel(ProfileRegistry.OWL_DL_LANG);
        domainModel.read((new FileInputStream(ontopath)), null);        
    model.write(System.out);
    }   
}

The ontology file look like this :

<?xml version="1.0"?>
<!DOCTYPE Ontology [
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY xml "http://www.w3.org/XML/1998/namespace" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
     xml:base="http://www.soctrace.org/ontologies/tima.owl"
 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:xml="http://www.w3.org/XML/1998/namespace"
 ontologyIRI="http://www.soctrace.org/ontologies/tima.owl">
<Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
<Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
<Prefix name="" IRI="http://www.w3.org/2002/07/owl#"/>
<Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
<Annotation>
    <AnnotationProperty abbreviatedIRI=":versionInfo"/>
    <Literal datatypeIRI="&xsd;string">cette version est la promiere</Literal>
</Annotation>
<Annotation>
    <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
    <Literal datatypeIRI="&xsd;string">Cette ontologie est construite pour gerer les traces de TIMA. dans un premier temps nous allons seulement considerer que les evenements sont les elements les plus interessants a regarder, puis nous allons fournir l&#39;ontologie au gré des attentes.</Literal>
</Annotation>
<Declaration>
    <Class IRI="#Event"/>
</Declaration>
<Declaration>
    <Class IRI="#EventDuration"/>
</Declaration>
<Declaration>
    <Class IRI="#EventType"/>
</Declaration>
<Declaration>
    <Class IRI="#ValuePartition"/>
</Declaration>
<SubClassOf>
    <Class IRI="#Event"/>
    <Class abbreviatedIRI=":Thing"/>
</SubClassOf>
<SubClassOf>
    <Class IRI="#EventDuration"/>
    <Class IRI="#ValuePartition"/>
</SubClassOf>
<SubClassOf>
    <Class IRI="#EventType"/>
    <Class IRI="#ValuePartition"/>
</SubClassOf>

But when running I get through the following error :

 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 18 column 64): {W136} Relative URIs are not permitted in RDF: specifically <ontologyIRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 18 column 64): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 19 column 65): {W136} Relative URIs are not permitted in RDF: specifically <name>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 19 column 65): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 19 column 65): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 19 column 65): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 20 column 62): {W136} Relative URIs are not permitted in RDF: specifically <name>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 20 column 62): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 20 column 62): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 20 column 62): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 21 column 59): {W136} Relative URIs are not permitted in RDF: specifically <name>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 21 column 59): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 21 column 59): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 21 column 59): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 22 column 75): {W136} Relative URIs are not permitted in RDF: specifically <name>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 22 column 75): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 22 column 75): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 22 column 75): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 23 column 70): {W136} Relative URIs are not permitted in RDF: specifically <name>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 23 column 70): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 23 column 70): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 23 column 70): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 25 column 60): {W136} Relative URIs are not permitted in RDF: specifically <abbreviatedIRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 25 column 60): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
ERROR [main] (RDFDefaultErrorHandler.java:40) - (line 26 column 44): {E201} Multiple children of property element
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 26 column 44): {W136} Relative URIs are not permitted in RDF: specifically <datatypeIRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 26 column 44): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
ERROR [main] (RDFDefaultErrorHandler.java:40) - (line 26 column 73): {E202} Expecting XML start or end element(s). String data "cette version est la promiere" not allowed. Maybe there should be an rdf:parseType='Literal' for embedding mixed XML content in RDF. Maybe a striping error.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 29 column 60): {W136} Relative URIs are not permitted in RDF: specifically <abbreviatedIRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 29 column 60): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 ERROR [main] (RDFDefaultErrorHandler.java:40) - (line 30 column 44): {E201} Multiple children of property element
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 30 column 44): {W136} Relative URIs are not permitted in RDF: specifically <datatypeIRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 30 column 44): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 ERROR [main] (RDFDefaultErrorHandler.java:40) - (line 30 column 258): {E202} Expecting XML start or end element(s). String data "Cette ontologie est construite pour gerer les traces de TIMA. dans un premier temps nous allons seulement considerer que les evenements sont les elements les plus interessants a regarder, puis nous allons fournir l" not allowed. Maybe there should be an rdf:parseType='Literal' for embedding mixed XML content in RDF. Maybe a striping error.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 33 column 30): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 33 column 30): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 36 column 38): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 36 column 38): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 39 column 34): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 39 column 34): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 42 column 39): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 42 column 39): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 45 column 30): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 45 column 30): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 ERROR [main] (RDFDefaultErrorHandler.java:40) - (line 46 column 41): {E201} Multiple children of property element
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 46 column 41): {W136} Relative URIs are not permitted in RDF: specifically <abbreviatedIRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 46 column 41): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 49 column 38): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 49 column 38): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
ERROR [main] (RDFDefaultErrorHandler.java:40) - (line 50 column 39): {E201} Multiple children of property element
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 50 column 39): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 50 column 39): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 53 column 34): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 53 column 34): {W102} Unqualified property attributes are not allowed. Property treated as a relative URI.
 ERROR [main] (RDFDefaultErrorHandler.java:40) - (line 54 column 39): {E201} Multiple children of property element
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 54 column 39): {W136} Relative URIs are not permitted in RDF: specifically <IRI>
 WARN [main] (RDFDefaultErrorHandler.java:36) - (line 54 column 39): {W102} Unqualified     property attributes are not allowed. Property treated as a relative URI.

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > 
</rdf:RDF>

It will be kind if someone knows What Is missing Here.

Thaks for any reply !

  • 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-05T18:47:13+00:00Added an answer on June 5, 2026 at 6:47 pm

    That’s not an OWL RDF file. I think the syntax is OWL2 XML, which isn’t supported by Jena.

    You ought to be able to output an OWL RDF from protege, or convert using this online tool.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

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.