背景
Import 与 Export
参数
选项
范例
基本范例
参见
GraphStore`
Wolfram Language code:
Wolfram Language code:
OWLFunctional (.ofn)
背景
-
- MIME type: text/owl-functional.
- Text-based format for OWL ontologies.
- OWL functional-style syntax is specified at https://www.w3.org/TR/owl2-syntax/.
参数
- General Import elements:
-
"Elements" list of elements and options available in this file "Rules" full list of rules for each element and option "Options" list of rules for options, properties and settings - Data representation elements:
-
"RDFStore" an RDFStore "Prefixes" association of prefixes to namespace IRIs
选项
- Export options:
-
"Prefixes" <||> produce prefixed names using these prefixes - A prefixed name has the form pre:local. The corresponding IRI is obtained by joining the namespace IRI associated with the prefix pre with the local part local.
- "Prefixes" can be used to shorten an exported file. This option does not change the meaning of the RDFStore that the file represents.
范例
基本范例 (1)
Needs["GraphStore`"]Import an OWL ontology about bikes:
ImportString["
Prefix(: = <http://example.org/>)
Prefix(xsd: = <http://www.w3.org/2001/XMLSchema#>)
Ontology(
Declaration(Class(:Bike))
Declaration(DataProperty(:wheelCount))
EquivalentClasses(
:Bike
DataHasValue(:wheelCount \"2\"^^xsd:integer)
)
DataPropertyAssertion(:wheelCount :laufmaschine \"2\"^^xsd:integer)
DataPropertyAssertion(:wheelCount :unicycle \"1\"^^xsd:integer)
)
", "OWLFunctional"]