HyperAgents / hmas

An ontology to describe Hypermedia Multi-Agent Systems, interactions, and organizations.
https://purl.org/hmas/
1 stars 0 forks source link

feat: corrected namespaces and added test classes for the automatic generation of redirections #127

Closed maximelefrancois86 closed 1 year ago

maximelefrancois86 commented 1 year ago

This pull request corrects:

Each term that is defined by a vocabulary will now be the subject of a redirection in the generated htaccess file.

For example to enable a redirection from /hmas/Agent to /hmas/core#Agent, you need to include the following triple in the core.ttl vocabulary:

hmas:Agent rdfs:isDefinedBy hmas:core

Another example: to enable a redirection from /hmas/TestInteraction to /hmas/interaction#Test, you need to include the following triple in the interaction.ttl vocabulary:

hmas:Test rdfs:isDefinedBy hmas:interaction

FabienGandon commented 1 year ago

the core.ttl of the master is the one we should keep; this branch removed the base

maximelefrancois86 commented 1 year ago

the core.ttl of the master is the one we should keep; this branch removed the base

We can put it back if preferred. However there is no relative IRI in this document

FabienGandon commented 1 year ago

my 2 cents were that it is better to have an explicit base, but just my 2 cents. Also the two files diverged a lot.

maximelefrancois86 commented 1 year ago

I solved the conflict by:

FabienGandon commented 1 year ago

Sorry @maximelefrancois86 but I really prefer the current version of core in terms of namespaces, reordering of definitions, etc. I would like to keep it that way.

FabienGandon commented 1 year ago

I can do the conflict solving for that if you want me to.

andreiciortea commented 1 year ago

Note: I opened PR #128 to fix Issue #122 using the core.ttl version on the master branch. We should achieve consensus and merge this PR before we merge PR #128.

FabienGandon commented 1 year ago

Capturing here my (personal) preference for base + empty/default prefix solution, more precisely:

@base <https://purl.org/onto/> .
@prefix : <> .

(...)

:onto a owl:Ontology ;
    vann:preferredNamespacePrefix "ont" ;
    vann:preferredNamespaceUri <> ;

(...)

:AClass  a owl:Class ;
        rdfs:isDefinedBy :onto ;

(...)

My preference is to use the empty/default prefix for the resources defined/described in the document making it obvious in the document what is locally defined (empty/default prefix) vs what is defined somewhere else (other prefixes). This practice also make the code lighter in my opinion.

Then defining the base and using <> allow us to have one and only occurrence of the namespace and cover both the use of prefixes and local references in the document.

I don't have a strong case here, just a personal preference.