Re: Does rdfs:superClassOf (or equivalent) exist?

Hi All.
(as always) Thank you for your thoughts and collective experience(s). 
Perhaps I should explain my question and thinking better here which is 
that superClassOf has its uses.

My use-case is creating taxonomies where I want to express relations 
with external vocabularies/ontologies. For example, I have dpv:Policy in 
the DPV ontology and I want to express that odrl:Policy from the ODRL 
ontology is a subclass of this. In the RDF serialisation with 
rdfs:subClassOf the triples related to dpv:Policy are not in a single 
place because the subjects are different. E.g.

dpv:Policy skos:prefLabel "Policy"@en .
# 1000 lines later
odrl:Policy rdfs:subClassOf dpv:Policy .

Instead, I find it nicer and semantically correct to have:

dpv:Policy rdfs:superClassOf odrl:Policy.

where no reasoning or querying is required, the information I *want* to 
express is recorded exactly, and I am also not making statements about 
IRIs not under my control. Regarding direction of properties, I like how 
SKOS gives both broader/narrower even if they are inverse relations of 
each other - because it allows us to make appropriate statements about 
the 'subject' concept instead of just using broader and switching 
subject and object.

I understand if such use was not 'foreseen' in RDF/RDFS, and if it is 
considered to be too niche or trivial. However, I find it immensely 
helpful when working with the concepts and especially when I am 
producing documentation as the RDF matches the through process, e.g. 
description of a concept as all triples where it is the subject.

--- further notes ---

I am well aware that we can use SPARQL and other querying/reasoning to 
derive parent/super classes using rdfs:subClassOf. However, because 
there is no mechanism to *store* the results, I have to run this query 
every single time I want a concept's sub-classes. e.g. given the graph:

:A rdfs:subClassOf :X .
:B rdfs:subClassOf :X .

I have to run this query every time: `SELECT ?c WHERE { ?c 
rdfs:subClassOf X }` - which means I *must* have a query engine - 
instead if there was a way to 'store' ?c (which is the superclass 
relation) - then I only need a RDF parser.

This also makes a difference when considering discrete sets of 
information, e.g. in the earlier example, if A and B are in graph G1 and 
X is in graph G2, then the only way for X to express A and B are its 
subclasses is to include those triples from G1 in G2. Instead, having a 
superclass relation with X as the subject here is better aesthetics and 
semantics:

G1 { # A and B are 'native' to this graph
:A rdfs:subClassOf :X .
:B rdfs:subClassOf :X .
}

G2 { # X is 'native' to this graph
:A rdfs:subClassOf :X . # we have no 'control' over :A
:B rdfs:subClassOf :X . # we have no 'control' over :B
:X rdfs:superClassOf :A, :B . # we have 'control' over :X
}

---

Regards,
Harsh

On 30/10/2023 16:52, Miguel wrote:
> Hi Harshvardhan,
> just to further elaborate, with that argument you could support the 
> explicit definition of the inverse of any object property (excluding 
> symmetric properties).
> Some vocabularies do indeed adopt that convention.
> 
> The problem with that is that at the syntactic level you have always two 
> ways (for each pair of related resources) to represent the same meaning.
> Only if you explicitly state in OWL the relationship between the two 
> properties with the inverseOf expression *and* perform inference, then 
> the two versions are reconciled.
> 
> Furthermore, the direction in which a property is defined does not (at 
> least in theory) imply a specific favoured direction for traversing it, 
> as shown in the SPARQL examples by Antoine Zimmermann.
> 
> Best regards,
> Miguel
> 
> On Mon, Oct 30, 2023 at 5:47 PM Antoine Zimmermann 
> <antoine.zimmermann@emse.fr <mailto:antoine.zimmermann@emse.fr>> wrote:
> 
>     rdfs:superClassOf (respectively rdfs:superPropertyOf) does not exist in
>     any standard, nor any term equivalent to it.
> 
>     If it did, it would not add anything to reasoning or querying. If you
>     want to list all subclasses of a class <C>, you can write:
> 
>        SELECT ?subclass WHERE {
>          ?subclass  rdfs:subClassOf  <C> .
>        }
> 
>     and if you want the list of superclasses of a class <C>, you write:
> 
>        SELECT ?superclass WHERE {
>          <C>  rdfs:subClassOf  ?superclass .
>        }
> 
> 
>     What use cases would make it harder and more painful to write:
> 
>        :A  rdfs:subClassOf  :B
> 
>     than:
> 
>        :B  rdfs:superClassOf  :A
> 
>     ?
> 
> 
>     --AZ
> 
>     Le 28/10/2023 à 14:21, Harshvardhan J. Pandit a écrit :
>      > Hi.
>      > We have rdfs:subClassOf defined in a standardised specification
>     (RDFS).
>      > RDFS several times mentions 'superclass', but AFAIK there is no
>     property
>      > or relation to make this explicit, i.e.
>      >
>      > ```turtle
>      > :A rdfs:subClassOf :B . # exists
>      > :B rdfs:superClassOf :A . # does this exist anywhere?
>      > ```
>      >
>      > I can intuit why subclass relations are the most common and
>     preferred
>      > methods of use - because anyone can extend the superclass from
>     anywhere.
>      > And that either assertion can be inferred from the other (sub to
>     super,
>      > vice-versa), but I also think having the superclass be 'aware' of
>      > subclasses is a good practice in maintaining ontologies e.g. to
>     get a
>      > list of all subclasses which would normally require a query each
>     time.
>      >
>      > (Likewise for rdfs:subPropertyOf and rdfs:superPropertyOf)
>      >
>      > Apologies in advance if this has already been answered somewhere (I
>      > would appreciate it if you point me to it).
>      >
>      > Regards,
> 
>     -- 
>     Antoine Zimmermann
>     École des Mines de Saint-Étienne
>     158 cours Fauriel
>     CS 62362
>     42023 Saint-Étienne Cedex 2
>     France
>     Tél:+33(0)4 77 49 97 02
>     http://www.emse.fr/~zimmermann/ <http://www.emse.fr/~zimmermann/>
> 

-- 
---
Harshvardhan J. Pandit, Ph.D
Assistant Professor
ADAPT Centre, Dublin City University
https://harshp.com/

Received on Monday, 30 October 2023 20:19:03 UTC