2014-03-05 28 views
2

我有以下的有效龜語法:RDF龜語法問題

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. 
@prefix sc: <http://education.data.gov.uk/def/school/School#>. 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. 
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos>. 

<http://example.com/schools/#1000> a <http://education.data.gov.uk/def/school/School> . 
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/establishmentName> "Atherstone Early Years Centre". 
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/establishmentNumber> "1000". 
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/Address> [<http://education.data.gov.uk/def/school/address1> "RATCLIFFE ROAD";  <http://education.data.gov.uk/def/school/postcode> "CV9 1LF"]. 
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/establishmentType> "Nursery". 
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/districtAdministrative> "North Warwickshire". 
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/uniqueReferenceNumber> "2016". 
<http://example.com/schools/#1000> geo:lat "52.5786677". 
<http://example.com/schools/#1000> geo:long "-1.5420408". 

我基本上確定一所學校的對象與id#1000之後,我將屬性添加到它。我想知道是否可以在每個屬性之前擺脫<http://example.com/schools/#1000>定義,並以某種方式將括號或其他屬性括起來。有任何想法嗎?

+3

您可以使用';'作爲單曲P1 O1; p2 o2; p3 o3'。它在另一個問題的答案[SPARQL運算符的含義;'](http://stackoverflow.com/q/18214338/1281433)中已有描述。這個問題不完全一樣 - 它詢問SPARQL中的語法是什麼,並且您正在尋找Turtle中的語法,但是語法在這兩種語言之間共享。還有','用於同一謂詞的多個對象:'p1 o1a,o1b; p2 o2a,o2b,o2c; p3 o3 .' –

回答

7

分號:

<http://example.com/schools/#1000> 
    a <http://education.data.gov.uk/def/school/School> ; 
    <http://education.data.gov.uk/def/school/establishmentName> "Atherstone Early Years Centre" ; 
    ... 
    <http://example.com/schools/#1000> geo:long "-1.5420408" .