WADM不會限制你在什麼body
可能。根據anno.jsonld,body
應擴大到oa:hasBody
。 oa:hasBody
的declaration不限制其rdfs:range
。
oa:hasBody a rdf:Property ;
rdfs:label "hasBody" ;
rdfs:domain oa:Annotation ;
rdfs:isDefinedBy oa: .
因此,你可以使用rdf:Statement:
{
"@context": "http://www.w3.org/ns/anno.jsonld" ,
"id": "http://example.org/annotation12345",
"type": "Annotation",
"body": {
"id": "http://example.org/statement12345",
"type": "rdf:Statement",
"rdf:subject": "http://dbpedia.org/resource/Great_Britain",
"rdf:predicate": "http://dbpedia.org/ontology/capital",
"rdf:object": "http://dbpedia.org/resource/London"
},
"target": {
"source": "https://en.wikipedia.org/wiki/London",
"selector": {
"type": "TextQuoteSelector",
"exact": "London is a capital of Great Britain",
"prefix": ". ",
"suffix": ". "
}
}
}
任何人都可以點我就怎麼會這樣與門徒做了一個例子嗎?
門徒新不是一個RDF編輯器。 RDF是OWL序列化的抽象語法。 JSON-LD可能被用作RDF序列化的具體語法。
然而,如果你想使用門徒新作爲RDF編輯,本體下方將序列化爲JSON-LD是類似於JSON-LD上面:
Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Prefix: dbr: <http://dbpedia.org/resource/>
Prefix: dbo: <http://dbpedia.org/ontology/>
Prefix: oa: <http://www.w3.org/ns/oa#>
Prefix: ex: <http://example.org/>
Ontology: <http://example.org/>
# Import: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
# Import: <http://www.w3.org/ns/oa#>
ObjectProperty: oa:hasBody
ObjectProperty: oa:hasTarget
ObjectProperty: oa:hasSelector
DataProperty: oa:hasSource
DataProperty: oa:prefix
DataProperty: oa:exact
DataProperty: oa:suffix
ObjectProperty: rdf:subject
ObjectProperty: rdf:object
ObjectProperty: rdf:predicate
Class: oa:Annotation
Class: oa:TextQuoteSelector
Class: rdf:Statement
Individual: ex:annotation12345
Facts:
oa:hasBody ex:statement12345,
oa:hasTarget ex:target12345
Types:
oa:Annotation
Individual: ex:statement12345
Facts:
rdf:object dbr:London,
rdf:predicate dbo:capital,
rdf:subject dbr:Great_Britain
Types:
rdf:Statement
Individual: ex:target12345
Facts:
oa:hasSelector ex:selector12345,
oa:hasSource "https://en.wikipedia.org/wiki/London"
Individual: ex:selector12345
Facts:
oa:suffix ". ",
oa:prefix ". ",
oa:exact "London is a capital of Great Britain"
Types:
oa:TextQuoteSelector
Individual: dbo:capital
Individual: dbr:Great_Britain
Individual: dbr:London
有許多限制。例如,在上面的本體中,RDF語句的對象不能是文字。如果您將rdf:object
聲明爲數據類型屬性,則它們可以是文字,但它們不能是具有URI的對象。此限制的原因是Protégé不是OWL完全編輯器,而是OWL 2 DL編輯器。
作爲一種變通方法,你可以聲明和使用rdf:subject
,rdf:object
和rdf:predicate
爲註釋屬性:
Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Prefix: dbr: <http://dbpedia.org/resource/>
Prefix: dbo: <http://dbpedia.org/ontology/>
Prefix: oa: <http://www.w3.org/ns/oa#>
Prefix: ex: <http://example.org/>
Ontology: <http://example.org/>
# Import: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
# Import: <http://www.w3.org/ns/oa#>
ObjectProperty: oa:hasBody
ObjectProperty: oa:hasTarget
ObjectProperty: oa:hasSelector
DataProperty: oa:hasSource
DataProperty: oa:prefix
DataProperty: oa:exact
DataProperty: oa:suffix
AnnotationProperty: rdf:subject
AnnotationProperty: rdf:object
AnnotationProperty: rdf:predicate
Class: oa:Annotation
Class: oa:TextQuoteSelector
Class: rdf:Statement
Individual: ex:annotation12345
Facts:
oa:hasBody ex:statement12345,
oa:hasTarget ex:target12345
Types:
oa:Annotation
Individual: ex:statement12345
Annotations:
rdf:object dbr:London,
rdf:predicate dbo:capital,
rdf:subject dbr:Great_Britain
Types:
rdf:Statement
Individual: ex:target12345
Facts:
oa:hasSelector ex:selector12345,
oa:hasSource "https://en.wikipedia.org/wiki/London"
Individual: ex:selector12345
Facts:
oa:suffix ". ",
oa:prefix ". ",
oa:exact "London is a capital of Great Britain"
Types:
oa:TextQuoteSelector
Individual: dbo:capital
Individual: dbr:Great_Britain
Individual: dbr:London
非常感謝您的回答。我想我找到了一個更簡單的解決方案。你認爲我提議的是有效的嗎? –
@PantelisNatsiavas,請在您的答案中粘貼完整的本體論,最好是曼徹斯特語法。 –
我剛剛上傳了一個使用OWL/XML格式的完整示例,可以直接導出。不幸的是,protege無法成功導出曼徹斯特語法中的示例,因爲它嚴重依賴未聲明的實體(隱含目標)的註釋屬性,並且我收到消息「曼徹斯特OWL語法可能會丟失信息,例如GCI和未聲明實體的註釋」 –