-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathebg-shapes.shex
143 lines (132 loc) · 5.47 KB
/
ebg-shapes.shex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
ebgsh:Company CLOSED {
IRI /^http://data.businessgraph.io/company/[A-Z]{2}/.+/
a [rov:RegisteredOrganization];
rov:legalName (xsd:string OR rdf:langString) AND NOT (/^ | $| {2}/) +;
skos:prefLabel (xsd:string OR rdf:langString) AND NOT (/^ | $| {2}/) {1};
skos:altLabel (xsd:string OR rdf:langString) AND NOT (/^ | $| {2}/) *;
rov:orgType IRI <type/>~ ?;
ebg:orgTypeText rdf:langString ?;
ebg:isStartup xsd:boolean ?;
ebg:isStateOwned xsd:boolean ?;
ebg:isPubliclyTraded xsd:boolean ?;
rov:orgStatus IRI <status/>~ ?;
ebg:orgStatusText rdf:langString ?;
rov:orgActivity IRI nace:~ *;
ebg:orgActivityText rdf:langString ?;
schema:foundingDate (xsd:date OR xsd:gYearMonth OR xsd:gYear) ?;
schema:dissolutionDate (xsd:date OR xsd:gYearMonth OR xsd:gYear) ?;
schema:availableLanguage xsd:string ?;
schema:url IRI *;
schema:sameAs IRI *;
schema:email IRI <mailto:>~ *;
sioc:feed IRI *;
dbo:jurisdiction xsd:string /^[A-Z]{2}$/;
org:hasRegisteredSite @ebgsh:Address ?;
org:hasSite @ebgsh:Address *;
rov:registration @ebgsh:Identifier {1};
adms:identifier @ebgsh:Identifier *
}
ebgsh:Address CLOSED {
IRI /^http://data.businessgraph.io/company/[A-Z]{2}/.+/address(/.+)?/
a [org:Site]; a [locn:Address];
org:siteAddress ebgsh:Address;
locn:fullAddress (xsd:string OR rdf:langString) ?;
locn:adminUnitL1 IRI nuts:~ @ebgsh:NUTS0 {1};
locn:adminUnitL2 IRI nuts:~ @ebgsh:NUTS1 ?;
ebg:adminUnitL3 IRI nuts:~ @ebgsh:NUTS2 ?;
ebg:adminUnitL4 IRI nuts:~ @ebgsh:NUTS3 ?;
ebg:adminUnitL5 IRI lau:~ @ebgsh:LAU1 ?;
ebg:adminUnitL6 IRI lau:~ @ebgsh:LAU2 ?;
locn:postName (rdf:langString OR xsd:string) ?;
locn:addressArea (rdf:langString OR xsd:string) ?;
locn:thoroughfare (rdf:langString OR xsd:string) ?;
locn:locatorDesignator xsd:string ?;
locn:postCode xsd:string ?;
locn:poBox xsd:string ?;
schema:geo @ebgsh:GeoCoordinates ?
}
ebgsh:NUTS0 CLOSED {
IRI /http://nuts.geovocab.org/id/[A-Z]{2}$/;
a [ramon:NUTSRegion] ;
rdfs:label xsd:string;
ramon:name xsd:string;
ramon:code xsd:string /^[A-Z]{2}$/;
ramon:level [0];
}
ebgsh:NUTS1 CLOSED {
IRI /http://nuts.geovocab.org/id/[A-Z]{2}[0-9]$/;
a [ramon:NUTSRegion] ;
rdfs:label xsd:string;
ramon:name xsd:string;
ramon:code xsd:string /^[A-Z]{2}[0-9]$/;
ramon:level [1];
spatial:PP @ebgsh:NUTS0.
}
ebgsh:NUTS2 CLOSED {
IRI /http://nuts.geovocab.org/id/[A-Z]{2}[0-9]{2}$/;
a [ramon:NUTSRegion] ;
rdfs:label xsd:string;
ramon:name xsd:string;
ramon:code xsd:string /^[A-Z]{2}[0-9]{2}$/;
ramon:level [2];
spatial:PP @ebgsh:NUTS1.
}
ebgsh:NUTS3 CLOSED {
IRI /http://nuts.geovocab.org/id/[A-Z]{2}[0-9]{3}$/;
a [ramon:NUTSRegion] ;
rdfs:label xsd:string;
ramon:code xsd:string /^[A-Z]{2}[0-9]{3}$/;
ramon:name xsd:string;
ramon:level [3];
spatial:PP @ebgsh:NUTS2.
}
ebgsh:LAU1 CLOSED {
IRI /^http://data.businessgraph.io/lau/[A-Z]{2}-.+/;
a [ebg:LAURegion];
void:inDataset [lau:];
rdfs:label xsd:string;
ramon:name rdf:langString +;
ramon:code xsd:string /^[A-Z]{2}-.+/;
ramon:level [4];
spatial:PP @ebgsh:NUTS3.
}
ebgsh:LAU2 CLOSED {
IRI /^http://data.businessgraph.io/lau/[A-Z]{2}-.+/;
a [ebg:LAURegion];
void:inDataset [lau:];
rdfs:label xsd:string;
ramon:name rdf:langString +;
ramon:code xsd:string /^[A-Z]{2}-.+/;
ramon:level [5];
spatial:PP @ebgsh:LAU1.
dbo:populationTotal xsd:integer ?;
dbo:areaTotal xsd:integer ?
}
ebgsh:GeoCoordinates CLOSED {
IRI /^http://data.businessgraph.io/company/[A-Z]{2}/.+/address(/.+)?/geo$/
a [schema:GeoCoordinates];
schema:latitude (xsd:decimal OR xsd:string) {1};
schema:longitude (xsd:decimal OR xsd:string) {1};
ebg:geoResolution IRI <resolution/>~ {1}
}
ebgsh:Identifier CLOSED {
IRI /^http://data.businessgraph.io/company/[A-Z]{2}/.+/id(/[A-Z]+)?/
a [adms:Identifier];
skos:notation xsd:string {1};
dct:creator IRI <register/>~ {1};
dct:issued xsd:date ?
}
# TODO:
# - geoResolution should be correlated to the presence of Address fields of increasing detail
# - rov:registration ebgsh:IdentifierMain where:
#ebgsh:IdentifierMain {
# ebgsh:Identifier AND
# IRI /^http://data.businessgraph.io/company/[A-Z]{2}/.+/id$/
# dct:creator IRI /^http://data.businessgraph.io/register/[A-Z]{2}$/ {1};
# - NUTS0..3 and LAU1..2 require external SPARQL access, so maybe we should have a simple and a complex version
# How to state that:
# - Subsidiary IRIs (Address, Identifier...) should start with the IRI of the owning Company
# - org:siteAddress should be a self-link
# - dbo:jurisdiction should be correlated to ebgsh:IdentifierMain.dct:creator
# - for ebgsh:LAU*, rdfs:label should start with ramon:code
# - for ebgsh:LAU*, ramon:code should be the same as in the IRI