diff --git a/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ManageGrantsForIndividualController.java b/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ManageGrantsForIndividualController.java index 0fb97494..33a6f5e2 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ManageGrantsForIndividualController.java +++ b/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ManageGrantsForIndividualController.java @@ -71,13 +71,19 @@ public class ManageGrantsForIndividualController extends FreemarkerHttpServlet { + " ?subject ?role . \n" + " ?role a core:ResearcherRole . \n" + " ?role vitro:mostSpecificType ?subclass \n" - + " OPTIONAL { ?role core:relatedBy ?activity . \n" - + " ?activity a core:Grant . \n" - + " OPTIONAL {?activity rdfs:label ?label2} \n" + + " OPTIONAL { \n" + + " ?subject ?role . \n" + + " ?role a core:ResearcherRole . \n" + + " ?role core:relatedBy ?activity . \n" + + " ?activity a core:Grant . \n" + + " ?activity rdfs:label ?label2 . \n" + " } \n" - + " OPTIONAL { ?role ?activity . \n" - + " ?activity a core:Project . \n" - + " OPTIONAL {?activity rdfs:label ?label2} \n" + + " OPTIONAL { \n" + + " ?subject ?role . \n" + + " ?role a core:ResearcherRole . \n" + + " ?role ?activity . \n" + + " ?activity a core:Project . \n" + + " ?activity rdfs:label ?label2 . \n" + " } \n" + " OPTIONAL { ?role core:hideFromDisplay ?hideThis } \n" + "} ORDER BY ?subclass ?label2"; diff --git a/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ManagePublicationsForIndividualController.java b/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ManagePublicationsForIndividualController.java index 613f98bf..17ab395d 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ManagePublicationsForIndividualController.java +++ b/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ManagePublicationsForIndividualController.java @@ -70,10 +70,19 @@ public class ManagePublicationsForIndividualController extends FreemarkerHttpSer + "SELECT DISTINCT ?subclass ?authorship (str(?label) as ?title) ?pub ?hideThis WHERE { \n" + " ?subject core:relatedBy ?authorship . \n" + " ?authorship a core:Authorship . \n" - + " OPTIONAL { ?authorship core:relates ?pub . " - + " ?pub a . \n" - + " ?pub rdfs:label ?label \n" - + " OPTIONAL { ?pub vitro:mostSpecificType ?subclass } \n" + + " OPTIONAL { \n " + + " ?subject core:relatedBy ?authorship . \n" + + " ?authorship a core:Authorship . \n" + + " ?authorship core:relates ?pub . " + + " ?pub a . \n" + + " ?pub rdfs:label ?label . \n" + + " OPTIONAL { \n" + + " ?subject core:relatedBy ?authorship . \n" + + " ?authorship a core:Authorship . \n" + + " ?authorship core:relates ?pub . " + + " ?pub a . \n" + + " ?pub vitro:mostSpecificType ?subclass . \n" + + " } \n" + " } \n" + " OPTIONAL { ?authorship core:hideFromDisplay ?hideThis } \n" + "} ORDER BY ?subclass ?title";