Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using OWL:equivalentClass to create Enum lists #214

Open
ashleysommer opened this issue Mar 7, 2024 · 0 comments
Open

Using OWL:equivalentClass to create Enum lists #214

ashleysommer opened this issue Mar 7, 2024 · 0 comments

Comments

@ashleysommer
Copy link

The recommended way to create an Enum in an owl ontology is to use owl:equivalentClass with a bnode containing an owl:oneOf list like this:

cn:CausalEffectIncrease
    a owl:NamedIndividual , cn:CausalEffect ;
    rdfs:comment "The link has the effect of Increasing."@en ;
    rdfs:label "Increase"@en ;
    .

cn:CausalEffectDecrease
    a owl:NamedIndividual , cn:CausalEffect ;
    rdfs:comment "The link has the effect of Decreasing."@en ;
    rdfs:label "Decrease"@en ;

cn:CausalEffects
    a rdfs:Class, owl:Class ;
    rdfs:subClassOf cn:CausalEffect ;
    owl:equivalentClass [
        owl:oneOf ( cn:CausalEffectIncrease cn:CausalEffectDecrease ) ;
                        ] ;
    rdfs:comment "Enum of possible Casual Effects. Can be \"Increase\" or \"Decrease\"."@en ;
    .

When rendering this in pyLode I get this output:

image
Notice the owl:equivalentClass

I would expect this to render a list of the named individuals like this:

  • equivalentClass: Enumeration
    • cn:CausalEffectIncrease
    • cn:CausalEffectDecrease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant