EDM/commit
Support icons and handle rdf:value as reifications
author | Jan Wielemaker |
---|---|
Thu Dec 9 14:08:36 2010 +0100 | |
committer | Jan Wielemaker |
Thu Dec 9 14:08:36 2010 +0100 | |
commit | 9a77e3e311ee0ccb9235eaefead7a52c7a64000e |
tree | 03c1a5d45fbf5c9968de9a43ff1d87ba1fb46c5c |
parent | f70a8e42352414099d5b1cf695b88f93231c8625 |
Diff style: patch stat
diff --git a/components/edm/graph.pl b/components/edm/graph.pl index a5a03ef..70481a3 100644 --- a/components/edm/graph.pl +++ b/components/edm/graph.pl @@ -86,10 +86,17 @@ bf_expand([D-F|AG0], AG, Style, MaxBranch, Triples) :- related(Style, S, O, rdf(S,P,O)) :- edm_relation(Style, Rel), - rdf_has(S, Rel, O, P). + rdf_has(S, Rel, O0, P), + real_object(Style, O0, O). related(Style, O, S, rdf(S,P,O)) :- edm_relation(Style, Rel), - rdf_has(S, Rel, O, P). + rdf_has(S0, Rel, O, P), + real_object(Style, S0, S). % is this ever meaningful? + +real_object(user, O0, O) :- + rdf_is_bnode(O0), + rdf_has(O0, rdf:value, O), !. +real_object(_, O, O). edm_relation(edm, ore:aggregates). edm_relation(edm, ore:proxyFor). @@ -111,6 +118,7 @@ edm_class(ens:'WebResource'). edm_class(ore:'Aggregation'). edm_class(ore:'Proxy'). edm_class(ens:'PhysicalThing'). +edm_class(ens:'Agent'). %% edm_node_shape(+URI, -Shape, +Options) @@ -139,3 +147,6 @@ node_shape(URI, _, Shape, _Options) :- node_shape(URI, _, Shape, _Options) :- rdf_has(URI, rdf:type, ens:'PhysicalThing'), Shape = [shape(house),style('filled'),fillcolor('#ff8585')]. +node_shape(URI, _, Shape, _Options) :- + rdfs_individual_of(URI, ens:'Agent') -> + Shape = [img([src(icons('ad_secret_agent.png'))])]. diff --git a/web/icons/ad_secret_agent.png b/web/icons/ad_secret_agent.png new file mode 100644 index 0000000..1580173 Binary files /dev/null and b/web/icons/ad_secret_agent.png differ