我想創建一個關於會場信息的RDFS模式,其中包含例如:在RDFS中重新定義和聲明屬性
地址信息。
我發現了另一個關於它的模式:https://schema.org/Place它有屬性地址信息。
第一個問題是我可以申報的場地也有地址嗎? 我已經知道,我可以使用該屬性而無需聲明它。我想宣佈它使我的模式更清晰的原因。
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:place="https://schema.org/Place#"
xml:base="http://localhost:3000/VenueSchema#">
<rdfs:Class rdf:ID="Venue">
<rdfs:subClassOf rdf:resource="https://schema.org/Place"/>
</rdfs:Class>
<rdf:Property rdf:ID="address">
<rdf:type source:"https://schema.org/Place#address">
</rdf:Property>
</rdf:RDF>
第二個問題是我可以重新定義該屬性的地址?它可以實現覆蓋或超載效果嗎?
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:place="https://schema.org/Place#"
xml:base="http://localhost:3000/VenueSchema#">
<rdfs:Class rdf:ID="Venue">
<rdfs:subClassOf rdf:resource="https://schema.org/Place"/>
</rdfs:Class>
<rdf:Property rdf:ID="address">
<rdfs:domain rdf:resource= "#Venue">
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
</rdf:RDF>
假設:hasParent a rdfs:Property; rdfs:range:Human。在file1中定義。當我只在file2中寫入時沒有提及範圍和域,只有:hasParent源:file1#hasParent。 file2在file1中有範圍和域嗎? – AlexWei
@AlexWei我不知道「hasParent source:file1#hasParent」。應該是這個意思。如果你不加載第一個文件,那麼你將不會在第一個文件中有內容。 –
這裏我的意思是在文件2中:我想指定hasParent已經在file1中定義了。這樣file2會得到file1中的範圍和域嗎? – AlexWei