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

Add SWRL support #59

Open
cmungall opened this issue Jan 5, 2023 · 0 comments
Open

Add SWRL support #59

cmungall opened this issue Jan 5, 2023 · 0 comments

Comments

@cmungall
Copy link
Collaborator

cmungall commented Jan 5, 2023

Currently funowl doesn't support SWRL rules. Here is an example SWRL rule in ofn:

Prefix(:=<http://purl.obolibrary.org/obo/ro.owl/>)
Prefix(obo:=<http://purl.obolibrary.org/obo/>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)
Prefix(swrl:=<http://www.w3.org/2003/11/swrl#>)
Prefix(swrla:=<http://swrl.stanford.edu/ontologies/3.3/swrla.owl#>)


Ontology(<http://purl.obolibrary.org/obo/ro.owl>
DLSafeRule(Body(ObjectPropertyAtom(obo:RO_0002180 Variable(<urn:swrl#w>) Variable(<urn:swrl#p>)) ClassAtom(obo:BFO_0000015 Variable(<urn:swrl#w>)) ClassAtom(obo:BFO_0000015 Variable(<urn:swrl#p>)))Head(ObjectPropertyAtom(obo:RO_0002018 Variable(<urn:swrl#w>) Variable(<urn:swrl#p>))))
)

for reference, this is how it looks in omn:

http://purl.obolibrary.org/obo/RO_0002180>(?w, ?p), <http://purl.obolibrary.org/obo/BFO_0000015>(?w), <http://purl.obolibrary.org/obo/BFO_0000015>(?p) -> <http://purl.obolibrary.org/obo/RO_0002018>(?w, ?p)

and the very ugly rdf/xml:

   <rdf:Description>
        <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#Imp"/>
        <swrl:body>
            <rdf:Description>
                <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#AtomList"/>
                <rdf:first>
                    <rdf:Description>
                        <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#IndividualPropertyAtom"/>
                        <swrl:propertyPredicate rdf:resource="http://purl.obolibrary.org/obo/RO_0002180"/>
                        <swrl:argument1 rdf:resource="urn:swrl#w"/>
                        <swrl:argument2 rdf:resource="urn:swrl#p"/>
                    </rdf:Description>
                </rdf:first>
                <rdf:rest>
                    <rdf:Description>
                        <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#AtomList"/>
                        <rdf:first>
                            <rdf:Description>
                                <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#ClassAtom"/>
                                <swrl:classPredicate rdf:resource="http://purl.obolibrary.org/obo/BFO_0000015"/>
                                <swrl:argument1 rdf:resource="urn:swrl#w"/>
                            </rdf:Description>
                        </rdf:first>
                        <rdf:rest>
                            <rdf:Description>
                                <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#AtomList"/>
                                <rdf:first>
                                    <rdf:Description>
                                        <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#ClassAtom"/>
                                        <swrl:classPredicate rdf:resource="http://purl.obolibrary.org/obo/BFO_0000015"/>
                                        <swrl:argument1 rdf:resource="urn:swrl#p"/>
                                    </rdf:Description>
                                </rdf:first>
                                <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
                            </rdf:Description>
                        </rdf:rest>
                    </rdf:Description>
                </rdf:rest>
            </rdf:Description>
        </swrl:body>
        <swrl:head>
            <rdf:Description>
                <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#AtomList"/>
                <rdf:first>
                    <rdf:Description>
                        <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#IndividualPropertyAtom"/>
                        <swrl:propertyPredicate rdf:resource="http://purl.obolibrary.org/obo/RO_0002018"/>
                        <swrl:argument1 rdf:resource="urn:swrl#w"/>
                        <swrl:argument2 rdf:resource="urn:swrl#p"/>
                    </rdf:Description>
                </rdf:first>
                <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
            </rdf:Description>
        </swrl:head>
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