diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl
index 4831b5f4..f756c881 100644
--- a/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl
+++ b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl
@@ -56,7 +56,7 @@
<#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
<#if (title.statements?size < 1) >
<@p.addLinkWithLabel title editable />
- <#else>
+ <#elseif editable>
${title.name?capitalize!}
<@p.verboseDisplay title />
#if>
diff --git a/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl b/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl
index 76611713..4b5e5c85 100644
--- a/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl
@@ -5,7 +5,7 @@
<#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
<#assign localName = positions.localName>
${positions.name?capitalize} <@p.addLink positions editable /> <@p.verboseDisplay positions />
-
+
<@p.objectProperty positions editable />
#if>
diff --git a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/IndividualTemplateModel.java b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/IndividualTemplateModel.java
index 0b918641..1222df79 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/IndividualTemplateModel.java
+++ b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/IndividualTemplateModel.java
@@ -2,13 +2,19 @@
package edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import com.hp.hpl.jena.query.QuerySolution;
+import com.hp.hpl.jena.query.ResultSet;
+import com.hp.hpl.jena.rdf.model.RDFNode;
+
import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement;
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
@@ -16,6 +22,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.ParamMap;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Route;
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
+import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
public class IndividualTemplateModel extends BaseIndividualTemplateModel {
@@ -23,12 +30,31 @@ public class IndividualTemplateModel extends BaseIndividualTemplateModel {
private static final Log log = LogFactory.getLog(IndividualTemplateModel.class);
private static final String FOAF = "http://xmlns.com/foaf/0.1/";
- private static final String CORE = "http://vivoweb.org/ontology/core#";
private static final String PERSON_CLASS = FOAF + "Person";
private static final String ORGANIZATION_CLASS = FOAF + "Organization";
private static final String BASE_VISUALIZATION_URL =
UrlBuilder.getUrl(Route.VISUALIZATION_SHORT.path());
+ private static String VCARD_DATA_QUERY = ""
+ + "PREFIX obo: \n"
+ + "PREFIX vcard: \n"
+ + "SELECT DISTINCT ?firstName ?lastName ?email ?phone ?title \n"
+ + "WHERE { \n"
+ + " ?subject obo:ARG_2000028 ?vIndividual . \n"
+ + " ?vIndividual vcard:hasName ?vName . \n"
+ + " ?vName vcard:givenName ?firstName . \n"
+ + " ?vName vcard:familyName ?lastName . \n"
+ + " OPTIONAL { ?vIndividual vcard:hasEmail ?vEmail . \n"
+ + " ?vEmail vcard:email ?email . \n"
+ + " } \n"
+ + " OPTIONAL { ?vIndividual vcard:hasTelephone ?vPhone . \n"
+ + " ?vPhone vcard:telephone ?phone . \n"
+ + " } \n"
+ + " OPTIONAL { ?vIndividual vcard:hasTitle ?vTitle . \n"
+ + " ?vTitle vcard:title ?title . \n"
+ + " } \n"
+ + "} " ;
+ private List