IndividualTemplateModel.java: Add externalUrl to getQrData()
individual-qrCodeFoafPerson.ftl: Use externalUrl
This commit is contained in:
parent
3ee4fa10ce
commit
edf091372e
2 changed files with 12 additions and 2 deletions
|
@ -73,6 +73,7 @@ public class IndividualTemplateModel extends BaseIndividualTemplateModel {
|
|||
return getVisUrl("vis", "entity_comparison");
|
||||
}
|
||||
|
||||
|
||||
public Map<String, String> getQrData() {
|
||||
String core = "http://vivoweb.org/ontology/core#";
|
||||
String foaf = "http://xmlns.com/foaf/0.1/";
|
||||
|
@ -96,6 +97,13 @@ public class IndividualTemplateModel extends BaseIndividualTemplateModel {
|
|||
if(emails.size() > 0)
|
||||
qrData.put("email", emails.toArray(new DataPropertyStatement[firstNames.size()])[0].getData());
|
||||
|
||||
String tempUrl = vreq.getRequestURL().toString();
|
||||
String prefix = "http://";
|
||||
tempUrl = tempUrl.substring(0, tempUrl.replace(prefix, "").indexOf("/") + prefix.length());
|
||||
String profileUrl = getProfileUrl();
|
||||
String externalUrl = tempUrl + profileUrl;
|
||||
qrData.put("externalUrl", externalUrl);
|
||||
|
||||
return qrData;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue