skos_browser/commit

extend info shown on each individual concept

authorJacco van Ossenbruggen
Fri May 9 17:41:28 2014 +0200
committerJacco van Ossenbruggen
Fri May 9 17:41:28 2014 +0200
commitd3e00e219dfde4145e5e6500f8f71cd2a0a3968c
tree3a02db96db8c5d035cd75bcb4ab0469c1c6a48b6
parent0c1c368a44e0fa98967aa59dfe77119725bb66ca
Diff style: patch stat
diff --git a/applications/skos_browser.pl b/applications/skos_browser.pl
index 0229772..da48ee5 100644
--- a/applications/skos_browser.pl
+++ b/applications/skos_browser.pl
@@ -136,10 +136,25 @@ http_concept_info(Request) :-
 	print_html(HTML).
 
 skos_description(C, Desc) :-
-	(   rdf_has(C, skos:scopeNote, Lit)
-	->  literal_text(Lit, Desc)
-	;   Desc = ''
-	).
+	(   rdf_has(C, skos:definition, LitDef)
+	->  literal_text(LitDef, Def),
+	    DefH = div([class(definition)], Def)
+	;   DefH = ''
+	),
+	(   rdf_has(C, skos:notation, LitNot)
+	->  literal_text(LitNot, Not),
+	    NotH = div([class(notation)], Not)
+	;   NotH = ''
+	),
+	(   rdf_has(C, skos:scopeNote, LitScope)
+	->  literal_text(LitScope, Scope),
+	    ScopeH = div([class(scopeNote)], Scope)
+	;   ScopeH = ''
+	),
+	Desc = div([class(descriptions)],
+		   [ NotH, DefH, ScopeH ]
+		  ).
+
 
 skos_alt_labels(C, AltLabels) :-
 	findall(AL, ( rdf_has(C, skos:altLabel, Lit),
@@ -165,14 +180,15 @@ html_info_snippet(URI, Label, Desc, AltLabels, Related) -->
 	html(div(class(infobox),
 		 [ h3([\resource_link(URI, Label)
 		      ]),
-		   div(class(uri), URI),
 		   div(
 		       [ div(class(labels),
 			     \html_label_list(AltLabels)),
 			 div(class(desc), Desc),
 			 div(class(related),
 			     \html_concept_list(Related))
-		       ])
+		       ]),
+		   div(class(uri), a([href(URI)], URI))
+
 		 ])).
 
 html_label_list([]) --> !.