0

following this post Convert String in manchester syntax to OWLAxiom object using owlapi 3 in Java

I would like to parse the following which contains object property as follows:

String  input1 = "Prefix: pr: <www.somewhere.net/>\n" +
    "Class: pr:Arm\n"+
    "Class: pr:Hand\n"+
    "ObjectProperty: pr:has-part\n"+
    "Class: pr:Arm\n"+
    "  SubClassOf: (pr:has-part some pr:Hand)\n"+
    "";

This string doesn't get parsed using the same method as in the above post. I'm not sure how the object property should be written to be parsed correctly. Also I would prefer if you can suggest a way to just parse a simple String into a valid owl axiom rather than parsing it as a small ontology.

Now it works without Domain or range. the reason why I did not include the exception is because it is exactly the same even if anything is missing from the format such as a parenthesis or a colon. The OWL reference https://www.w3.org/TR/owl2-manchester-syntax/ of Manchester syntax is not complete.

Community
  • 1
  • 1
Maha
  • 11
  • 3
  • 1
    I think you mean `pr:Hand` instead of `pr:hand` – Ignazio Mar 28 '16 at 08:05
  • If you're getting an error/stacktrace/etc., you should include it here. If the system is giving *you* diagnostic information to help you figure out what's going on, there's no good reason to keep it from us. – Joshua Taylor Mar 28 '16 at 20:09
  • Thanks @Ignazio, now it works without writing domain and range. – Maha Mar 28 '16 at 21:06
  • @Joshua Taylor I added the error which is the same if anything is missing form the Manchester syntax. Anyway now it works without Domain or range. – Maha Mar 28 '16 at 21:07
  • 1
    `NoSuchMethodError` error means some problems with the imported libraries. Either some libs are missing, or you have multiple different versions of the same lib imported. Can you check the OWL API imports? – UninformedUser Mar 29 '16 at 04:55

0 Answers0