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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:59:07+00:00 2026-06-13T17:59:07+00:00

I have some hierarchy and I need to write them in owl syntax. All

  • 0

I have some hierarchy and I need to write them in owl syntax. All objects
are classes no individuals here.

The relation between classes in each hierarchy is the same. For example “relates” is the relation in one hierarchy between all classes.

How should I define these relations? I know object property but I need something like subClassof relation that is between all classes in the tree(protege).

Is it possible to define such a relation in owl syntax, how should I define it?

I did it but when i validated my file i got errors.

<?xml version="1.0"?>
<rdf:RDF
    xmlns="http://example.org/1#"
    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#"
  xml:base="http://example.org/1">
  <owl:Ontology rdf:about="">
    <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    >Created with TopBraid Composer</owl:versionInfo>
  </owl:Ontology>
  <owl:Class rdf:ID="a">
    <haspart>
      <owl:Class rdf:ID="b"/>
    </haspart>
  </owl:Class>
  <rdf:Property rdf:ID="haspart">
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
  </rdf:Property>
</rdf:RDF>

these are errors

Untyped Object Property: http://example.org/1#haspart
Untyped Class: http://www.w3.org/2000/01/rdf-schema#Class

  • 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-13T17:59:08+00:00Added an answer on June 13, 2026 at 5:59 pm

    The problem is in your definition of the hasPart relation. To get rid of the two errors you mention, you should first of all define it to be an owl:ObjectProperty rather than an rdf:Property, and second of all, the domains and ranges should point to http://www.w3.org/2002/07/owl#Class, not http://www.w3.org/2000/01/rdf-schema#Class.

    But heed the advice in the comments: don’t write RDF/XML syntax by hand. It’s the worst possible way to learn how to use OWL.

    FWIW, here’s what your ontology (with corrections) would look like in Turtle:

    @prefix : <http://example.org/1#> .
    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @prefix owl: <http://www.w3.org/2002/07/owl#> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    
    [] a owl:Ontology ;
       owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
    
    :a a owl:Class ;
       :hasPart :b .
    :b a owl:Class .
    
    :hasPart a owl:ObjectProperty ;
             rdfs:domain owl:Class ;
             rdfs:range owl:Class .
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, I have some class hierarchy (possibly, with all kinds of inheritance -
I need some help to find a View inside a hierarchy. Here is how
I need some design suggestions for an Image class hierarchy. Currently, I have 2
I have some data loaded as a np.ndarray and need to convert it to
I need some help defining the following object hierarchy/ database relationship in Hibernate From
Well I have a view of this type of hierarchy Main View (having some
I have hierarchy of classes like follows (in fact I have more than 3
I have a hierarchy of classes: class Page { } class ChildPage1 extends Page
Here's an interesting problem. Is there a way to write some code using LINQ
I have an inheritance hierarchy similar to below and I want to write my

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.