RDF Turtle语法-如何减少代码重复?

问题描述 投票:2回答:1

我具有以下有效的Turtle语法:

@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>定义,并以某种方式用括号或其他方式将属性括起来。有什么想法吗?

syntax rdf rdfs turtle-rdf
1个回答
7
投票

分号:

© www.soinside.com 2019 - 2024. All rights reserved.