OWLAPI:将 OWLOntology 对象转换为 .owl 文件
OWLAPI: converting OWLOntology object into .owl files
谁能帮我解决这个问题?
我需要从 OWLOntology 对象获取一个 .owl 文件(可能指定语法)。
谢谢
编辑:使用下面的代码后,我得到了这个异常:
"org.semanticweb.owlapi.model.OWLStorerNotFoundException: Could not find an ontology storer which can handle the format: OWL Functional Syntax"。我试图寻找解决方案。到目前为止我已经找到 none.
Javadoc and/or examples 总是一个很好的来源...
OWLOntologyManager::saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat, OutputStream outputStream)
OWLOntologyManager manager = ...
...
OWLOntology ontology = ...
...
manager.saveOntology(ontology,
new RDFXMLDocumentFormat(),
new FileOutputStream(new File("/PATH/TO/FILE")));
谁能帮我解决这个问题? 我需要从 OWLOntology 对象获取一个 .owl 文件(可能指定语法)。 谢谢
编辑:使用下面的代码后,我得到了这个异常: "org.semanticweb.owlapi.model.OWLStorerNotFoundException: Could not find an ontology storer which can handle the format: OWL Functional Syntax"。我试图寻找解决方案。到目前为止我已经找到 none.
Javadoc and/or examples 总是一个很好的来源...
OWLOntologyManager::saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat, OutputStream outputStream)
OWLOntologyManager manager = ...
...
OWLOntology ontology = ...
...
manager.saveOntology(ontology,
new RDFXMLDocumentFormat(),
new FileOutputStream(new File("/PATH/TO/FILE")));