我正在尝试解析曼彻斯特语法类表达式,并检索其相应的 RDF 序列化三元组。这个问题对我帮助很大:OWLAPI:使用 ManchesterOWLSyntaxParser 将字符串转换为类表达式时出现“ParserException”。
我想从Pizza and (not (hasTopping some FishTopping)) and (not (hasTopping some MeatTopping))
移动到
(_:fe7fad725e5c44e081bfa45c97ad15731, http://www.w3.org/2002/07/owl#intersectionOf, _:fe7fad725e5c44e081bfa45c97ad15732) [null]
(_:fe7fad725e5c44e081bfa45c97ad15731, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2002/07/owl#Class) [null]
(_:fe7fad725e5c44e081bfa45c97ad15732, http://www.w3.org/1999/02/22-rdf-syntax-ns#first, http://www.co-ode.org/ontologies/pizza/pizza.owl#Pizza) [null]
(_:fe7fad725e5c44e081bfa45c97ad15732, http://www.w3.org/1999/02/22-rdf-syntax-ns#rest, _:fe7fad725e5c44e081bfa45c97ad15733) [null]
(_:fe7fad725e5c44e081bfa45c97ad15733, http://www.w3.org/1999/02/22-rdf-syntax-ns#first, _:fe7fad725e5c44e081bfa45c97ad15734) [null]
(_:fe7fad725e5c44e081bfa45c97ad15733, http://www.w3.org/1999/02/22-rdf-syntax-ns#rest, _:fe7fad725e5c44e081bfa45c97ad15736) [null]
(_:fe7fad725e5c44e081bfa45c97ad15734, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2002/07/owl#Class) [null]
(_:fe7fad725e5c44e081bfa45c97ad15734, http://www.w3.org/2002/07/owl#complementOf, _:fe7fad725e5c44e081bfa45c97ad15735) [null]
(_:fe7fad725e5c44e081bfa45c97ad15735, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2002/07/owl#Restriction) [null]
(_:fe7fad725e5c44e081bfa45c97ad15735, http://www.w3.org/2002/07/owl#onProperty, http://www.co-ode.org/ontologies/pizza/pizza.owl#hasTopping) [null]
(_:fe7fad725e5c44e081bfa45c97ad15735, http://www.w3.org/2002/07/owl#someValuesFrom, http://www.co-ode.org/ontologies/pizza/pizza.owl#FishTopping) [null]
(_:fe7fad725e5c44e081bfa45c97ad15736, http://www.w3.org/1999/02/22-rdf-syntax-ns#first, _:fe7fad725e5c44e081bfa45c97ad15737) [null]
(_:fe7fad725e5c44e081bfa45c97ad15736, http://www.w3.org/1999/02/22-rdf-syntax-ns#rest, http://www.w3.org/1999/02/22-rdf-syntax-ns#nil) [null]
(_:fe7fad725e5c44e081bfa45c97ad15737, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2002/07/owl#Class) [null]
(_:fe7fad725e5c44e081bfa45c97ad15737, http://www.w3.org/2002/07/owl#complementOf, _:fe7fad725e5c44e081bfa45c97ad15738) [null]
(_:fe7fad725e5c44e081bfa45c97ad15738, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2002/07/owl#Restriction) [null]
(_:fe7fad725e5c44e081bfa45c97ad15738, http://www.w3.org/2002/07/owl#onProperty, http://www.co-ode.org/ontologies/pizza/pizza.owl#hasTopping) [null]
(_:fe7fad725e5c44e081bfa45c97ad15738, http://www.w3.org/2002/07/owl#someValuesFrom, http://www.co-ode.org/ontologies/pizza/pizza.owl#MeatTopping) [null]
我可以从原始字符串获取OWLClassExpression。但那么我如何从 OWLClassExpression
中获取相应的三元组集合呢?谢谢!