Harold-Solbrig / funowl

Pythonic representation of OWL through the OWL functional syntax
Creative Commons Zero v1.0 Universal
50 stars 5 forks source link

Implemented assertion.py rdf functions and tests #3

Closed linchihfan closed 5 years ago

linchihfan commented 5 years ago

I implemented the rdf functions for assertion.py file and some tests in test_assertion.py. I did run into a few problems though.

  1. According to the OWL doc, the ObjectPropertyAssertion needs ObjectProperty not ObjectPropertyExpression. So I'm not quite sure if that's correct.

  2. I'm not really sure about the implementation with ObjectInverseOf in the ObjectPropertyAssertion.to_rdf() function. Seems like we just need to call ObjectInverseOf function in the test cases and call the ObjectPropertyAssertion.to_rdf() function as usual.

  3. The test codes that I commented out in the test_assertion.py file didn't pass for some reason. Can you please take a look?

hsolbrig commented 5 years ago

Responses:

Item 1: I'm looking at https://www.w3.org/TR/owl2-syntax/#Definitions_of_OWL_2_Constructs which says:

ObjectPropertyAssertion := 'ObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')'

Where did you get the information that it should be ObjectProperty?

Item 2: Take a look at my latest attempt -- that was a really unusual conversion element.

Item 3: Seems to work now