Re: [protege-user] How to Create Sub-Property

Tim McIver <[email protected]>
Newsgroups gmane.comp.misc.ontology.protege.owl
Message-ID <[email protected]>
>     My expectation is that properties from the ontologies for which
>     I've created prefix mappings would show up there.
>
>
> That's not correct.

Yes, but /why/ is it not correct? I created the following small ontology 
by hand:

@prefix owl:<http://www.w3.org/2002/07/owl#> .
@prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml:<http://www.w3.org/XML/1998/namespace> .
@prefix xsd:<http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> .
@prefix dct:<http://purl.org/dc/terms/> .
@base<http://timmciver.com/file-ontology/> .

<http://timmciver.com/file-ontology> rdf:type owl:Ontology ;
                                      rdfs:label "An ontology for describing file data and metadata."@en .

:OWLDataProperty_f2f87965_60f0_4405_a160_36fe9bcb23e2 rdf:type owl:DatatypeProperty ;
                                                       rdfs:subPropertyOf dct:creator ;
                                                       rdfs:comment "The dateTime on which the FileData object was created."@en ;
                                                       rdfs:label "created"@en .

(You can probably tell I cheated a bit and used part of a file produced 
by Protege). I'm free to simply reference dct:creator without 
"importing" anything.

What I'm trying to understand is why Protege doesn't fetch the ontology 
description of those ontologies I've created prefix mappings for behind 
the scenes and make available to me all the individuals, classes, 
properties, etc. so that I can reference them in my ontology? Why am I 
forced to do it manually?

I suppose a related question is this: why am I able to reference some 
terms like rdf:type and rdfs:label without doing anything special?

I'm fairly new to Protege but have quite a bit of familiarity with 
linked data and RDF. It's possible that I just don't understand a nuance 
here and would love to be enlightened. I assume this is the case because 
I don't understand what you mean by ". . . it can slow down your loading 
because every time you load it has to go out to the Internet." If that's 
the case, isn't it /always/ true, even for references to rdf and rdfs?

Thanks,
Tim


> Just because you have a mapping in Protege doesn't mean you can see 
> all the entities that exist in an ontology that has the base IRI as 
> the mapping. You still need to bring some or all of those entities 
> into your ontology. There are a few ways to do this:
>
> 1) Manually. Don't recommend this but you can literally copy an IRI 
> like:  IRI http://purl.org/dc/terms/creator and add that as a property 
> in your ontology.This is more for special cases where you may only 
> need a few entities and you need them ASAP to continue a task. If you 
> do this you won't get all the annotations that are associated with 
> that entity. E.g., things like Equivalent Property = 
> http://xmlns.com/foaf/0.1/maker. You can copy some or all of those 
> annotations by hand as well and I've done that in a few situations but 
> that is not a good way to do it.
>
> 2) Import the ontology you want to use. This is the more common way. 
> You probably know there is an Import Ontology subtab in the Active 
> Ontology tab in Protege. After you import the ontology you can then 
> delete entities that you don't need (at least at that time). What you 
> do after that is debatable and the way I do it probably isn't 
> something everyone would agree on but what I usually do after 
> importing an ontology is use: Refactor>Merge Ontologies and merge the 
> ontology I just imported into my main ontology. What I do after that is:
> 2.1) Add documentation to an annotation property on the ontology 
> itself that says something like "reused ontology Foo from 
> https://FooBar.com <https://FooBar.com>
> 2.2) Delete the ontology I imported from that same subtab on Active 
> Ontologies.
>
> The reason I do 2.2 is if I don't and I send the ontology to someone 
> else, actually even for my own use, it can slow down your loading 
> because every time you load it has to go out to the Internet. If you 
> do the merge, the IRIs for the reused vocabulary don't change, its 
> just that you have explicitly add them to your ontology rather than 
> requiring others to wait for Protege to load the ontology from 
> somewhere on the Internet.
>
> Also, an issue that comes up is how do you handle changes to the 
> ontology you imported? Do you want to add changes from the vocabulary 
> to the version you have in yours or are you fine just using the 
> entities as they existed and don't care if the reusable vocabulary 
> changes.  I think there are some tools in the OBO foundry 
> https://obofoundry.org/resources that help you do this process when 
> you want to incorporate one vocabulary and keep consistent with it. I 
> think the people at Semantic Arts also have tools for this for their 
> Gist Upper Model: https://www.semanticarts.com/gist/   . But I've 
> never used either of them.
>
> Since you are a new Protege user, you might find this tutorial useful. 
> It is a revision of the original Pizza tutorial that is one of the 
> most common simple examples used to teach people how to build 
> ontologies. I also added sections on SWRL, SHACL, and SPARQL that 
> weren't in the original tutorial: 
> https://www.michaeldebellis.com/post/new-protege-pizza-tutorial
>
> One last thing: I don't understand your domain of course but I just 
> thought I would mention you might want to re-think if you even need 
> your own property called creator and can't just use the DCT one.
>
> Cheers,
> Michael
> https://www.michaeldebellis.com/blog
>
>
> On Fri, Sep 12, 2025 at 7:29 AM Tim McIver <[email protected]> wrote:
>
>     Hello,
>
>     I'm a new Protege user. I'm attempting to design a custom ontology
>     for a
>     linked data application.
>
>     My current goal is to create a property `creator` that I wish to be a
>     sub-property of `dct:creator`, the term from the Dublin Core Terms
>     ontology. I have added `dct` as prefix under "Ontology Prefixes"
>     with a
>     mapping to http://purl.org/dc/terms/. I created my `creator`
>     property as
>     a Data Property and I attempted to make it a sub-property of
>     `dct:creator` but when I attempt to do this, there is no
>     `dct:creator`
>     option in the dialog box. My expectation is that properties from the
>     ontologies for which I've created prefix mappings would show up there.
>
>     My research suggests that I must import the ontologies that I'd
>     like to
>     use this way. Is this correct? I found this SO answer describing the
>     process: https://stackoverflow.com/a/44266590. Is this still the
>     method
>     I should use?
>
>     Tim
>
>     _______________________________________________
>     protege-user mailing list
>     [email protected]
>     https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> _______________________________________________
> protege-user mailing list
> [email protected]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/protege-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.