-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path12_01_patentInfo.ttl
More file actions
69 lines (66 loc) · 2.38 KB
/
12_01_patentInfo.ttl
File metadata and controls
69 lines (66 loc) · 2.38 KB
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
@base <http://www.openphacts.org/api> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix api: <http://purl.org/linked-data/api/vocab#> .
@prefix schembl: <http://rdf.ebi.ac.uk/terms/surechembl#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix ops: <http://www.openphacts.org/api#> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix prov: <http://www.w3.org/ns/prov#>.
<#patent> a api:API ;
rdfs:label "Patent"@en ;
api:sparqlEndpoint <http://alpha.openphacts.org:8890/sparql/> ;
api:contentNegotiation api:parameterBased ;
api:variable <#input> ;
api:description "An API configuration to return information about patents" ;
api:endpoint [
a api:ItemEndpoint ;
api:name "Patent Information" ;
api:description "Information about a single patent.";
api:uriTemplate "/patent?uri={uri}" ;
api:itemTemplate "{uri}" ;
api:variable <http://rdf.ebi.ac.uk/terms/surechembl#SCCO_000010> ;
api:variable <http://rdf.ebi.ac.uk/terms/surechembl#SCCO_000035> ;
api:variable <http://rdf.ebi.ac.uk/terms/surechembl#SCCO_000036> ;
api:exampleRequestPath "/patent?uri=http%3A%2F%2Frdf.ebi.ac.uk%2Fresource%2Fsurechembl%2Fpatent%2FEP-1339685-A2";
api:viewer <#patentViewer> ;
api:defaultViewer <#patentViewer> ] .
<#input> api:name "uri" ;
api:label "uri";
api:value "A patent URI. e.g.: http://rdf.ebi.ac.uk/resource/surechembl/patent/EP-1339685-A2" ;
rdfs:range rdfs:Resource .
<#patentViewer> a api:Viewer ;
api:name "patentViewer" ;
api:template
"
?patent_uri dct:title ?title ;
ops:datePublished ?date ;
ops:classification ?class_res ;
void:inDataset <http://www.ebi.ac.uk/surechembl> .
?class_res ops:classificationCode ?class_code ;
ops:classificationSystem ?class_sys ;
void:inDataset <http://www.ebi.ac.uk/surechembl> .
?patent_uri prov:alternateOf ?related_patent .
" ;
api:where
"
GRAPH <http://www.ebi.ac.uk/surechembl> {
?patent_uri a schembl:SCCO_000002 ;
schembl:SCCO_000007 ?date .
OPTIONAL {
?patent_uri schembl:SCCO_000005 ?title_res .
?title_res schembl:SCCO_000030 ?title ;
schembl:SCCO_000031 'EN' .
}
OPTIONAL {
?patent_uri schembl:SCCO_000009 ?class_res .
?class_res schembl:SCCO_000033 ?class_code ;
schembl:SCCO_000034 ?class_sys .
}
OPTIONAL {
?patent_uri schembl:SCCO_000008 ?family .
?related_patent schembl:SCCO_000008 ?family .
FILTER(?related_patent != ?patent_uri)
}
}
".