diff --git a/public/index.html b/public/index.html
index 6170d3fc..f10dc2e0 100644
--- a/public/index.html
+++ b/public/index.html
@@ -805,6 +805,7 @@
Relationview
}catch(e){
}
$('#relationtitle').html(" "+shortenURI(concept)+"")
+ $('#relationtablehead').html("Incoming Concept | Incoming Property | Concept | Outgoing Property | Outgoing Concept |
")
$('#relationtablebody').html("Loading instance data.... |
")
if(node.icon.includes("class.png")){
$('#relationtablebody').html("")
@@ -812,20 +813,20 @@ Relationview
for(result in results){
toappend=" | | "+shortenURI(concept)+" | "
if(results[result]["rel"]["value"] in geoproperties && geoproperties[results[result]["rel"]["value"]]=="ObjectProperty"){
- toappend+=""+shortenURI(results[result]["rel"]["value"])+" | "
+ toappend+=""+shortenURI(results[result]["rel"]["value"])+" | "
}else{
- toappend+=""+shortenURI(results[result]["rel"]["value"])+" | "
+ toappend+=""+shortenURI(results[result]["rel"]["value"])+" | "
}
- toappend+=""+shortenURI(results[result]["val"]["value"])+" |
"
+ toappend+=""+shortenURI(results[result]["val"]["value"])+" | "
$('#relationtablebody').append(toappend)
}
d3.sparql($('#endpointselect').val(), "SELECT DISTINCT ?rel ?val WHERE { ?tocon ?val . ?tocon ?rel ?con . ?con <"+concept+ "> . }").then((results)=>{
for(result in results){
- toappend=""+shortenURI(results[result]["val"]["value"])+" | "
+ toappend="
"+shortenURI(results[result]["val"]["value"])+" | "
if(results[result]["rel"]["value"] in geoproperties && geoproperties[results[result]["rel"]["value"]]=="ObjectProperty"){
- toappend+=""+shortenURI(results[result]["rel"]["value"])+" | "
+ toappend+=""+shortenURI(results[result]["rel"]["value"])+" | "
}else{
- toappend+=""+shortenURI(results[result]["rel"]["value"])+" | "
+ toappend+=""+shortenURI(results[result]["rel"]["value"])+" | "
}
toappend+=""+shortenURI(concept)+" | | |
"
$('#relationtablebody').append(toappend)
@@ -836,22 +837,23 @@ Relationview
}
}
-function getPropRelationDialog(node){
- concept=node.id
+function getPropRelationDialog(uri,icon){
+ concept=uri
document.getElementById("relationDialog").showModal()
try{
$('#relationtable').DataTable().destroy();
}catch(e){
}
- $('#relationtitle').html(" "+shortenURI(concept)+"")
+ $('#relationtitle').html(" "+shortenURI(concept)+"")
+ $('#relationtablehead').html("Incoming Concept | Property | Outgoing Concept |
")
$('#relationtablebody').html("Loading instance data.... |
")
- if(node.icon.includes("class.png")){
+ if(icon.includes("property")){
$('#relationtablebody').html("")
- d3.sparql($('#endpointselect').val(), "SELECT DISTINCT ?sub ?obj WHERE { ?sub <"+concept+"> ?obj . }").then((results)=>{
+ d3.sparql($('#endpointselect').val(), "SELECT DISTINCT ?sub ?obj WHERE { ?subb <"+concept+"> ?objj . ?subb ?sub . ?objj ?obj .}").then((results)=>{
for(result in results){
- toappend=""+shortenURI(results[result]["sub"]["value"])+" | "
- toappend="
- toappend+=" | "+shortenURI(results[result]["obj"]["value"])+" |
"
+ toappend=""+shortenURI(results[result]["sub"]["value"])+" | "
+ toappend+=" "+shortenURI(concept)+" | "
+ toappend+=""+shortenURI(results[result]["obj"]["value"])+" |
"
$('#relationtablebody').append(toappend)
}
});