-
Notifications
You must be signed in to change notification settings - Fork 3
/
showgraph.jrule
45 lines (39 loc) · 1.55 KB
/
showgraph.jrule
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
@prefix gv: <http://rhizomik.net/ontologies/2008/05/gv.rdfs#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
[init:
-> (gv:graph rdf:type gv:Graph), (gv:graph gv:rankdir "LR"), (gv:graph gv:nodesep "0.3"),
(gv:graph gv:ranksep "0.3"), (gv:graph gv:center "true"),
(gv:graph gv:overlap "false"), (gv:graph gv:splines "true")
]
[nodesAndEdges:
(?s ?p ?o), strConcat(?p, ?puri),
strNotContains(?puri, "http://rhizomik.net/ontologies/2008/05/gv.rdfs"),
strNotContains(?puri, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
strNotContains(?puri, "http://www.w3.org/2000/01/rdf-schema#label")
->
(gv:graph gv:hasEdgeProperty ?p), (gv:graph gv:hasNode ?s), (gv:graph gv:hasNode ?o),
(?p rdf:type gv:EdgeProperty), (?p gv:color "blue"), (?p gv:label ?puri), (?p gv:fontsize "10px")
]
[idResource:
(gv:graph gv:hasNode ?node), notBNode(?node), strConcat(?node, ?uri)
->
(?node gv:shape "box"), (?node gv:fontsize "10px"), (?node gv:fontcolor "blue"),
(?node gv:height ".1"), (?node gv:width ".1"), (?node gv:URL ?uri)
]
[labelledResource:
(gv:graph gv:hasNode ?node), notBNode(?node), (?node rdfs:label ?label)
->
(?node gv:label ?label)
]
[anonResource:
(gv:graph gv:hasNode ?node), isBNode(?node)
->
(?node gv:shape "box"), (?node gv:fontsize "10px"), (?node gv:height "0"), (?node gv:width "0")
]
[typedResource:
(gv:graph gv:hasNode ?node), (?node rdf:type ?class), strConcat(?class, ?curi)
->
(?node gv:classLabel ?curi)
]