updating the branch dev-search_relevance(r2947) with changes from the trunk(r2837).
This commit is contained in:
commit
1d0b7f4fbb
116 changed files with 1640 additions and 1093 deletions
|
@ -11,37 +11,40 @@
|
||||||
|
|
||||||
|
|
||||||
<bean id="person_pub_count"
|
<bean id="person_pub_count"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personpubcount.PersonPublicationCountRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.personpubcount.PersonPublicationCountRequestHandler" />
|
||||||
|
|
||||||
<bean id="utilities"
|
<bean id="utilities"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.utilities.UtilitiesRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.utilities.UtilitiesRequestHandler" />
|
||||||
|
|
||||||
<bean id="coauthorship"
|
<bean id="coauthorship"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coauthorship.CoAuthorshipRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.coauthorship.CoAuthorshipRequestHandler" />
|
||||||
|
|
||||||
<bean id="person_grant_count"
|
<bean id="person_grant_count"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.persongrantcount.PersonGrantCountRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.persongrantcount.PersonGrantCountRequestHandler" />
|
||||||
|
|
||||||
<bean id="person_level"
|
<bean id="person_level"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personlevel.PersonLevelRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.personlevel.PersonLevelRequestHandler" />
|
||||||
|
|
||||||
<bean id="coprincipalinvestigator"
|
<bean id="coprincipalinvestigator"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator.CoPIGrantCountRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator.CoPIGrantCountRequestHandler" />
|
||||||
|
|
||||||
<bean id="entity_comparison"
|
<bean id="entity_comparison"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.EntityPublicationCountRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.EntityPublicationCountRequestHandler" />
|
||||||
|
|
||||||
<bean id="pub_temporal"
|
<bean id="pub_temporal"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.cached.TemporalPublicationVisualizationRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.cached.TemporalPublicationVisualizationRequestHandler" />
|
||||||
|
|
||||||
<bean id="entity_grant_count"
|
<bean id="entity_grant_count"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitygrantcount.EntityGrantCountRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.entitygrantcount.EntityGrantCountRequestHandler" />
|
||||||
|
|
||||||
<bean id="grant_temporal"
|
<bean id="grant_temporal"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.cached.TemporalGrantVisualizationRequestHandler" />
|
class="edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.cached.TemporalGrantVisualizationRequestHandler" />
|
||||||
|
|
||||||
|
<bean id="map_of_science"
|
||||||
|
class="edu.cornell.mannlib.vitro.webapp.visualization.mapofscience.MapOfScienceVisualizationRequestHandler" />
|
||||||
|
|
||||||
<bean id="visualizationInjector"
|
<bean id="visualizationInjector"
|
||||||
class="edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationInjector">
|
class="edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationInjector">
|
||||||
<property name="visualizations">
|
<property name="visualizations">
|
||||||
<map>
|
<map>
|
||||||
<entry key="person_pub_count">
|
<entry key="person_pub_count">
|
||||||
|
@ -106,6 +109,10 @@
|
||||||
<ref bean="grant_temporal"></ref>
|
<ref bean="grant_temporal"></ref>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
||||||
|
<entry key="map-of-science">
|
||||||
|
<ref bean="map_of_science"></ref>
|
||||||
|
</entry>
|
||||||
|
|
||||||
</map>
|
</map>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
|
|
@ -141,17 +141,17 @@
|
||||||
</listener-class>
|
</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
<!-- The Lucene index uses a "public" filter, so the PropertyRestrictionPolicyHelper must already be set up. -->
|
<!-- The Lucene index uses a "public" filter, so the PropertyRestrictionPolicyHelper must already be set up.
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class> edu.cornell.mannlib.vitro.webapp.search.lucene.LuceneSetup </listener-class>
|
<listener-class> edu.cornell.mannlib.vitro.webapp.search.lucene.LuceneSetup </listener-class>
|
||||||
</listener>
|
</listener> -->
|
||||||
<!--
|
<!-- -->
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class>
|
<listener-class>
|
||||||
edu.cornell.mannlib.vitro.webapp.search.solr.SolrSetup
|
edu.cornell.mannlib.vitro.webapp.search.solr.SolrSetup
|
||||||
</listener-class>
|
</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- vivo specific, must appear before other policies -->
|
<!-- vivo specific, must appear before other policies -->
|
||||||
<listener>
|
<listener>
|
||||||
|
@ -162,12 +162,6 @@
|
||||||
<listener-class> edu.cornell.mannlib.vitro.webapp.auth.policy.setup.SelfEditingPolicySetup</listener-class>
|
<listener-class> edu.cornell.mannlib.vitro.webapp.auth.policy.setup.SelfEditingPolicySetup</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
<listener>
|
|
||||||
<listener-class>
|
|
||||||
edu.cornell.mannlib.vitro.webapp.auth.identifier.UserToIndIdentifierFactorySetup
|
|
||||||
</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class> edu.cornell.mannlib.vitro.webapp.auth.policy.setup.EditorEditingPolicySetup
|
<listener-class> edu.cornell.mannlib.vitro.webapp.auth.policy.setup.EditorEditingPolicySetup
|
||||||
</listener-class>
|
</listener-class>
|
||||||
|
@ -954,6 +948,12 @@
|
||||||
<servlet-name>AutocompleteController</servlet-name>
|
<servlet-name>AutocompleteController</servlet-name>
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.search.controller.AutocompleteController</servlet-class>
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.search.controller.AutocompleteController</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
<!--
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>AutocompleteController</servlet-name>
|
||||||
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.search.controller.SolrAutocompleteController</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
-->
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>AutocompleteController</servlet-name>
|
<servlet-name>AutocompleteController</servlet-name>
|
||||||
<url-pattern>/autocomplete</url-pattern>
|
<url-pattern>/autocomplete</url-pattern>
|
||||||
|
@ -1003,6 +1003,12 @@
|
||||||
<servlet-name>JSON Service</servlet-name>
|
<servlet-name>JSON Service</servlet-name>
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.JSONServlet</servlet-class>
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.JSONServlet</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
<!--
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>JSON Service</servlet-name>
|
||||||
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.SolrJsonServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
-->
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>JSON Service</servlet-name>
|
<servlet-name>JSON Service</servlet-name>
|
||||||
<url-pattern>/dataservice</url-pattern>
|
<url-pattern>/dataservice</url-pattern>
|
||||||
|
@ -1137,7 +1143,7 @@
|
||||||
<url-pattern>/unrecognizedUser</url-pattern>
|
<url-pattern>/unrecognizedUser</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- THIS SHOULD BE COMMENTED OUT FOR PRODUCTION
|
<!-- THIS SHOULD BE COMMENTED OUT FOR PRODUCTION -->
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>FakeExternalAuthController</servlet-name>
|
<servlet-name>FakeExternalAuthController</servlet-name>
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.authenticate.FakeExternalAuthController</servlet-class>
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.authenticate.FakeExternalAuthController</servlet-class>
|
||||||
|
@ -1147,7 +1153,7 @@
|
||||||
<servlet-name>FakeExternalAuthController</servlet-name>
|
<servlet-name>FakeExternalAuthController</servlet-name>
|
||||||
<url-pattern>/admin/fakeExternalAuth</url-pattern>
|
<url-pattern>/admin/fakeExternalAuth</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
-->
|
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>browsecontroller</servlet-name>
|
<servlet-name>browsecontroller</servlet-name>
|
||||||
|
@ -1235,12 +1241,12 @@
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>StandardVisualizationController</servlet-name>
|
<servlet-name>StandardVisualizationController</servlet-name>
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.StandardVisualizationController</servlet-class>
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.StandardVisualizationController</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>ShortURLVisualizationController</servlet-name>
|
<servlet-name>ShortURLVisualizationController</servlet-name>
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.ShortURLVisualizationController</servlet-class>
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.ShortURLVisualizationController</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
|
@ -1263,7 +1269,7 @@
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>AjaxVisualizationController</servlet-name>
|
<servlet-name>AjaxVisualizationController</servlet-name>
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.AjaxVisualizationController</servlet-class>
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.AjaxVisualizationController</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
|
@ -1273,7 +1279,7 @@
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>DataVisualizationController</servlet-name>
|
<servlet-name>DataVisualizationController</servlet-name>
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController</servlet-class>
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
|
|
23
productMods/css/individual/individual-qr.css
Normal file
23
productMods/css/individual/individual-qr.css
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
|
.qrCode {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
img.qrCode {
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
.vcard {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
h2 em {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: .7em;
|
||||||
|
}
|
||||||
|
section h4 {
|
||||||
|
margin-top: 2em;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
section textarea {
|
||||||
|
width: 600px;
|
||||||
|
height: 120px;
|
||||||
|
}
|
|
@ -32,7 +32,7 @@ core:authorInAuthorship (Person : Authorship) - inverse of linkedAuthor
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyComparator" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyComparator" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.PublicationHasAuthorValidator" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.PublicationHasAuthorValidator" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
||||||
|
|
|
@ -19,7 +19,7 @@ This is intended to create a set of statements like:
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
|
||||||
|
@ -48,9 +48,9 @@ This is intended to create a set of statements like:
|
||||||
ObjectProperty op = wdf.getObjectPropertyDao().getObjectPropertyByURI( predicateUri );
|
ObjectProperty op = wdf.getObjectPropertyDao().getObjectPropertyByURI( predicateUri );
|
||||||
if( op != null && op.getURIInverse() != null ){
|
if( op != null && op.getURIInverse() != null ){
|
||||||
%>
|
%>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.Field"%>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field"%>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.DateTimeIntervalValidation"%><c:set var="inversePredicate"><%=op.getURIInverse()%></c:set> <%
|
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation"%><c:set var="inversePredicate"><%=op.getURIInverse()%></c:set> <%
|
||||||
}else{
|
}else{
|
||||||
%> <c:set var="inversePredicate"></c:set> <%
|
%> <c:set var="inversePredicate"></c:set> <%
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ core:informationResourceInAuthorship (InformationResource : Authorship) - invers
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement"%>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.PersonHasPublicationValidator" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.PersonHasPublicationValidator" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
|
||||||
|
@ -56,9 +56,9 @@
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
|
||||||
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
|
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.Field"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.DateTimeIntervalValidation"%><c:set var="vivoOnt" value="http://vivoweb.org/ontology" />
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation"%><c:set var="vivoOnt" value="http://vivoweb.org/ontology" />
|
||||||
|
|
||||||
<%!
|
<%!
|
||||||
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.forms.addRoleToPersonTwoStage.jsp");
|
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.forms.addRoleToPersonTwoStage.jsp");
|
||||||
|
|
|
@ -23,11 +23,11 @@ parameter set up by editRequestDispatch.
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.VClass"%>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.VClass"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.FoafNameToRdfsLabelPreprocessor"%>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.FoafNameToRdfsLabelPreprocessor"%>
|
||||||
<%@ page import="org.apache.commons.logging.Log" %>
|
<%@ page import="org.apache.commons.logging.Log" %>
|
||||||
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
||||||
|
|
||||||
|
|
|
@ -10,15 +10,15 @@
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Css" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Css" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.Field"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.DateTimeIntervalValidation"%>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation"%>
|
||||||
|
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
|
||||||
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
|
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
|
||||||
|
|
|
@ -44,7 +44,7 @@ core:dateTimePrecision (DateTimeValue : DateTimeValuePrecision)
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary.Precision"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary.Precision"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
||||||
|
@ -52,9 +52,9 @@ core:dateTimePrecision (DateTimeValue : DateTimeValuePrecision)
|
||||||
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.JavaScript" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.JavaScript" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Css" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Css" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.Field"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
||||||
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.DateTimeIntervalValidation"%>
|
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode"%>
|
||||||
|
|
||||||
|
|
|
@ -10,20 +10,20 @@
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.JavaScript" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.JavaScript" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Css" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Css" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.Field"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode"%>
|
||||||
|
|
||||||
<%@ page import="org.apache.commons.logging.Log" %>
|
<%@ page import="org.apache.commons.logging.Log" %>
|
||||||
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.DateTimeIntervalValidation"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation"%>
|
||||||
|
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
|
||||||
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
|
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
|
||||||
|
|
BIN
productMods/images/individual/qr_icon.png
Normal file
BIN
productMods/images/individual/qr_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 B |
|
@ -1,43 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.*" %>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
|
||||||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
|
||||||
<%@ page errorPage="/error.jsp"%>
|
|
||||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
|
||||||
|
|
||||||
<c:set var="portal" value="${requestScope.portalBean}"/>
|
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="<c:url value="${themeDir}css/screen.css"/>" media="screen"/>
|
|
||||||
|
|
||||||
<c:out value="${requestScope.css}" escapeXml="false"/>
|
|
||||||
<title>Edit Your Profile</title>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="wrap">
|
|
||||||
<jsp:include page="/templates/page/freemarkerTransition/identity.jsp" flush="true"/>
|
|
||||||
<div id="contentwrap">
|
|
||||||
<jsp:include page="/templates/page/freemarkerTransition/menu.jsp" flush="true"/>
|
|
||||||
<div id="content" class="full">
|
|
||||||
<div align="center">
|
|
||||||
If you are a member of the Cornell community and would like to edit you profile
|
|
||||||
in the Vivo system please login using your netId.
|
|
||||||
</div>
|
|
||||||
<div align="center">
|
|
||||||
<c:url value="/edit/login.jsp" var="loginUrl"/>
|
|
||||||
<button type="button" onclick="javascript:document.location.href='${loginUrl}'">Login</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- END div 'content' -->
|
|
||||||
</div><!-- END div 'contentwrap' -->
|
|
||||||
<jsp:include page="/templates/page/freemarkerTransition/footer.jsp" flush="true"/>
|
|
||||||
</div><!-- END div 'wrap' -->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -2,37 +2,31 @@
|
||||||
|
|
||||||
<#-- Page providing options for disseminating QR codes -->
|
<#-- Page providing options for disseminating QR codes -->
|
||||||
|
|
||||||
<#include "individual-qrCodeFoafPerson.ftl">
|
<#include "individual-qrCodeGenerator.ftl">
|
||||||
|
|
||||||
<#assign qrCodeWidth = "150">
|
<#assign qrCodeWidth = "150">
|
||||||
|
|
||||||
<h2>Export QR Code</h2>
|
<h2>Export QR Code <em>(<a href="${individual.qrData.aboutQrCodesUrl}" title="More info on QR codes">What is this?</a>)</em></h2>
|
||||||
<div>
|
|
||||||
<div style="float:left">
|
|
||||||
<#assign thumbUrl = individual.thumbUrl! "${urls.images}/placeholders/person.thumbnail.jpg" >
|
|
||||||
<img src="${thumbUrl}" />
|
|
||||||
</div>
|
|
||||||
<div style="float:left">
|
|
||||||
<h3>${individual.nameStatement.value}</h3>
|
|
||||||
</div>
|
|
||||||
<div style="clear:both" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="border:1px solid #cccccc">
|
<#assign thumbUrl = individual.thumbUrl! "${urls.images}/placeholders/person.thumbnail.jpg" >
|
||||||
<h4 style="padding-left:5px">VCard</h4>
|
<img class="qrCode" src="${thumbUrl}" />
|
||||||
|
|
||||||
|
<h3 class="qrCode"><a href="${individual.profileUrl}" title="View this person's profile">${individual.nameStatement.value}</a></h3>
|
||||||
|
|
||||||
|
<section class="vcard">
|
||||||
|
<h4>VCard</h4>
|
||||||
<@qrCodeVCard qrCodeWidth="150" />
|
<@qrCodeVCard qrCodeWidth="150" />
|
||||||
<textarea readonly="readonly" style="width:600px;height:120px">
|
<textarea name="qrCodeVCard" readonly>
|
||||||
<img src="${getQrCodeUrlForVCard(qrCodeWidth)}" /><#t>
|
<img src="${getQrCodeUrlForVCard(qrCodeWidth)}" /><#t>
|
||||||
</textarea><#t>
|
</textarea><#t>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<div style="border:1px solid #cccccc">
|
<section>
|
||||||
<h4 style="padding-left:5px">Hyperlink</h4>
|
<h4>Hyperlink</h4>
|
||||||
<@qrCodeLink qrCodeWidth="150" />
|
<@qrCodeLink qrCodeWidth="150" />
|
||||||
<textarea readonly="readonly" style="width:600px;height:120px">
|
<textarea name="qrCodeLink" readonly>
|
||||||
<img src="${getQrCodeUrlForLink(qrCodeWidth)}" /><#t>
|
<img src="${getQrCodeUrlForLink(qrCodeWidth)}" /><#t>
|
||||||
</textarea><#t>
|
</textarea><#t>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual-qr.css" />')}
|
|
@ -1,35 +1,64 @@
|
||||||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var alreadyDone = false;
|
var harvestProgressResponse;
|
||||||
function doFunStuff()
|
function doFunStuff()
|
||||||
{
|
{
|
||||||
if(!alreadyDone)
|
doHarvest();
|
||||||
{
|
}
|
||||||
alreadyDone = true;
|
|
||||||
document.getElementById("progress").style.visibility = "visible"
|
function doHarvest()
|
||||||
document.getElementById("progressUploading").style.visibility = "visible"
|
{
|
||||||
window.setTimeout(uploadingSuccess, 2000);
|
var request = createRequest();
|
||||||
|
request.onreadystatechange=function() {
|
||||||
|
if(request.readyState == 4 && request.status == 200) {
|
||||||
|
harvestProgressResponse = request.responseText;
|
||||||
|
window.setTimeout(continueHarvest, 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
request.open("POST", "/vivo/harvester/testfile", true);
|
||||||
|
request.setRequestHeader("content-type","application/x-www-form-urlencoded");
|
||||||
|
request.send("${paramIsHarvestClick}=true");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function continueHarvest()
|
||||||
|
{
|
||||||
|
var response = harvestProgressResponse;
|
||||||
|
var json = eval("(" + response + ")");
|
||||||
|
|
||||||
|
if(!json.finished) {
|
||||||
|
var logAppend = json.progressSinceLastCheck;
|
||||||
|
var progressTextArea = document.getElementById("progressTextArea");
|
||||||
|
progressTextArea.innerHTML = progressTextArea.innerHTML + logAppend;
|
||||||
|
progressTextArea.scrollTop = progressTextArea.scrollHeight;
|
||||||
|
|
||||||
|
var request = createRequest();
|
||||||
|
request.onreadystatechange=function() {
|
||||||
|
if(request.readyState == 4 && request.status == 200) {
|
||||||
|
harvestProgressResponse = request.responseText;
|
||||||
|
window.setTimeout(continueHarvest, 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
request.open("POST", "/vivo/harvester/testfile", true);
|
||||||
|
request.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||||
|
request.send("${paramIsHarvestClick}=false");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function uploadingSuccess()
|
|
||||||
{
|
|
||||||
document.getElementById("progressUploadingSuccess").style.visibility = "visible"
|
|
||||||
document.getElementById("progressGenerating").style.visibility = "visible"
|
function createRequest() {
|
||||||
window.setTimeout(generatingSuccess, 2000);
|
var request;
|
||||||
}
|
if (window.XMLHttpRequest) {
|
||||||
function generatingSuccess()
|
request = new XMLHttpRequest();
|
||||||
{
|
} else {
|
||||||
document.getElementById("progressGeneratingSuccess").style.visibility = "visible"
|
request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
document.getElementById("progressExecuting").style.visibility = "visible"
|
}
|
||||||
window.setTimeout(executingSuccess, 2000);
|
return request;
|
||||||
}
|
}
|
||||||
function executingSuccess()
|
|
||||||
{
|
|
||||||
document.getElementById("progressExecutingSuccess").style.visibility = "visible"
|
|
||||||
document.getElementById("results").style.visibility = "visible"
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleCollapsibleDiv(divName)
|
function toggleCollapsibleDiv(divName)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +101,7 @@
|
||||||
|
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
|
document.getElementById("${paramFirstUpload}").value = "true";
|
||||||
document.getElementById("fileUploadForm").onsubmit = function()
|
document.getElementById("fileUploadForm").onsubmit = function()
|
||||||
{
|
{
|
||||||
document.getElementById("fileUploadForm").target = "uploadTarget";
|
document.getElementById("fileUploadForm").target = "uploadTarget";
|
||||||
|
@ -168,270 +198,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="clearBothDiv" />
|
<div class="clearBothDiv" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="step5" class="testfile-step">
|
<div id="step5" class="testfile-step">
|
||||||
<h3 class="testfile-step-header">Step 5</h3>
|
<h3 class="testfile-step-header">Step 5</h3>
|
||||||
<div id="step5-inner" class="testfile-step-body">
|
<div id="step5-inner" class="testfile-step-body">
|
||||||
<h4 class="testfile-step-subheader">View results</h4>
|
<h4 class="testfile-step-subheader">View results</h4>
|
||||||
<div id="progress" style="visibility:hidden">
|
<div id="progress">
|
||||||
<ul>
|
<textarea cols="100" rows="50" readonly="readonly" id="progressTextArea"></textarea>
|
||||||
<li id="progressUploading" style="visibility:hidden">Validating files... <span id="progressUploadingSuccess" style="visibility:hidden">success</span></li>
|
|
||||||
<li id="progressGenerating" style="visibility:hidden">Generating script... <span id="progressGeneratingSuccess" style="visibility:hidden">success</span></li>
|
|
||||||
<li id="progressExecuting" style="visibility:hidden">Executing script... <span id="progressExecutingSuccess" style="visibility:hidden">success</span></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div style="height:30px"></div>
|
|
||||||
<div id="results" style="visibility:hidden">
|
|
||||||
<h3>Results</h3>
|
|
||||||
<span style="color:green;font-weight:bold">Harvest successful.</span>
|
|
||||||
<h4>Script used for harvest</h4>
|
|
||||||
<div><input type="button" value="Save" style="margin-bottom:10px" /></div>
|
|
||||||
<textarea cols="100" rows="50" readonly="readonly"><#noparse>#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (c) 2010 Christopher Haines, Dale Scheppler, Nicholas Skaggs, Stephen V. Williams, Michael Barbieri.
|
|
||||||
# All rights reserved. This program and the accompanying materials
|
|
||||||
# are made available under the terms of the new BSD license
|
|
||||||
# which accompanies this distribution, and is available at
|
|
||||||
# http://www.opensource.org/licenses/bsd-license.html
|
|
||||||
#
|
|
||||||
# Contributors:
|
|
||||||
# Christopher Haines, Dale Scheppler, Nicholas Skaggs, Stephen V. Williams, Michael Barbieri - initial API and implementation
|
|
||||||
|
|
||||||
#KNOWN ISSUE: Seems to tie in matches that were originally in VIVO into the input model, so that if the input model is cleaned out of VIVO,
|
|
||||||
# then those matches will be removed. Actually they remain, hidden, but much of their data including their rdf:type is gone. An
|
|
||||||
# RDF export will show this.
|
|
||||||
|
|
||||||
# Exit on first error
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
HARVESTERDIR=`dirname "$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"`
|
|
||||||
HARVESTERDIR=$(cd $HARVESTERDIR; cd ..; pwd)
|
|
||||||
|
|
||||||
HARVESTER_TASK=mods
|
|
||||||
|
|
||||||
if [ -f scripts/env ]; then
|
|
||||||
. scripts/env
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Full Logging in $HARVESTER_TASK_DATE.log"
|
|
||||||
|
|
||||||
BASEDIR=harvested-data/$HARVESTER_TASK
|
|
||||||
BIBINDIR=$BASEDIR/rh-bibutils-in
|
|
||||||
BIBOUTDIR=$BASEDIR/rh-bibutils-out
|
|
||||||
RAWRHDIR=$BASEDIR/rh-raw
|
|
||||||
RAWRHDBURL=jdbc:h2:$RAWRHDIR/store
|
|
||||||
RDFRHDIR=$BASEDIR/rh-rdf
|
|
||||||
RDFRHDBURL=jdbc:h2:$RDFRHDIR/store
|
|
||||||
MODELDIR=$BASEDIR/model
|
|
||||||
MODELDBURL=jdbc:h2:$MODELDIR/store
|
|
||||||
MODELNAME=modsTempTransfer
|
|
||||||
SCOREDATADIR=$BASEDIR/score-data
|
|
||||||
SCOREDATADBURL=jdbc:h2:$SCOREDATADIR/store
|
|
||||||
SCOREDATANAME=modsScoreData
|
|
||||||
TEMPCOPYDIR=$BASEDIR/temp-copy
|
|
||||||
MATCHEDDIR=$BASEDIR/matched
|
|
||||||
MATCHEDDBURL=jdbc:h2:$MATCHEDDIR/store
|
|
||||||
MATCHEDNAME=matchedData
|
|
||||||
|
|
||||||
#scoring algorithms
|
|
||||||
EQTEST="org.vivoweb.harvester.score.algorithm.EqualityTest"
|
|
||||||
LEVDIFF="org.vivoweb.harvester.score.algorithm.NormalizedLevenshteinDifference"
|
|
||||||
|
|
||||||
#matching properties
|
|
||||||
CWEMAIL="http://vivoweb.org/ontology/core#workEmail"
|
|
||||||
SWEMAIL="http://vivoweb.org/ontology/score#workEmail"
|
|
||||||
FFNAME="http://xmlns.com/foaf/0.1/firstName"
|
|
||||||
SFNAME="http://vivoweb.org/ontology/score#foreName"
|
|
||||||
FLNAME="http://xmlns.com/foaf/0.1/lastName"
|
|
||||||
CMNAME="http://vivoweb.org/ontology/core#middleName"
|
|
||||||
BPMID="http://purl.org/ontology/bibo/pmid"
|
|
||||||
CTITLE="http://vivoweb.org/ontology/core#title"
|
|
||||||
BISSN="http://purl.org/ontology/bibo/ISSN"
|
|
||||||
PVENUEFOR="http://vivoweb.org/ontology/core#publicationVenueFor"
|
|
||||||
LINKAUTH="http://vivoweb.org/ontology/core#linkedAuthor"
|
|
||||||
LINKINFORES="http://vivoweb.org/ontology/core#linkedInformationResource"
|
|
||||||
AUTHINAUTH="http://vivoweb.org/ontology/core#authorInAuthorship"
|
|
||||||
RDFTYPE="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
|
||||||
RDFSLABEL="http://www.w3.org/2000/01/rdf-schema#label"
|
|
||||||
BASEURI="http://vivoweb.org/harvest/mods/"
|
|
||||||
|
|
||||||
#BIBUTILSBASE="lib/bibutils/bibutils_4.12_x86_64"
|
|
||||||
BIBUTILSBASE="lib/bibutils/bibutils_4.12_i386"
|
|
||||||
BIBUTILSINPUTFORMAT="med"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#clear old fetches
|
|
||||||
rm -rf $BIBINDIR
|
|
||||||
|
|
||||||
# Execute Fetch for Pubmed
|
|
||||||
$PubmedFetch -X config/tasks/ufl.pubmedfetch.xml -o $TFRH -OfileDir=$BIBINDIR
|
|
||||||
|
|
||||||
# clear old bibutils runs
|
|
||||||
rm -rf $BIBOUTDIR
|
|
||||||
|
|
||||||
# run bibutils
|
|
||||||
$RunBibutils -b $BIBUTILSBASE -m $BIBUTILSINPUTFORMAT -i $TFRH -IfileDir=$BIBINDIR -o $TFRH -OfileDir=$BIBOUTDIR
|
|
||||||
|
|
||||||
# clear old sanitizes
|
|
||||||
rm -rf $RAWRHDIR
|
|
||||||
|
|
||||||
# Sanitize data
|
|
||||||
$SanitizeMODSXML -i $TFRH -IfileDir=$BIBOUTDIR -o $TFRH -OfileDir=$RAWRHDIR
|
|
||||||
|
|
||||||
# clear old translates
|
|
||||||
rm -rf $RDFRHDIR
|
|
||||||
|
|
||||||
# Execute Translate using the mods-to-vivo.xsl file
|
|
||||||
$XSLTranslator -i $TFRH -IfileDir=$RAWRHDIR -o $H2RH -OdbUrl=$RDFRHDBURL -x config/datamaps/mods-to-vivo.xsl -f
|
|
||||||
|
|
||||||
# backup translate
|
|
||||||
BACKRDF="rdf"
|
|
||||||
backup-path $RDFRHDIR $BACKRDF
|
|
||||||
# uncomment to restore previous translate
|
|
||||||
#restore-path $RDFRHDIR $BACKRDF
|
|
||||||
|
|
||||||
# Clear old H2 transfer model
|
|
||||||
rm -rf $MODELDIR
|
|
||||||
|
|
||||||
# Execute Transfer to import from record handler into local temp model
|
|
||||||
$Transfer -o $H2MODEL -OmodelName=$MODELNAME -OcheckEmpty=$CHECKEMPTY -OdbUrl=$MODELDBURL -h $H2RH -HdbUrl=$RDFRHDBURL
|
|
||||||
|
|
||||||
# backup H2 transfer Model
|
|
||||||
BACKMODEL="model"
|
|
||||||
backup-path $MODELDIR $BACKMODEL
|
|
||||||
# uncomment to restore previous H2 transfer Model
|
|
||||||
#restore-path $MODELDIR $BACKMODEL
|
|
||||||
|
|
||||||
# Clear old H2 score data
|
|
||||||
rm -rf $SCOREDATADIR
|
|
||||||
|
|
||||||
# Clear old H2 match data
|
|
||||||
rm -rf $MATCHEDDIR
|
|
||||||
|
|
||||||
# Clear old H2 temp copy
|
|
||||||
rm -rf $TEMPCOPYDIR
|
|
||||||
|
|
||||||
# Score variables for cleaner lines
|
|
||||||
SCOREINPUT="-i $H2MODEL -ImodelName=$MODELNAME -IdbUrl=$MODELDBURL -IcheckEmpty=$CHECKEMPTY"
|
|
||||||
SCOREDATA="-s $H2MODEL -SmodelName=$SCOREDATANAME -SdbUrl=$SCOREDATADBURL -ScheckEmpty=$CHECKEMPTY"
|
|
||||||
MATCHOUTPUT="-o $H2MODEL -OmodelName=$MATCHEDNAME -OdbUrl=$MATCHEDDBURL -OcheckEmpty=$CHECKEMPTY"
|
|
||||||
MATCHEDINPUT="-i $H2MODEL -ImodelName=$MATCHEDNAME -IdbUrl=$MATCHEDDBURL -IcheckEmpty=$CHECKEMPTY"
|
|
||||||
SCOREMODELS="$SCOREINPUT -v $VIVOCONFIG -VcheckEmpty=$CHECKEMPTY $SCOREDATA -t $TEMPCOPYDIR -b $SCOREBATCHSIZE"
|
|
||||||
|
|
||||||
# Execute Score to disambiguate data in "scoring" JENA model
|
|
||||||
TITLE="-Atitle=$EQTEST -Ftitle=$RDFSLABEL -Wtitle=1.0 -Ptitle=$RDFSLABEL"
|
|
||||||
|
|
||||||
$Score $SCOREMODELS $TITLE -n ${BASEURI}pub/
|
|
||||||
$Match $SCOREINPUT $SCOREDATA -t 0.7 -r
|
|
||||||
|
|
||||||
# clear H2 score data Model
|
|
||||||
rm -rf $SCOREDATADIR
|
|
||||||
|
|
||||||
|
|
||||||
#Author, Organization, Geographic Location, Journal match
|
|
||||||
LNAME="-AlName=$LEVDIFF -FlName=$FLNAME -WlName=0.5 -PlName=$FLNAME"
|
|
||||||
FNAME="-AfName=$LEVDIFF -FfName=$FFNAME -WfName=0.3 -PfName=$FFNAME"
|
|
||||||
RDFSLABELSCORE="-ArdfsLabel=$LEVDIFF -FrdfsLabel=$RDFSLABEL -WrdfsLabel=1.0 -PrdfsLabel=$RDFSLABEL"
|
|
||||||
|
|
||||||
$Score $SCOREMODELS $FNAME $LNAME -n ${BASEURI}author/
|
|
||||||
$Score $SCOREMODELS $RDFSLABELSCORE -n ${BASEURI}org/
|
|
||||||
$Score $SCOREMODELS $RDFSLABELSCORE -n ${BASEURI}geo/
|
|
||||||
$Score $SCOREMODELS $RDFSLABELSCORE -n ${BASEURI}journal/
|
|
||||||
$Match $SCOREINPUT $SCOREDATA -t 0.7 -r
|
|
||||||
|
|
||||||
|
|
||||||
# clear H2 score data Model
|
|
||||||
rm -rf $SCOREDATADIR
|
|
||||||
|
|
||||||
# Clear old H2 temp copy of input (URI here is hardcoded in Score)
|
|
||||||
$JenaConnect -Jtype=tdb -JdbDir=$TEMPCOPYDIR -JmodelName=http://vivoweb.org/harvester/model/scoring#inputClone -t
|
|
||||||
|
|
||||||
|
|
||||||
#Authorship match
|
|
||||||
AUTHPUB="-Aauthpub=$EQTEST -Fauthpub=$LINKINFORES -Wauthpub=0.5 -Pauthpub=$LINKINFORES"
|
|
||||||
AUTHAUTH="-Aauthauth=$EQTEST -Fauthauth=$LINKAUTH -Wauthauth=0.5 -Pauthauth=$LINKAUTH"
|
|
||||||
|
|
||||||
$Score $SCOREMODELS $AUTHPUB $AUTHAUTH -n ${BASEURI}authorship/
|
|
||||||
$Match $SCOREINPUT $SCOREDATA -t 0.7 -r
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# backup H2 score data Model
|
|
||||||
BACKSCOREDATA="scoredata-auths"
|
|
||||||
backup-path $SCOREDATADIR $BACKSCOREDATA
|
|
||||||
# uncomment to restore previous H2 matched Model
|
|
||||||
#restore-path $SCOREDATADIR $BACKSCOREDATA
|
|
||||||
|
|
||||||
# clear H2 score data Model
|
|
||||||
rm -rf $SCOREDATADIR
|
|
||||||
|
|
||||||
# Clear old H2 temp copy
|
|
||||||
rm -rf $TEMPCOPYDIR
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Execute ChangeNamespace lines: the -o flag value is determined by the XSLT used to translate the data
|
|
||||||
CNFLAGS="$SCOREINPUT -v $VIVOCONFIG -VcheckEmpty=$CHECKEMPTY -n $NAMESPACE"
|
|
||||||
# Execute ChangeNamespace to get unmatched Publications into current namespace
|
|
||||||
$ChangeNamespace $CNFLAGS -u ${BASEURI}pub/
|
|
||||||
# Execute ChangeNamespace to get unmatched Authorships into current namespace
|
|
||||||
$ChangeNamespace $CNFLAGS -u ${BASEURI}authorship/
|
|
||||||
# Execute ChangeNamespace to get unmatched Authors into current namespace
|
|
||||||
$ChangeNamespace $CNFLAGS -u ${BASEURI}author/
|
|
||||||
# Execute ChangeNamespace to get unmatched Organizations into current namespace
|
|
||||||
$ChangeNamespace $CNFLAGS -u ${BASEURI}org/
|
|
||||||
# Execute ChangeNamespace to get unmatched Geographic Locations into current namespace
|
|
||||||
$ChangeNamespace $CNFLAGS -u ${BASEURI}geo/
|
|
||||||
# Execute ChangeNamespace to get unmatched Journals into current namespace
|
|
||||||
$ChangeNamespace $CNFLAGS -u ${BASEURI}journal/
|
|
||||||
|
|
||||||
|
|
||||||
# Backup pretransfer vivo database, symlink latest to latest.sql
|
|
||||||
BACKPREDB="pretransfer"
|
|
||||||
backup-mysqldb $BACKPREDB
|
|
||||||
# uncomment to restore pretransfer vivo database
|
|
||||||
#restore-mysqldb $BACKPREDB
|
|
||||||
|
|
||||||
PREVHARVESTMODEL="http://vivoweb.org/ingest/mods"
|
|
||||||
ADDFILE="$BASEDIR/additions.rdf.xml"
|
|
||||||
SUBFILE="$BASEDIR/subtractions.rdf.xml"
|
|
||||||
|
|
||||||
# Find Subtractions
|
|
||||||
$Diff -m $VIVOCONFIG -MmodelName=$PREVHARVESTMODEL -McheckEmpty=$CHECKEMPTY -s $H2MODEL -ScheckEmpty=$CHECKEMPTY -SdbUrl=$MODELDBURL -SmodelName=$MODELNAME -d $SUBFILE
|
|
||||||
# Find Additions
|
|
||||||
$Diff -m $H2MODEL -McheckEmpty=$CHECKEMPTY -MdbUrl=$MODELDBURL -MmodelName=$MODELNAME -s $VIVOCONFIG -ScheckEmpty=$CHECKEMPTY -SmodelName=$PREVHARVESTMODEL -d $ADDFILE
|
|
||||||
|
|
||||||
PREVHARVESTMODELINPUT="-i $VIVOCONFIG -ImodelName=$PREVHARVESTMODEL -IcheckEmpty=$CHECKEMPTY"
|
|
||||||
|
|
||||||
|
|
||||||
# Backup adds and subs
|
|
||||||
backup-file $ADDFILE adds.rdf.xml
|
|
||||||
backup-file $SUBFILE subs.rdf.xml
|
|
||||||
|
|
||||||
# Apply Subtractions to Previous model
|
|
||||||
$Transfer -o $H2MODEL -OdbUrl=${PREVHARVDBURLBASE}${HARVESTER_TASK}/store -OcheckEmpty=$CHECKEMPTY -OmodelName=$PREVHARVESTMODEL -r $SUBFILE -m
|
|
||||||
# Apply Additions to Previous model
|
|
||||||
$Transfer -o $H2MODEL -OdbUrl=${PREVHARVDBURLBASE}${HARVESTER_TASK}/store -OcheckEmpty=$CHECKEMPTY -OmodelName=$PREVHARVESTMODEL -r $ADDFILE
|
|
||||||
# Apply Subtractions to VIVO
|
|
||||||
$Transfer -o $VIVOCONFIG -OcheckEmpty=$CHECKEMPTY -r $SUBFILE -m
|
|
||||||
# Apply Additions to VIVO
|
|
||||||
$Transfer -o $VIVOCONFIG -OcheckEmpty=$CHECKEMPTY -r $ADDFILE
|
|
||||||
|
|
||||||
|
|
||||||
#Restart Tomcat
|
|
||||||
#Tomcat must be restarted in order for the harvested data to appear in VIVO
|
|
||||||
echo $HARVESTER_TASK ' completed successfully'
|
|
||||||
/etc/init.d/tomcat stop
|
|
||||||
/etc/init.d/apache2 reload
|
|
||||||
/etc/init.d/tomcat start</#noparse></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearBothDiv" />
|
<div class="clearBothDiv" />
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
<#include "individual-setup.ftl">
|
<#include "individual-setup.ftl">
|
||||||
|
|
||||||
<#include "individual-qrCodeFoafPerson.ftl">
|
|
||||||
|
|
||||||
<section id="individual-intro" class="vcard person" role="region">
|
<section id="individual-intro" class="vcard person" role="region">
|
||||||
|
|
||||||
<section id="share-contact" role="region">
|
<section id="share-contact" role="region">
|
||||||
|
@ -34,6 +32,8 @@
|
||||||
<#if rdfUrl??>
|
<#if rdfUrl??>
|
||||||
<li role="listitem"><a title="View this individual in RDF format" class="icon-rdf" href="${rdfUrl}">RDF</a></li>
|
<li role="listitem"><a title="View this individual in RDF format" class="icon-rdf" href="${rdfUrl}">RDF</a></li>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#include "individual-qrCodeFoafPerson.ftl">
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
@ -41,16 +41,6 @@
|
||||||
|
|
||||||
<#-- Links -->
|
<#-- Links -->
|
||||||
<@p.vitroLinks propertyGroups namespaces editable "individual-urls-people" />
|
<@p.vitroLinks propertyGroups namespaces editable "individual-urls-people" />
|
||||||
|
|
||||||
<#-- QR Codes -->
|
|
||||||
<#if hasValidVCard()>
|
|
||||||
<div style="border:1px solid #cccccc">
|
|
||||||
<span style="padding-left:5px">vCard QR <a style="font-size:smaller" href="${individual.qrData.aboutQrCodesUrl}">What is this?</a></span>
|
|
||||||
<a title="Export QR codes" href="${individual.qrData.exportQrCodeUrl}">
|
|
||||||
<@qrCodeVCard qrCodeWidth="150" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</#if>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="individual-info" ${infoClass!} role="region">
|
<section id="individual-info" ${infoClass!} role="region">
|
||||||
|
|
|
@ -1,123 +1,7 @@
|
||||||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
<#-- QR code -->
|
<#include "individual-qrCodeGenerator.ftl">
|
||||||
|
|
||||||
<#macro qrCodeVCard qrCodeWidth>
|
|
||||||
|
|
||||||
<#local qrCodeUrl = getQrCodeUrlForVCard(qrCodeWidth)>
|
|
||||||
|
|
||||||
<#if qrCodeUrl != "">
|
|
||||||
<img src="${qrCodeUrl}" />
|
|
||||||
</#if>
|
|
||||||
</#macro>
|
|
||||||
|
|
||||||
<#macro qrCodeLink qrCodeWidth>
|
|
||||||
|
|
||||||
<#local qrCodeUrl = getQrCodeUrlForLink(qrCodeWidth)>
|
|
||||||
|
|
||||||
<#if qrCodeUrl != "">
|
|
||||||
<img src="${qrCodeUrl}" />
|
|
||||||
</#if>
|
|
||||||
</#macro>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#function getQrCodeUrlForVCard qrCodeWidth>
|
|
||||||
|
|
||||||
<#local qrData = individual.qrData >
|
|
||||||
|
|
||||||
<#local core = "http://vivoweb.org/ontology/core#">
|
|
||||||
<#local foaf = "http://xmlns.com/foaf/0.1/">
|
|
||||||
<#local rdfs = "http://www.w3.org/2000/01/rdf-schema#">
|
|
||||||
|
|
||||||
<#local firstName = qrData.firstName! >
|
|
||||||
<#local lastName = qrData.lastName! >
|
|
||||||
<#local org = "" >
|
|
||||||
<#local title = qrData.preferredTitle! >
|
|
||||||
<#local phoneNumber = qrData.phoneNumber! >
|
|
||||||
<#local email = qrData.email! >
|
|
||||||
<#local url = qrData.externalUrl! >
|
|
||||||
<#local photo = individual.thumbUrl! >
|
|
||||||
<#local rev = "" >
|
|
||||||
|
|
||||||
<#local qrCodeUrl = "">
|
|
||||||
<#if firstName != "" && lastName != "">
|
|
||||||
<#local vCard><#t>
|
|
||||||
BEGIN:VCARD<#lt>
|
|
||||||
VERSION:3.0<#lt>
|
|
||||||
N:${lastName};${firstName}<#lt>
|
|
||||||
FN:${firstName} ${lastName}<#lt>
|
|
||||||
<#if org != ""> ORG:${org}</#if><#lt>
|
|
||||||
<#if title != "">TITLE:${title}</#if><#lt>
|
|
||||||
<#if phoneNumber != "">TEL;TYPE=WORK,VOICE:${phoneNumber}</#if><#lt>
|
|
||||||
<#if email != "">EMAIL;TYPE=PREF,INTERNET:${email}</#if><#lt>
|
|
||||||
<#if url != "">URL:${url}</#if><#lt>
|
|
||||||
<#if photo != "">PHOTO;VALUE=URL;TYPE=JPG:${photo}</#if><#lt>
|
|
||||||
<#if rev != "">REV:${rev}</#if><#lt>
|
|
||||||
END:VCARD<#t>
|
|
||||||
</#local><#t>
|
|
||||||
|
|
||||||
<#local vCard = (removeBlankLines(vCard))?url>
|
|
||||||
|
|
||||||
<#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${vCard}&choe=UTF-8" >
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#return qrCodeUrl>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#function getQrCodeUrlForLink qrCodeWidth>
|
|
||||||
|
|
||||||
<#local qrData = individual.qrData >
|
|
||||||
|
|
||||||
<#local url = qrData.externalUrl! >
|
|
||||||
|
|
||||||
<#local qrCodeUrl = "">
|
|
||||||
<#if url != "">
|
|
||||||
<#local qrCodeContent = url?url>
|
|
||||||
<#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${qrCodeContent}&choe=UTF-8" >
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#return qrCodeUrl>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#function removeBlankLines input>
|
|
||||||
|
|
||||||
<#local test = "\n\n">
|
|
||||||
<#local replacement = "\n">
|
|
||||||
|
|
||||||
<#local output = input>
|
|
||||||
|
|
||||||
<#local maxLoop = 50>
|
|
||||||
<#list 1..maxLoop as i>
|
|
||||||
<#if output?contains(test)>
|
|
||||||
<#local output = output?replace(test, replacement)>
|
|
||||||
<#else>
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
|
|
||||||
<#return output>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function hasValidVCard>
|
|
||||||
|
|
||||||
<#local qrData = individual.qrData >
|
|
||||||
|
|
||||||
<#local firstName = qrData.firstName! >
|
|
||||||
<#local lastName = qrData.lastName! >
|
|
||||||
|
|
||||||
<#local validVCard = false>
|
|
||||||
<#if firstName != "" && lastName != "">
|
|
||||||
<#local validVCard = true>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#return validVCard>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<#if hasValidVCard()>
|
||||||
|
<li role="listitem"><a title="Export QR codes" href="${individual.qrData.exportQrCodeUrl}"><img class="middle" src="${urls.images}/individual/qr_icon.png" alt="qr icon" /></a></li>
|
||||||
|
</#if>
|
|
@ -0,0 +1,119 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#-- QR code -->
|
||||||
|
|
||||||
|
<#macro qrCodeVCard qrCodeWidth>
|
||||||
|
|
||||||
|
<#local qrCodeUrl = getQrCodeUrlForVCard(qrCodeWidth)>
|
||||||
|
|
||||||
|
<#if qrCodeUrl != "">
|
||||||
|
<img src="${qrCodeUrl}" />
|
||||||
|
</#if>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro qrCodeLink qrCodeWidth>
|
||||||
|
|
||||||
|
<#local qrCodeUrl = getQrCodeUrlForLink(qrCodeWidth)>
|
||||||
|
|
||||||
|
<#if qrCodeUrl != "">
|
||||||
|
<img src="${qrCodeUrl}" />
|
||||||
|
</#if>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<#function getQrCodeUrlForVCard qrCodeWidth>
|
||||||
|
|
||||||
|
<#local qrData = individual.qrData >
|
||||||
|
|
||||||
|
<#local core = "http://vivoweb.org/ontology/core#">
|
||||||
|
<#local foaf = "http://xmlns.com/foaf/0.1/">
|
||||||
|
<#local rdfs = "http://www.w3.org/2000/01/rdf-schema#">
|
||||||
|
|
||||||
|
<#local firstName = qrData.firstName! >
|
||||||
|
<#local lastName = qrData.lastName! >
|
||||||
|
<#local org = "" >
|
||||||
|
<#local title = qrData.preferredTitle! >
|
||||||
|
<#local phoneNumber = qrData.phoneNumber! >
|
||||||
|
<#local email = qrData.email! >
|
||||||
|
<#local url = qrData.externalUrl! >
|
||||||
|
<#local photo = individual.thumbUrl! >
|
||||||
|
<#local rev = "" >
|
||||||
|
|
||||||
|
<#local qrCodeUrl = "">
|
||||||
|
<#if firstName != "" && lastName != "">
|
||||||
|
<#local vCard><#t>
|
||||||
|
BEGIN:VCARD<#lt>
|
||||||
|
VERSION:3.0<#lt>
|
||||||
|
N:${lastName};${firstName}<#lt>
|
||||||
|
FN:${firstName} ${lastName}<#lt>
|
||||||
|
<#if org != ""> ORG:${org}</#if><#lt>
|
||||||
|
<#if title != "">TITLE:${title}</#if><#lt>
|
||||||
|
<#if phoneNumber != "">TEL;TYPE=WORK,VOICE:${phoneNumber}</#if><#lt>
|
||||||
|
<#if email != "">EMAIL;TYPE=PREF,INTERNET:${email}</#if><#lt>
|
||||||
|
<#if url != "">URL:${url}</#if><#lt>
|
||||||
|
<#if photo != "">PHOTO;VALUE=URL;TYPE=JPG:${photo}</#if><#lt>
|
||||||
|
<#if rev != "">REV:${rev}</#if><#lt>
|
||||||
|
END:VCARD<#t>
|
||||||
|
</#local><#t>
|
||||||
|
|
||||||
|
<#local vCard = (removeBlankLines(vCard))?url>
|
||||||
|
|
||||||
|
<#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${vCard}&choe=UTF-8" >
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#return qrCodeUrl>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<#function getQrCodeUrlForLink qrCodeWidth>
|
||||||
|
|
||||||
|
<#local qrData = individual.qrData >
|
||||||
|
|
||||||
|
<#local url = qrData.externalUrl! >
|
||||||
|
|
||||||
|
<#local qrCodeUrl = "">
|
||||||
|
<#if url != "">
|
||||||
|
<#local qrCodeContent = url?url>
|
||||||
|
<#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${qrCodeContent}&choe=UTF-8" >
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#return qrCodeUrl>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<#function removeBlankLines input>
|
||||||
|
|
||||||
|
<#local test = "\n\n">
|
||||||
|
<#local replacement = "\n">
|
||||||
|
|
||||||
|
<#local output = input>
|
||||||
|
|
||||||
|
<#local maxLoop = 50>
|
||||||
|
<#list 1..maxLoop as i>
|
||||||
|
<#if output?contains(test)>
|
||||||
|
<#local output = output?replace(test, replacement)>
|
||||||
|
<#else>
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
|
||||||
|
<#return output>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#function hasValidVCard>
|
||||||
|
|
||||||
|
<#local qrData = individual.qrData >
|
||||||
|
|
||||||
|
<#local firstName = qrData.firstName! >
|
||||||
|
<#local lastName = qrData.lastName! >
|
||||||
|
|
||||||
|
<#local validVCard = false>
|
||||||
|
<#if firstName != "" && lastName != "">
|
||||||
|
<#local validVCard = true>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#return validVCard>
|
||||||
|
</#function>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#assign standardVisualizationURLRoot ="/visualization">
|
||||||
|
<#assign ajaxVisualizationURLRoot ="/visualizationAjax">
|
||||||
|
<#assign dataVisualizationURLRoot ="/visualizationData">
|
||||||
|
<#assign shortVisualizationURLRoot ="/vis">
|
||||||
|
|
||||||
|
<#assign organizationURI ="${organizationURI?url}">
|
||||||
|
<#assign organizationVivoProfileURL = "${urls.base}/individual?uri=${organizationURI}">
|
||||||
|
|
||||||
|
<#assign subOrganizationVivoProfileURL = "${urls.base}/individual?">
|
||||||
|
|
||||||
|
<#assign subOrganizationMapOfScienceCommonURL = "${urls.base}${shortVisualizationURLRoot}/map-of-science/">
|
||||||
|
|
||||||
|
|
||||||
|
<#if organizationLocalName?has_content >
|
||||||
|
|
||||||
|
<#assign organizationMapOfScienceURL = "${urls.base}${shortVisualizationURLRoot}/map-of-science/${organizationLocalName}">
|
||||||
|
|
||||||
|
<#else>
|
||||||
|
|
||||||
|
<#assign organizationMapOfScienceURL = '${urls.base}${shortVisualizationURLRoot}/map-of-science/?uri=${organizationURI}'>
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign organizationMapOfScienceDataURL = "${urls.base}${dataVisualizationURLRoot}?vis=map-of-science&uri=${organizationURI}&vis_mode=json">
|
|
@ -0,0 +1,38 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#-- The Order of each element in this file is very important. Do not make any changes to it unless making
|
||||||
|
corresponding changes in the included Templates. -->
|
||||||
|
|
||||||
|
|
||||||
|
<#include "scienceMapSetup.ftl">
|
||||||
|
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
var scienceMapDataURL = "${organizationMapOfScienceDataURL}";
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: scienceMapDataURL
|
||||||
|
dataType: "json",
|
||||||
|
timeout: 5 * 60 * 1000,
|
||||||
|
success: function (data) {
|
||||||
|
|
||||||
|
if (data.error) {
|
||||||
|
|
||||||
|
alert("error");
|
||||||
|
alert(data);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
alert("success");
|
||||||
|
alert(data);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
|
@ -1,21 +1,24 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.harvester;
|
package edu.cornell.mannlib.vitro.webapp.controller.harvester;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Hashtable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.fileupload.FileItem;
|
import org.apache.commons.fileupload.FileItem;
|
||||||
|
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
@ -39,6 +42,7 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
|
|
||||||
private static final String PARAMETER_FIRST_UPLOAD = "firstUpload";
|
private static final String PARAMETER_FIRST_UPLOAD = "firstUpload";
|
||||||
private static final String PARAMETER_UPLOADED_FILE = "uploadedFile";
|
private static final String PARAMETER_UPLOADED_FILE = "uploadedFile";
|
||||||
|
private static final String PARAMETER_IS_HARVEST_CLICK = "isHarvestClick";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ResponseValues processRequest(VitroRequest vreq) {
|
protected ResponseValues processRequest(VitroRequest vreq) {
|
||||||
|
@ -47,6 +51,7 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
//body.put("uploadPostback", "false");
|
//body.put("uploadPostback", "false");
|
||||||
body.put("paramFirstUpload", PARAMETER_FIRST_UPLOAD);
|
body.put("paramFirstUpload", PARAMETER_FIRST_UPLOAD);
|
||||||
body.put("paramUploadedFile", PARAMETER_UPLOADED_FILE);
|
body.put("paramUploadedFile", PARAMETER_UPLOADED_FILE);
|
||||||
|
body.put("paramIsHarvestClick", PARAMETER_IS_HARVEST_CLICK);
|
||||||
return new TemplateResponseValues(TEMPLATE_DEFAULT, body);
|
return new TemplateResponseValues(TEMPLATE_DEFAULT, body);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
log.error(e, e);
|
log.error(e, e);
|
||||||
|
@ -65,7 +70,8 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
*/
|
*/
|
||||||
public static String getHarvesterPath()
|
public static String getHarvesterPath()
|
||||||
{
|
{
|
||||||
String harvesterPath = "/usr/share/vivo/harvester/"; //todo: hack
|
//String harvesterPath = "/usr/share/vivo/harvester/"; //todo: hack
|
||||||
|
String harvesterPath = "/home/mbarbieri/workspace/HarvesterDevTomcat2/";
|
||||||
return harvesterPath;
|
return harvesterPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +81,7 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
* @return the base directory for file harvest uploads
|
* @return the base directory for file harvest uploads
|
||||||
* @throws Exception if the Vitro home directory could not be found
|
* @throws Exception if the Vitro home directory could not be found
|
||||||
*/
|
*/
|
||||||
private String getUploadPathBase(ServletContext context) throws Exception
|
private static String getUploadPathBase(ServletContext context) throws Exception
|
||||||
{
|
{
|
||||||
String vitroHomeDirectoryName = ConfigurationProperties.getBean(context).getProperty(FileStorageSetup.PROPERTY_VITRO_HOME_DIR);
|
String vitroHomeDirectoryName = ConfigurationProperties.getBean(context).getProperty(FileStorageSetup.PROPERTY_VITRO_HOME_DIR);
|
||||||
if (vitroHomeDirectoryName == null) {
|
if (vitroHomeDirectoryName == null) {
|
||||||
|
@ -89,35 +95,66 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
/**
|
/**
|
||||||
* Gets the FileHarvestJob implementation that is needed to handle the specified request. This
|
* Gets the FileHarvestJob implementation that is needed to handle the specified request. This
|
||||||
* will depend on the type of harvest being performed (CSV, RefWorks, etc.)
|
* will depend on the type of harvest being performed (CSV, RefWorks, etc.)
|
||||||
* @param request the request from the browser
|
* @param vreq the request from the browser
|
||||||
* @return the FileHarvestJob that will provide harvest-type-specific services for this request
|
* @return the FileHarvestJob that will provide harvest-type-specific services for this request
|
||||||
*/
|
*/
|
||||||
private FileHarvestJob getJob(HttpServletRequest request)
|
private FileHarvestJob getJob(VitroRequest vreq)
|
||||||
{
|
{
|
||||||
|
String namespace = vreq.getWebappDaoFactory().getDefaultNamespace();
|
||||||
|
|
||||||
//todo: complete
|
//todo: complete
|
||||||
return new CsvHarvestJob("persontemplate.csv");
|
return new CsvHarvestJob(vreq, "granttemplate.csv", namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getUploadPath(VitroRequest vreq) {
|
||||||
|
try {
|
||||||
|
String path = getUploadPathBase(vreq.getSession().getServletContext()) + getSessionId(vreq) + "/";
|
||||||
|
return path;
|
||||||
|
} catch(Exception e) {
|
||||||
|
log.error(e, e);
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||||
throws IOException, ServletException {
|
throws IOException, ServletException {
|
||||||
|
|
||||||
|
log.error("this is a post.");
|
||||||
|
|
||||||
|
try {
|
||||||
|
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
|
||||||
|
if(isMultipart)
|
||||||
|
doFileUploadPost(request, response);
|
||||||
|
else if(request.getParameter(PARAMETER_IS_HARVEST_CLICK).toLowerCase().equals("true"))
|
||||||
|
doHarvestPost(request, response);
|
||||||
|
else
|
||||||
|
doCheckHarvestStatusPost(request, response);
|
||||||
|
} catch(Exception e) {
|
||||||
|
log.error(e, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doFileUploadPost(HttpServletRequest request, HttpServletResponse response)
|
||||||
|
throws IOException, ServletException {
|
||||||
|
|
||||||
|
log.error("file upload post.");
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
try {
|
try {
|
||||||
|
VitroRequest vreq = new VitroRequest(request);
|
||||||
String path = getUploadPathBase(request.getSession().getServletContext()) + getSessionId(request) + "/";
|
|
||||||
File directory = new File(path);
|
|
||||||
|
|
||||||
|
|
||||||
int maxFileSize = 1024 * 1024;
|
int maxFileSize = 1024 * 1024;
|
||||||
FileUploadServletRequest req = FileUploadServletRequest.parseRequest(request, maxFileSize);
|
FileUploadServletRequest req = FileUploadServletRequest.parseRequest(vreq, maxFileSize);
|
||||||
if(req.hasFileUploadException()) {
|
if(req.hasFileUploadException()) {
|
||||||
Exception e = req.getFileUploadException();
|
Exception e = req.getFileUploadException();
|
||||||
new ExceptionVisibleToUser(e);
|
new ExceptionVisibleToUser(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String path = getUploadPath(vreq);
|
||||||
|
File directory = new File(path);
|
||||||
|
|
||||||
String firstUpload = req.getParameter(PARAMETER_FIRST_UPLOAD); //clear directory on first upload
|
String firstUpload = req.getParameter(PARAMETER_FIRST_UPLOAD); //clear directory on first upload
|
||||||
|
log.error(firstUpload);
|
||||||
if(firstUpload.toLowerCase().equals("true")) {
|
if(firstUpload.toLowerCase().equals("true")) {
|
||||||
if(directory.exists()) {
|
if(directory.exists()) {
|
||||||
File[] children = directory.listFiles();
|
File[] children = directory.listFiles();
|
||||||
|
@ -130,7 +167,7 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
if(!directory.exists())
|
if(!directory.exists())
|
||||||
directory.mkdirs();
|
directory.mkdirs();
|
||||||
|
|
||||||
FileHarvestJob job = getJob(req);
|
FileHarvestJob job = getJob(vreq);
|
||||||
|
|
||||||
Map<String, List<FileItem>> fileStreams = req.getFiles();
|
Map<String, List<FileItem>> fileStreams = req.getFiles();
|
||||||
if(fileStreams.get(PARAMETER_UPLOADED_FILE) != null && fileStreams.get(PARAMETER_UPLOADED_FILE).size() > 0) {
|
if(fileStreams.get(PARAMETER_UPLOADED_FILE) != null && fileStreams.get(PARAMETER_UPLOADED_FILE).size() > 0) {
|
||||||
|
@ -140,7 +177,7 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
File file = new File(path + name);
|
File file = new File(path + name);
|
||||||
try {
|
try {
|
||||||
csvStream.write(file);
|
csvStream.write(file);
|
||||||
} finally {
|
} finally {
|
||||||
csvStream.delete();
|
csvStream.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,6 +231,96 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
response.getWriter().write(json.toString());
|
response.getWriter().write(json.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void doHarvestPost(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
|
||||||
|
log.error("harvest post.");
|
||||||
|
try {
|
||||||
|
VitroRequest vreq = new VitroRequest(request);
|
||||||
|
FileHarvestJob job = getJob(vreq);
|
||||||
|
|
||||||
|
//String path = getUploadPath(vreq);
|
||||||
|
|
||||||
|
String script = job.getScript();
|
||||||
|
log.error("start harvest");
|
||||||
|
runScript(getSessionId(request), script);
|
||||||
|
log.error("end harvest");
|
||||||
|
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("progressSinceLastCheck", "");
|
||||||
|
json.put("finished", false);
|
||||||
|
|
||||||
|
response.getWriter().write(json.toString());
|
||||||
|
|
||||||
|
} catch(Exception e) {
|
||||||
|
log.error(e, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doCheckHarvestStatusPost(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
|
||||||
|
log.error("check harvest status post.");
|
||||||
|
|
||||||
|
try {
|
||||||
|
String newline = "\n";
|
||||||
|
|
||||||
|
String sessionId = getSessionId(request);
|
||||||
|
|
||||||
|
ArrayList<String> unsentLogLinesList = sessionIdToUnsentLogLines.get(sessionId);
|
||||||
|
String[] unsentLogLines;
|
||||||
|
if(unsentLogLinesList != null) {
|
||||||
|
synchronized (unsentLogLinesList) {
|
||||||
|
unsentLogLines = unsentLogLinesList.toArray(new String[unsentLogLinesList.size()]);
|
||||||
|
unsentLogLinesList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
String progressSinceLastCheck = "";
|
||||||
|
for(int i = 0; i < unsentLogLines.length; i++) {
|
||||||
|
progressSinceLastCheck += unsentLogLines[i] + newline;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean finished = !sessionIdToHarvestThread.containsKey(sessionId);
|
||||||
|
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("progressSinceLastCheck", progressSinceLastCheck);
|
||||||
|
json.put("finished", finished);
|
||||||
|
|
||||||
|
response.getWriter().write(json.toString());
|
||||||
|
}
|
||||||
|
} catch(Exception e) {
|
||||||
|
log.error(e, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private File createScriptFile(String script) throws IOException {
|
||||||
|
File scriptDirectory = new File(getHarvesterPath() + "scripts/temp");
|
||||||
|
if(!scriptDirectory.exists()) {
|
||||||
|
scriptDirectory.mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
File tempFile = File.createTempFile("harv", ".sh", scriptDirectory);
|
||||||
|
|
||||||
|
FileWriter writer = new FileWriter(tempFile);
|
||||||
|
writer.write(script);
|
||||||
|
writer.close();
|
||||||
|
|
||||||
|
return tempFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void runScript(String sessionId, String script) {
|
||||||
|
|
||||||
|
if(!sessionIdToHarvestThread.containsKey(sessionId)) {
|
||||||
|
|
||||||
|
ScriptRunner runner = new ScriptRunner(sessionId, script);
|
||||||
|
sessionIdToHarvestThread.put(sessionId, runner);
|
||||||
|
runner.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles a name conflict in a directory by providing a new name that does not conflict with the
|
* Handles a name conflict in a directory by providing a new name that does not conflict with the
|
||||||
|
@ -228,7 +355,7 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
* @param request the request coming in from the browser
|
* @param request the request coming in from the browser
|
||||||
* @return the session ID
|
* @return the session ID
|
||||||
*/
|
*/
|
||||||
private String getSessionId(HttpServletRequest request) {
|
private static String getSessionId(HttpServletRequest request) {
|
||||||
return request.getSession().getId();
|
return request.getSession().getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,25 +364,10 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private void doHarvest() {
|
|
||||||
/*
|
|
||||||
Harvest will entail:
|
|
||||||
|
|
||||||
D2RMapFetch
|
|
||||||
Transfer to local temp model
|
|
||||||
Diffs
|
|
||||||
Transfers
|
|
||||||
|
|
||||||
If this is being done with a script, then we should probably use a templating system.
|
|
||||||
run-csv.sh
|
|
||||||
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -265,7 +377,7 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a way of throwing an exception whose message it is OK to display unedited to the user.
|
* Provides a way of throwing an exception whose message it is OK to display unedited to the user.
|
||||||
*/
|
*/
|
||||||
private class ExceptionVisibleToUser extends Exception {
|
private class ExceptionVisibleToUser extends Exception {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -273,11 +385,83 @@ public class TestFileController extends FreemarkerHttpServlet {
|
||||||
super(cause);
|
super(cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Map<String, ScriptRunner> sessionIdToHarvestThread = new Hashtable<String, ScriptRunner>(); //Hashtable is threadsafe, HashMap is not
|
||||||
|
private Map<String, ArrayList<String>> sessionIdToUnsentLogLines = new Hashtable<String, ArrayList<String>>(); //Hashtable is threadsafe, HashMap is not
|
||||||
|
private class ScriptRunner extends Thread {
|
||||||
|
|
||||||
|
private final String sessionId;
|
||||||
|
private final String script;
|
||||||
|
|
||||||
|
public ScriptRunner(String sessionId, String script) {
|
||||||
|
this.sessionId = sessionId;
|
||||||
|
this.script = script;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
ArrayList<String> unsentLogLines = sessionIdToUnsentLogLines.get(sessionId);
|
||||||
|
if(unsentLogLines == null) {
|
||||||
|
unsentLogLines = new ArrayList<String>();
|
||||||
|
sessionIdToUnsentLogLines.put(sessionId, unsentLogLines);
|
||||||
|
}
|
||||||
|
|
||||||
|
File scriptFile = createScriptFile(script);
|
||||||
|
|
||||||
|
String command = "/bin/bash " + getHarvesterPath() + "scripts/temp/" + scriptFile.getName();
|
||||||
|
|
||||||
|
log.info("Running command: " + command);
|
||||||
|
Process pr = Runtime.getRuntime().exec(command);
|
||||||
|
|
||||||
|
//try { Thread.sleep(15000); } catch(InterruptedException e) {log.error(e, e);}
|
||||||
|
|
||||||
|
BufferedReader processOutputReader = new BufferedReader(new InputStreamReader(pr.getInputStream()));
|
||||||
|
for(String line = processOutputReader.readLine(); line != null; line = processOutputReader.readLine()) {
|
||||||
|
synchronized(unsentLogLines) {
|
||||||
|
unsentLogLines.add(line);
|
||||||
|
}
|
||||||
|
log.info("Harvester output: " + line);
|
||||||
|
}
|
||||||
|
|
||||||
|
BufferedReader processErrorReader = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
|
||||||
|
for(String line = processErrorReader.readLine(); line != null; line = processErrorReader.readLine()) {
|
||||||
|
log.info("Harvester error: " + line);
|
||||||
|
}
|
||||||
|
|
||||||
|
int exitVal;
|
||||||
|
|
||||||
|
try {
|
||||||
|
exitVal = pr.waitFor();
|
||||||
|
}
|
||||||
|
catch(InterruptedException e) {
|
||||||
|
throw new IOException(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
log.debug("Harvester script exited with error code " + exitVal);
|
||||||
|
log.info("Harvester script execution complete");
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error(e, e);
|
||||||
|
} finally {
|
||||||
|
if(sessionIdToHarvestThread.containsKey(sessionId)) {
|
||||||
|
sessionIdToHarvestThread.remove(sessionId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of FileHarvestJob that can be used for any CSV file harvest.
|
* An implementation of FileHarvestJob that can be used for any CSV file harvest.
|
||||||
*/
|
*/
|
||||||
class CsvHarvestJob implements FileHarvestJob {
|
class CsvHarvestJob implements FileHarvestJob {
|
||||||
|
|
||||||
|
@ -285,18 +469,30 @@ class CsvHarvestJob implements FileHarvestJob {
|
||||||
* Logger.
|
* Logger.
|
||||||
*/
|
*/
|
||||||
private static final Log log = LogFactory.getLog(CsvHarvestJob.class);
|
private static final Log log = LogFactory.getLog(CsvHarvestJob.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The HTTP request.
|
||||||
|
*/
|
||||||
|
private VitroRequest vreq;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The template file against which uploaded CSV files will be validated.
|
* The template file against which uploaded CSV files will be validated.
|
||||||
*/
|
*/
|
||||||
private File templateFile;
|
private File templateFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The namespace to be used for the harvest.
|
||||||
|
*/
|
||||||
|
private final String namespace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* @param templateFileName just the name of the template file. The directory is assumed to be standard.
|
* @param templateFileName just the name of the template file. The directory is assumed to be standard.
|
||||||
*/
|
*/
|
||||||
public CsvHarvestJob(String templateFileName) {
|
public CsvHarvestJob(VitroRequest vreq, String templateFileName, String namespace) {
|
||||||
templateFile = new File(getTemplateFileDirectory() + templateFileName);
|
this.vreq = vreq;
|
||||||
|
this.templateFile = new File(getTemplateFileDirectory() + templateFileName);
|
||||||
|
this.namespace = namespace;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -315,17 +511,17 @@ class CsvHarvestJob implements FileHarvestJob {
|
||||||
public String validateUpload(File file) {
|
public String validateUpload(File file) {
|
||||||
try {
|
try {
|
||||||
SimpleReader reader = new SimpleReader();
|
SimpleReader reader = new SimpleReader();
|
||||||
|
|
||||||
List templateCsv = reader.parse(this.templateFile);
|
List templateCsv = reader.parse(this.templateFile);
|
||||||
String[] templateFirstLine = (String[])templateCsv.get(0);
|
String[] templateFirstLine = (String[])templateCsv.get(0);
|
||||||
|
|
||||||
List csv = reader.parse(file);
|
List csv = reader.parse(file);
|
||||||
|
|
||||||
int length = csv.size();
|
int length = csv.size();
|
||||||
|
|
||||||
if(length == 0)
|
if(length == 0)
|
||||||
return "No data in file";
|
return "No data in file";
|
||||||
|
|
||||||
for(int i = 0; i < length; i++) {
|
for(int i = 0; i < length; i++) {
|
||||||
String[] line = (String[])csv.get(i);
|
String[] line = (String[])csv.get(i);
|
||||||
if(i == 0) {
|
if(i == 0) {
|
||||||
|
@ -334,8 +530,14 @@ class CsvHarvestJob implements FileHarvestJob {
|
||||||
return errorMessage;
|
return errorMessage;
|
||||||
}
|
}
|
||||||
else if(line.length != 0) {
|
else if(line.length != 0) {
|
||||||
if(line.length != templateFirstLine.length)
|
if(line.length != templateFirstLine.length) {
|
||||||
return "Mismatch in number of entries in row " + i;
|
String retval = "Mismatch in number of entries in row " + i + ": expected , " + templateFirstLine.length + ", found " + line.length + " ";
|
||||||
|
for(int j = 0; j < line.length; j++) {
|
||||||
|
retval += "\"" + line[j] + "\", ";
|
||||||
|
}
|
||||||
|
//return retval;
|
||||||
|
return "Mismatch in number of entries in row " + i + ": expected , " + templateFirstLine.length + ", found " + line.length;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,9 +571,9 @@ class CsvHarvestJob implements FileHarvestJob {
|
||||||
@Override
|
@Override
|
||||||
public String getScript()
|
public String getScript()
|
||||||
{
|
{
|
||||||
String path = ""; //todo: complete
|
String path = TestFileController.getHarvesterPath() + "scripts/" + "testCSVtoRDFgrant.sh"; //todo: complete
|
||||||
File scriptTemplate = new File(path);
|
File scriptTemplate = new File(path);
|
||||||
|
|
||||||
String scriptTemplateContents = readScriptTemplate(scriptTemplate);
|
String scriptTemplateContents = readScriptTemplate(scriptTemplate);
|
||||||
String replacements = performScriptTemplateReplacements(scriptTemplateContents);
|
String replacements = performScriptTemplateReplacements(scriptTemplateContents);
|
||||||
return replacements;
|
return replacements;
|
||||||
|
@ -380,9 +582,14 @@ class CsvHarvestJob implements FileHarvestJob {
|
||||||
|
|
||||||
private String performScriptTemplateReplacements(String scriptTemplateContents) {
|
private String performScriptTemplateReplacements(String scriptTemplateContents) {
|
||||||
String replacements = scriptTemplateContents;
|
String replacements = scriptTemplateContents;
|
||||||
|
|
||||||
|
String fileDirectory = TestFileController.getUploadPath(vreq);
|
||||||
|
|
||||||
|
replacements = replacements.replace("${UPLOADS_FOLDER}", fileDirectory);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* What needs to be replaced?
|
* What needs to be replaced?
|
||||||
*
|
*
|
||||||
* task directory name
|
* task directory name
|
||||||
*/
|
*/
|
||||||
//todo: complete
|
//todo: complete
|
||||||
|
@ -409,147 +616,17 @@ class CsvHarvestJob implements FileHarvestJob {
|
||||||
log.error(e, e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return scriptTemplateContents;
|
return scriptTemplateContents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void performHarvest(File directory) {
|
public void performHarvest(File directory) {
|
||||||
|
|
||||||
/* //COMMENTED OUT UNTIL HARVESTER INTEGRATION IS WORKING
|
|
||||||
String vivoconfig = "config/models/vivo.xml";
|
|
||||||
String scorebatchsize = "100";
|
|
||||||
String checkempty = "true";
|
|
||||||
String namespace = ""; //todo: get namespace
|
|
||||||
String h2model = "config/models/h2-sdb.xml";
|
|
||||||
String prevharvdburlbase = "jdbc:h2:harvested-data/prevHarvs/";
|
|
||||||
String tfrh = "config/recordhandlers/h2-jdbc.xml";
|
|
||||||
|
|
||||||
String harvesterTask = "csv";
|
|
||||||
|
|
||||||
String basedir = "harvested-data/" + harvesterTask;
|
|
||||||
|
|
||||||
String rawrhdir = basedir + "/rh-raw";
|
|
||||||
String rdfrhdir = basedir + "/rh-rdf";
|
|
||||||
String modeldir = basedir + "/model";
|
|
||||||
String scoredatadir = basedir + "/score-data";
|
|
||||||
|
|
||||||
String modeldburl = "jdbc:h2:" + modeldir + "/store";
|
|
||||||
String scoredatadburl = "jdbc:h2:" + scoredatadir + "/store";
|
|
||||||
|
|
||||||
String modelname = "csvTempTransfer";
|
|
||||||
String scoredataname = "csvScoreData";
|
|
||||||
|
|
||||||
String tempcopydir = basedir + "/temp-copy";
|
|
||||||
|
|
||||||
String[] scoreinput = Harvester.stringsToArray("-i", h2model, "-ImodelName=" + modelname, "-IdbUrl=" + modeldburl, "-IcheckEmpty=" + checkempty);
|
|
||||||
String[] scoredata = Harvester.stringsToArray("-s", h2model, "-SmodelName=" + scoredataname, "-SdbUrl=" + scoredatadburl, "-ScheckEmpty=" + checkempty);
|
|
||||||
String[] scoremodels = Harvester.stringsToArray(scoreinput, "-v", vivoconfig, "-VcheckEmpty=" + checkempty, scoredata, "-t", tempcopydir, "-b", scorebatchsize);
|
|
||||||
|
|
||||||
String[] cnflags = Harvester.stringsToArray(scoreinput, "-v", vivoconfig, "-n", namespace);
|
|
||||||
|
|
||||||
String eqtest = "org.vivoweb.harvester.score.algorithm.EqualityTest";
|
|
||||||
|
|
||||||
String grantidnum = "http://vivoweb.org/ontology/score#grantID";
|
|
||||||
String rdfslabel = "http://www.w3.org/2000/01/rdf-schema#label";
|
|
||||||
String personidnum = "http://vivoweb.org/ontology/score#personID";
|
|
||||||
String deptidnum = "http://vivoweb.org/ontology/score#deptID";
|
|
||||||
String rolein = "http://vivoweb.org/ontology/core#roleIn";
|
|
||||||
String piroleof = "http://vivoweb.org/ontology/core#principalInvestigatorRoleOf";
|
|
||||||
String copiroleof = "http://vivoweb.org/ontology/core#co-PrincipalInvestigatorRoleOf";
|
|
||||||
String datetime = "http://vivoweb.org/ontology/core#dateTime";
|
|
||||||
String baseuri = "http://vivoweb.org/harvest/csvfile/";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//execute fetch
|
|
||||||
Harvester.runCSVtoRDF("-o", tfrh, "-O", "fileDir=" + rawrhdir, "-i", "filepath");
|
|
||||||
|
|
||||||
//execute translate
|
|
||||||
Harvester.runXSLTranslator("-i", tfrh, "-IfileDir=" + rawrhdir, "-o", tfrh, "-OfileDir=" + rdfrhdir, "-x", "config/datamaps/csv-grant-to-vivo.xsl");
|
|
||||||
|
|
||||||
//execute transfer to import from record handler into local temp model
|
|
||||||
Harvester.runTransfer("-o", h2model, "-OmodelName=" + modelname, "-OdbUrl=" + modeldburl, "-h", tfrh, "-HfileDir=" + rdfrhdir, "-n", namespace);
|
|
||||||
|
|
||||||
//smushes in-place(-r) on the Grant id THEN on the person ID then deptID
|
|
||||||
Harvester.runSmush(scoreinput, "-P", grantidnum, "-P", personidnum, "-P", deptidnum, "-P", datetime, "-n", baseuri, "-r");
|
|
||||||
|
|
||||||
//scoring of Grants on GrantNumber
|
|
||||||
Harvester.runScore(scoremodels, "-AGrantNumber=" + eqtest, "-WGrantNumber=1.0", "-FGrantNumber=" + grantidnum, "-PGrantNumber=" + grantidnum, "-n", baseuri + "grant/");
|
|
||||||
|
|
||||||
//scoring of people on PERSONIDNUM
|
|
||||||
Harvester.runScore(scoremodels, "-Aufid=" + eqtest, "-Wufid=1.0", "-Fufid=" + personidnum, "-Pufid=" + personidnum, "-n", baseuri + "person/");
|
|
||||||
|
|
||||||
Harvester.runSmush(scoreinput, "-P", deptidnum, "-n", baseuri + "org/", "-r");
|
|
||||||
|
|
||||||
//scoring of orgs on DeptID
|
|
||||||
Harvester.runScore(scoremodels, "-AdeptID=" + eqtest, "-WdeptID=1.0", "-FdeptID=" + deptidnum, "-PdeptID=" + deptidnum, "-n", baseuri + "org/");
|
|
||||||
|
|
||||||
|
|
||||||
Harvester.runSmush(scoreinput, "-P", rdfslabel, "-n", baseuri + "sponsor/", "-r");
|
|
||||||
|
|
||||||
//scoring sponsors by labels
|
|
||||||
Harvester.runScore(scoremodels, "-Alabel=" + eqtest, "-Wlabel=1.0", "-Flabel=" + rdfslabel, "-Plabel=" + rdfslabel, "-n", baseuri + "sponsor/");
|
|
||||||
|
|
||||||
//scoring of PI Roles
|
|
||||||
String[] piuri = Harvester.stringsToArray("-Aperson=" + eqtest, "-Wperson=0.5", "-Fperson=" + piroleof, "-Pperson=" + piroleof);
|
|
||||||
String[] granturi = Harvester.stringsToArray("-Agrant=" + eqtest, "-Wgrant=0.5", "-Fgrant=" + rolein, "-Pgrant=" + rolein);
|
|
||||||
Harvester.runScore(scoremodels, piuri, granturi, "-n", baseuri + "piRole/");
|
|
||||||
|
|
||||||
//scoring of coPI Roles
|
|
||||||
String[] copiuri = Harvester.stringsToArray("-Aperson=" + eqtest, "-Wperson=0.5", "-Fperson=" + copiroleof, "-Pperson=" + copiroleof);
|
|
||||||
Harvester.runScore(scoremodels, copiuri, granturi, "-n", baseuri + "coPiRole/");
|
|
||||||
|
|
||||||
//find matches using scores and rename nodes to matching uri
|
|
||||||
Harvester.runMatch(scoreinput, scoredata, "-b", scorebatchsize, "-t", "1.0", "-r");
|
|
||||||
|
|
||||||
//execute ChangeNamespace to get grants into current namespace
|
|
||||||
Harvester.runChangeNamespace(cnflags, "-u", baseuri + "grant/");
|
|
||||||
|
|
||||||
//execute ChangeNamespace to get orgs into current namespace
|
|
||||||
Harvester.runChangeNamespace(cnflags, "-u", baseuri + "org/");
|
|
||||||
|
|
||||||
//execute ChangeNamespace to get sponsors into current namespace
|
|
||||||
Harvester.runChangeNamespace(cnflags, "-u", baseuri + "sponsor/");
|
|
||||||
|
|
||||||
//execute ChangeNamespace to get people into current namespace
|
|
||||||
Harvester.runChangeNamespace(cnflags, "-u", baseuri + "person/");
|
|
||||||
|
|
||||||
//execute ChangeNamespace to get PI roles into current namespace
|
|
||||||
Harvester.runChangeNamespace(cnflags, "-u", baseuri + "piRole/");
|
|
||||||
|
|
||||||
//execute ChangeNamespace to get co-PI roles into current namespace
|
|
||||||
Harvester.runChangeNamespace(cnflags, "-u", baseuri + "coPiRole/");
|
|
||||||
|
|
||||||
//execute ChangeNamespace to get co-PI roles into current namespace
|
|
||||||
Harvester.runChangeNamespace(cnflags, "-u", baseuri + "timeInterval");
|
|
||||||
|
|
||||||
|
|
||||||
//todo: we probably don't want to do prev harvest stuff for this
|
|
||||||
String prevharvestmodel = "http://vivoweb.org/ingest/dsr";
|
|
||||||
String addfile = basedir + "/additions.rdf.xml";
|
|
||||||
String subfile = basedir + "/subtractions.rdf.xml";
|
|
||||||
|
|
||||||
//find Subtractions
|
|
||||||
Harvester.runDiff("-m", h2model, "-MdbUrl=" + prevharvdburlbase + harvesterTask + "/store", "-McheckEmpty=" + checkempty, "-MmodelName=" + prevharvestmodel, "-s", h2model, "-ScheckEmpty=" + checkempty, "-SdbUrl=" + modeldburl, "-SmodelName=" + modelname, "-d", subfile);
|
|
||||||
|
|
||||||
//find Additions
|
|
||||||
Harvester.runDiff("-m", h2model, "-McheckEmpty=" + checkempty, "-MdbUrl=" + modeldburl, "-MmodelName=" + modelname, "-s", h2model, "-ScheckEmpty=" + checkempty, "-SdbUrl=" + prevharvdburlbase + harvesterTask + "/store", "-SmodelName=" + prevharvestmodel, "-d", addfile);
|
|
||||||
|
|
||||||
//apply Subtractions to Previous model
|
|
||||||
Harvester.runTransfer("-o", h2model, "-OdbUrl=" + prevharvdburlbase + harvesterTask + "/store", "-OcheckEmpty=" + checkempty, "-OmodelName=" + prevharvestmodel, "-r", subfile, "-m");
|
|
||||||
|
|
||||||
//apply Additions to Previous model
|
|
||||||
Harvester.runTransfer("-o", h2model, "-OdbUrl=" + prevharvdburlbase + harvesterTask + "/store", "-OcheckEmpty=" + checkempty, "-OmodelName=" + prevharvestmodel, "-r", addfile);
|
|
||||||
|
|
||||||
//apply Subtractions to VIVO
|
|
||||||
Harvester.runTransfer("-o", vivoconfig, "-OcheckEmpty=" + checkempty, "-r", subfile, "-m");
|
|
||||||
|
|
||||||
//apply Additions to VIVO
|
|
||||||
Harvester.runTransfer("-o", vivoconfig, "-OcheckEmpty=" + checkempty, "-r", addfile);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker;
|
package edu.cornell.mannlib.vitro.webapp.controller.visualization;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServ
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.TemplateProcessingException;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.TemplateProcessingException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
import freemarker.template.Configuration;
|
import freemarker.template.Configuration;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker;
|
package edu.cornell.mannlib.vitro.webapp.controller.visualization;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -20,8 +20,8 @@ import edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Services a visualization request. This will return a simple error message and a 501 if
|
* Services a visualization request. This will return a simple error message and a 501 if
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker;
|
package edu.cornell.mannlib.vitro.webapp.controller.visualization;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -23,8 +23,8 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServ
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Services a standard visualization request, which involves templates. This will return a simple
|
* Services a standard visualization request, which involves templates. This will return a simple
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker;
|
package edu.cornell.mannlib.vitro.webapp.controller.visualization;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServ
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Services a standard visualization request, which involves templates. This will return a simple
|
* Services a standard visualization request, which involves templates. This will return a simple
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker;
|
package edu.cornell.mannlib.vitro.webapp.controller.visualization;
|
||||||
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker;
|
package edu.cornell.mannlib.vitro.webapp.controller.visualization;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
public class VisualizationInjector {
|
public class VisualizationInjector {
|
||||||
private Map<String, VisualizationRequestHandler> visualizationIDToClass;
|
private Map<String, VisualizationRequestHandler> visualizationIDToClass;
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker;
|
package edu.cornell.mannlib.vitro.webapp.controller.visualization;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import org.springframework.beans.factory.BeanFactory;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
public class VisualizationsDependencyInjector {
|
public class VisualizationsDependencyInjector {
|
||||||
|
|
|
@ -9,6 +9,10 @@ import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
import com.hp.hpl.jena.rdf.model.Literal;
|
import com.hp.hpl.jena.rdf.model.Literal;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.N3Validator;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.EditSubmission;
|
||||||
|
|
||||||
public class PersonHasPublicationValidator implements N3Validator {
|
public class PersonHasPublicationValidator implements N3Validator {
|
||||||
|
|
||||||
private static String MISSING_PUB_TYPE_ERROR = "Must specify a publication type.";
|
private static String MISSING_PUB_TYPE_ERROR = "Must specify a publication type.";
|
||||||
|
|
|
@ -7,6 +7,10 @@ import java.util.Map;
|
||||||
|
|
||||||
import com.hp.hpl.jena.rdf.model.Literal;
|
import com.hp.hpl.jena.rdf.model.Literal;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.N3Validator;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.EditSubmission;
|
||||||
|
|
||||||
public class PublicationHasAuthorValidator implements N3Validator {
|
public class PublicationHasAuthorValidator implements N3Validator {
|
||||||
|
|
||||||
private static String MISSING_FIRST_NAME_ERROR = "Must specify the author's first name.";
|
private static String MISSING_FIRST_NAME_ERROR = "Must specify the author's first name.";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coauthorship;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coauthorship;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -10,12 +10,12 @@ import java.util.Set;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
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.ParamMap;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationComparator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationComparator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaboratorComparator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaboratorComparator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaboration;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaboration;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
|
|
||||||
public class CoAuthorshipGraphMLWriter {
|
public class CoAuthorshipGraphMLWriter {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coauthorship;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coauthorship;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -26,17 +26,17 @@ import com.hp.hpl.jena.query.ResultSet;
|
||||||
import com.hp.hpl.jena.query.Syntax;
|
import com.hp.hpl.jena.query.Syntax;
|
||||||
import com.hp.hpl.jena.rdf.model.RDFNode;
|
import com.hp.hpl.jena.rdf.model.RDFNode;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CoAuthorshipData;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationData;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaboratorComparator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CoAuthorshipData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaboration;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaboratorComparator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UniqueIDGenerator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaboration;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UniqueIDGenerator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This query runner is used to execute a sparql query to get all the publications
|
* This query runner is used to execute a sparql query to get all the publications
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coauthorship;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coauthorship;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -16,14 +16,14 @@ import com.hp.hpl.jena.query.Dataset;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This request handler is used when information related to co-authorship network
|
* This request handler is used when information related to co-authorship network
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coauthorship;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coauthorship;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -14,13 +14,13 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SparklineData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.YearToEntityCountDataElement;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.YearToEntityCountDataElement;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
|
|
||||||
|
|
||||||
public class CoAuthorshipVisCodeGenerator {
|
public class CoAuthorshipVisCodeGenerator {
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils;
|
package edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaboration;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaboration;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
|
|
||||||
public class CoAuthorshipData extends CollaborationData {
|
public class CoAuthorshipData extends CollaborationData {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils;
|
package edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaboration;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaboration;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
|
|
||||||
public class CoInvestigationData extends CollaborationData {
|
public class CoInvestigationData extends CollaborationData {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils;
|
package edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils;
|
||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaboration;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaboration;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,12 +1,12 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils;
|
package edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaboration;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaboration;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
|
|
||||||
public abstract class CollaborationData {
|
public abstract class CollaborationData {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils;
|
package edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils;
|
||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -27,6 +27,8 @@ public class QueryFieldLabels {
|
||||||
public static final String DOCUMENT_PUBLICATION_YEAR_USING_1_1_PROPERTY = "publicationYearOldLit";
|
public static final String DOCUMENT_PUBLICATION_YEAR_USING_1_1_PROPERTY = "publicationYearOldLit";
|
||||||
public static final String DOCUMENT_PUBLICATION_YEAR_MONTH = "publicationYearMonthLit";
|
public static final String DOCUMENT_PUBLICATION_YEAR_MONTH = "publicationYearMonthLit";
|
||||||
public static final String DOCUMENT_PUBLICATION_DATE = "publicationDateLit";
|
public static final String DOCUMENT_PUBLICATION_DATE = "publicationDateLit";
|
||||||
|
public static final String DOCUMENT_JOURNAL_LABEL = "journalLabelLit";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Image related field labels
|
* Image related field labels
|
||||||
|
|
|
@ -14,4 +14,8 @@ public class VisConstants {
|
||||||
public static final String RESULT_FORMAT_PARAM = "RS_TEXT";
|
public static final String RESULT_FORMAT_PARAM = "RS_TEXT";
|
||||||
public static final String RDF_RESULT_FORMAT_PARAM = "RDF/XML-ABBREV";
|
public static final String RDF_RESULT_FORMAT_PARAM = "RDF/XML-ABBREV";
|
||||||
|
|
||||||
|
public static enum DataVisMode {
|
||||||
|
CSV, JSON
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -22,7 +22,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class CoPIGrantCountConstructQueryRunner implements ModelConstructor {
|
public class CoPIGrantCountConstructQueryRunner implements ModelConstructor {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -27,17 +27,17 @@ import com.hp.hpl.jena.query.Syntax;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
import com.hp.hpl.jena.rdf.model.RDFNode;
|
import com.hp.hpl.jena.rdf.model.RDFNode;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CoInvestigationData;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationData;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaboratorComparator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CoInvestigationData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaboration;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaboratorComparator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaboration;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UniqueIDGenerator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UniqueIDGenerator;
|
|
||||||
/**
|
/**
|
||||||
* @author bkoniden
|
* @author bkoniden
|
||||||
* Deepak Konidena
|
* Deepak Konidena
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -15,15 +15,15 @@ import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
|
||||||
|
|
||||||
public class CoPIGrantCountRequestHandler implements VisualizationRequestHandler {
|
public class CoPIGrantCountRequestHandler implements VisualizationRequestHandler {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -10,12 +10,12 @@ import java.util.Set;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
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.ParamMap;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationComparator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationComparator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaboratorComparator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaboratorComparator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaboration;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaboration;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
/**
|
/**
|
||||||
* @author bkoniden
|
* @author bkoniden
|
||||||
* Deepak Konidena
|
* Deepak Konidena
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator;
|
package edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -14,13 +14,13 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Collaborator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Collaborator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SparklineData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.YearToEntityCountDataElement;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.YearToEntityCountDataElement;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class contains code for rendering sparklines and displaying tables for
|
* This class contains code for rendering sparklines and displaying tables for
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison;
|
||||||
|
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -22,7 +22,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class EntityPublicationCountConstructQueryRunner implements ModelConstructor {
|
public class EntityPublicationCountConstructQueryRunner implements ModelConstructor {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -26,10 +26,10 @@ import com.hp.hpl.jena.rdf.model.Model;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Entity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Entity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SubEntity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SubEntity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -20,17 +20,17 @@ import com.hp.hpl.jena.rdf.model.Model;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Entity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Entity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.JsonObject;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SubEntity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SubEntity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json.JsonObject;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
public class EntityPublicationCountRequestHandler implements
|
public class EntityPublicationCountRequestHandler implements
|
||||||
VisualizationRequestHandler {
|
VisualizationRequestHandler {
|
||||||
|
@ -53,7 +53,7 @@ public class EntityPublicationCountRequestHandler implements
|
||||||
|
|
||||||
if (StringUtils.isBlank(entityURI)) {
|
if (StringUtils.isBlank(entityURI)) {
|
||||||
|
|
||||||
entityURI = EntityComparisonUtilityFunctions
|
entityURI = OrganizationUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
|
@ -120,7 +120,7 @@ public class EntityPublicationCountRequestHandler implements
|
||||||
throws MalformedQueryParametersException {
|
throws MalformedQueryParametersException {
|
||||||
|
|
||||||
Map<String, Set<String>> subOrganizationTypesResult =
|
Map<String, Set<String>> subOrganizationTypesResult =
|
||||||
EntityComparisonUtilityFunctions.getSubEntityTypes(
|
OrganizationUtilityFunctions.getSubEntityTypes(
|
||||||
log, dataset, subjectEntityURI);
|
log, dataset, subjectEntityURI);
|
||||||
|
|
||||||
return prepareStandaloneDataResponse(vitroRequest, entity, entity.getSubEntities(),
|
return prepareStandaloneDataResponse(vitroRequest, entity, entity.getSubEntities(),
|
||||||
|
@ -155,7 +155,7 @@ public class EntityPublicationCountRequestHandler implements
|
||||||
vitroRequest,
|
vitroRequest,
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
EntityComparisonUtilityFunctions
|
OrganizationUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
|
@ -178,7 +178,7 @@ public class EntityPublicationCountRequestHandler implements
|
||||||
Entity entity = queryManager.getQueryResult();
|
Entity entity = queryManager.getQueryResult();
|
||||||
|
|
||||||
Map<String, Set<String>> subOrganizationTypesResult =
|
Map<String, Set<String>> subOrganizationTypesResult =
|
||||||
EntityComparisonUtilityFunctions.getSubEntityTypes(
|
OrganizationUtilityFunctions.getSubEntityTypes(
|
||||||
log, dataset, entityURI);
|
log, dataset, entityURI);
|
||||||
|
|
||||||
return prepareDataResponse(entity, entity.getSubEntities(), subOrganizationTypesResult);
|
return prepareDataResponse(entity, entity.getSubEntities(), subOrganizationTypesResult);
|
||||||
|
@ -251,7 +251,7 @@ public class EntityPublicationCountRequestHandler implements
|
||||||
|
|
||||||
String standaloneTemplate = "entityComparisonOnPublicationsStandalone.ftl";
|
String standaloneTemplate = "entityComparisonOnPublicationsStandalone.ftl";
|
||||||
|
|
||||||
String organizationLabel = EntityComparisonUtilityFunctions
|
String organizationLabel = OrganizationUtilityFunctions
|
||||||
.getEntityLabelFromDAO(vreq,
|
.getEntityLabelFromDAO(vreq,
|
||||||
entityURI);
|
entityURI);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison;
|
||||||
|
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -22,7 +22,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class EntitySubOrganizationTypesConstructQueryRunner implements ModelConstructor {
|
public class EntitySubOrganizationTypesConstructQueryRunner implements ModelConstructor {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -26,7 +26,7 @@ import com.hp.hpl.jena.rdf.model.RDFNode;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -22,13 +22,13 @@ import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.IndividualDao;
|
import edu.cornell.mannlib.vitro.webapp.dao.IndividualDao;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Entity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Entity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.GenericQueryMap;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.GenericQueryMap;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.GenericQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.GenericQueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
|
|
||||||
public class EntityComparisonUtilityFunctions {
|
public class OrganizationUtilityFunctions {
|
||||||
|
|
||||||
public static String getHighestLevelOrganizationURI(ResultSet resultSet,
|
public static String getHighestLevelOrganizationURI(ResultSet resultSet,
|
||||||
Map<String, String> fieldLabelToOutputFieldLabel) {
|
Map<String, String> fieldLabelToOutputFieldLabel) {
|
||||||
|
@ -94,7 +94,7 @@ public class EntityComparisonUtilityFunctions {
|
||||||
fieldLabelToOutputFieldLabel, aggregationRules, whereClause,
|
fieldLabelToOutputFieldLabel, aggregationRules, whereClause,
|
||||||
groupOrderClause, dataset, log);
|
groupOrderClause, dataset, log);
|
||||||
|
|
||||||
String highestLevelOrgURI = EntityComparisonUtilityFunctions
|
String highestLevelOrgURI = OrganizationUtilityFunctions
|
||||||
.getHighestLevelOrganizationURI(
|
.getHighestLevelOrganizationURI(
|
||||||
highestLevelOrganizationQueryHandler.getQueryResult(),
|
highestLevelOrganizationQueryHandler.getQueryResult(),
|
||||||
fieldLabelToOutputFieldLabel);
|
fieldLabelToOutputFieldLabel);
|
||||||
|
@ -165,7 +165,7 @@ public class EntityComparisonUtilityFunctions {
|
||||||
/*
|
/*
|
||||||
* If the provided value was not proper compute it yourself.
|
* If the provided value was not proper compute it yourself.
|
||||||
* */
|
* */
|
||||||
return EntityComparisonUtilityFunctions.getHighestLevelOrganizationURI(log, dataset);
|
return OrganizationUtilityFunctions.getHighestLevelOrganizationURI(log, dataset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Entity mergeEntityIfShareSameURI(Entity entityA, Entity entityB) {
|
public static Entity mergeEntityIfShareSameURI(Entity entityA, Entity entityB) {
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.cached;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.cached;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -19,19 +19,20 @@ import com.hp.hpl.jena.query.Dataset;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.OrganizationUtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.EntityComparisonUtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Entity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Entity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SubEntity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.JsonObject;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json.JsonObject;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SubEntity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json.SubjectEntityJSON;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SubjectEntityJSON;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.SelectOnModelUtilities;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.SelectOnModelUtilities;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
|
||||||
|
|
||||||
|
|
||||||
public class TemporalGrantVisualizationRequestHandler implements
|
public class TemporalGrantVisualizationRequestHandler implements
|
||||||
|
@ -55,7 +56,7 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
String entityURI) throws MalformedQueryParametersException {
|
String entityURI) throws MalformedQueryParametersException {
|
||||||
if (StringUtils.isBlank(entityURI)) {
|
if (StringUtils.isBlank(entityURI)) {
|
||||||
|
|
||||||
entityURI = EntityComparisonUtilityFunctions
|
entityURI = OrganizationUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
|
@ -105,19 +106,19 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
entityURI,
|
entityURI,
|
||||||
EntityComparisonConstants.DataVisMode.JSON);
|
VisConstants.DataVisMode.JSON);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return getSubjectEntityAndGenerateDataResponse(
|
return getSubjectEntityAndGenerateDataResponse(
|
||||||
vitroRequest,
|
vitroRequest,
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
EntityComparisonUtilityFunctions
|
OrganizationUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
vitroRequest),
|
vitroRequest),
|
||||||
EntityComparisonConstants.DataVisMode.JSON);
|
VisConstants.DataVisMode.JSON);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -129,7 +130,7 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
entityURI,
|
entityURI,
|
||||||
EntityComparisonConstants.DataVisMode.CSV);
|
VisConstants.DataVisMode.CSV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +158,7 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
|
|
||||||
private Map<String, String> getSubjectEntityAndGenerateDataResponse(
|
private Map<String, String> getSubjectEntityAndGenerateDataResponse(
|
||||||
VitroRequest vitroRequest, Log log, Dataset dataset,
|
VitroRequest vitroRequest, Log log, Dataset dataset,
|
||||||
String subjectEntityURI, EntityComparisonConstants.DataVisMode visMode)
|
String subjectEntityURI, VisConstants.DataVisMode visMode)
|
||||||
throws MalformedQueryParametersException {
|
throws MalformedQueryParametersException {
|
||||||
|
|
||||||
Entity organizationEntity = SelectOnModelUtilities
|
Entity organizationEntity = SelectOnModelUtilities
|
||||||
|
@ -165,7 +166,7 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
|
|
||||||
if (organizationEntity.getSubEntities() == null) {
|
if (organizationEntity.getSubEntities() == null) {
|
||||||
|
|
||||||
if (EntityComparisonConstants.DataVisMode.JSON.equals(visMode)) {
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
return prepareStandaloneDataErrorResponse();
|
return prepareStandaloneDataErrorResponse();
|
||||||
} else {
|
} else {
|
||||||
return prepareDataErrorResponse();
|
return prepareDataErrorResponse();
|
||||||
|
@ -194,14 +195,14 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
grantURIForAssociatedPeopleToVO = SelectOnModelUtilities
|
grantURIForAssociatedPeopleToVO = SelectOnModelUtilities
|
||||||
.getGrantsForAssociatedPeople(dataset, organizationWithAssociatedPeople.getSubEntities());
|
.getGrantsForAssociatedPeople(dataset, organizationWithAssociatedPeople.getSubEntities());
|
||||||
|
|
||||||
organizationEntity = EntityComparisonUtilityFunctions.mergeEntityIfShareSameURI(
|
organizationEntity = OrganizationUtilityFunctions.mergeEntityIfShareSameURI(
|
||||||
organizationEntity,
|
organizationEntity,
|
||||||
organizationWithAssociatedPeople);
|
organizationWithAssociatedPeople);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allGrantURIToVO.isEmpty() && grantURIForAssociatedPeopleToVO.isEmpty()) {
|
if (allGrantURIToVO.isEmpty() && grantURIForAssociatedPeopleToVO.isEmpty()) {
|
||||||
|
|
||||||
if (EntityComparisonConstants.DataVisMode.JSON.equals(visMode)) {
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
return prepareStandaloneDataErrorResponse();
|
return prepareStandaloneDataErrorResponse();
|
||||||
} else {
|
} else {
|
||||||
return prepareDataErrorResponse();
|
return prepareDataErrorResponse();
|
||||||
|
@ -209,7 +210,7 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (EntityComparisonConstants.DataVisMode.JSON.equals(visMode)) {
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
return prepareStandaloneDataResponse(vitroRequest, organizationEntity);
|
return prepareStandaloneDataResponse(vitroRequest, organizationEntity);
|
||||||
} else {
|
} else {
|
||||||
return prepareDataResponse(organizationEntity);
|
return prepareDataResponse(organizationEntity);
|
||||||
|
@ -283,7 +284,7 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
|
|
||||||
String standaloneTemplate = "entityComparisonOnGrantsStandalone.ftl";
|
String standaloneTemplate = "entityComparisonOnGrantsStandalone.ftl";
|
||||||
|
|
||||||
String organizationLabel = EntityComparisonUtilityFunctions.getEntityLabelFromDAO(vreq,
|
String organizationLabel = OrganizationUtilityFunctions.getEntityLabelFromDAO(vreq,
|
||||||
entityURI);
|
entityURI);
|
||||||
|
|
||||||
Map<String, Object> body = new HashMap<String, Object>();
|
Map<String, Object> body = new HashMap<String, Object>();
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.cached;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.cached;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -19,19 +19,20 @@ import com.hp.hpl.jena.query.Dataset;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.OrganizationUtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.EntityComparisonUtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Entity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Entity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SubEntity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.JsonObject;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json.JsonObject;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SubEntity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json.SubjectEntityJSON;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SubjectEntityJSON;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.SelectOnModelUtilities;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.SelectOnModelUtilities;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
|
||||||
|
|
||||||
public class TemporalPublicationVisualizationRequestHandler implements
|
public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
VisualizationRequestHandler {
|
VisualizationRequestHandler {
|
||||||
|
@ -66,7 +67,7 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
|
|
||||||
if (StringUtils.isBlank(entityURI)) {
|
if (StringUtils.isBlank(entityURI)) {
|
||||||
|
|
||||||
entityURI = EntityComparisonUtilityFunctions
|
entityURI = OrganizationUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
|
@ -85,7 +86,7 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
|
|
||||||
private Map<String, String> getSubjectEntityAndGenerateDataResponse(
|
private Map<String, String> getSubjectEntityAndGenerateDataResponse(
|
||||||
VitroRequest vitroRequest, Log log, Dataset dataset,
|
VitroRequest vitroRequest, Log log, Dataset dataset,
|
||||||
String subjectEntityURI, EntityComparisonConstants.DataVisMode visMode)
|
String subjectEntityURI, VisConstants.DataVisMode visMode)
|
||||||
throws MalformedQueryParametersException {
|
throws MalformedQueryParametersException {
|
||||||
|
|
||||||
Entity organizationEntity = SelectOnModelUtilities
|
Entity organizationEntity = SelectOnModelUtilities
|
||||||
|
@ -93,7 +94,7 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
|
|
||||||
if (organizationEntity.getSubEntities() == null) {
|
if (organizationEntity.getSubEntities() == null) {
|
||||||
|
|
||||||
if (EntityComparisonConstants.DataVisMode.JSON.equals(visMode)) {
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
return prepareStandaloneDataErrorResponse();
|
return prepareStandaloneDataErrorResponse();
|
||||||
} else {
|
} else {
|
||||||
return prepareDataErrorResponse();
|
return prepareDataErrorResponse();
|
||||||
|
@ -113,14 +114,14 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
documentURIForAssociatedPeopleTOVO = SelectOnModelUtilities
|
documentURIForAssociatedPeopleTOVO = SelectOnModelUtilities
|
||||||
.getPublicationsForAssociatedPeople(dataset, organizationWithAssociatedPeople.getSubEntities());
|
.getPublicationsForAssociatedPeople(dataset, organizationWithAssociatedPeople.getSubEntities());
|
||||||
|
|
||||||
organizationEntity = EntityComparisonUtilityFunctions.mergeEntityIfShareSameURI(
|
organizationEntity = OrganizationUtilityFunctions.mergeEntityIfShareSameURI(
|
||||||
organizationEntity,
|
organizationEntity,
|
||||||
organizationWithAssociatedPeople);
|
organizationWithAssociatedPeople);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allDocumentURIToVOs.isEmpty() && documentURIForAssociatedPeopleTOVO.isEmpty()) {
|
if (allDocumentURIToVOs.isEmpty() && documentURIForAssociatedPeopleTOVO.isEmpty()) {
|
||||||
|
|
||||||
if (EntityComparisonConstants.DataVisMode.JSON.equals(visMode)) {
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
return prepareStandaloneDataErrorResponse();
|
return prepareStandaloneDataErrorResponse();
|
||||||
} else {
|
} else {
|
||||||
return prepareDataErrorResponse();
|
return prepareDataErrorResponse();
|
||||||
|
@ -128,7 +129,7 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (EntityComparisonConstants.DataVisMode.JSON.equals(visMode)) {
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
return prepareStandaloneDataResponse(vitroRequest, organizationEntity);
|
return prepareStandaloneDataResponse(vitroRequest, organizationEntity);
|
||||||
} else {
|
} else {
|
||||||
return prepareDataResponse(organizationEntity);
|
return prepareDataResponse(organizationEntity);
|
||||||
|
@ -217,19 +218,19 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
entityURI,
|
entityURI,
|
||||||
EntityComparisonConstants.DataVisMode.JSON);
|
VisConstants.DataVisMode.JSON);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return getSubjectEntityAndGenerateDataResponse(
|
return getSubjectEntityAndGenerateDataResponse(
|
||||||
vitroRequest,
|
vitroRequest,
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
EntityComparisonUtilityFunctions
|
OrganizationUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
vitroRequest),
|
vitroRequest),
|
||||||
EntityComparisonConstants.DataVisMode.JSON);
|
VisConstants.DataVisMode.JSON);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -242,7 +243,7 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
entityURI,
|
entityURI,
|
||||||
EntityComparisonConstants.DataVisMode.CSV);
|
VisConstants.DataVisMode.CSV);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +275,7 @@ public class TemporalPublicationVisualizationRequestHandler implements
|
||||||
|
|
||||||
String standaloneTemplate = "entityComparisonOnPublicationsStandalone.ftl";
|
String standaloneTemplate = "entityComparisonOnPublicationsStandalone.ftl";
|
||||||
|
|
||||||
String organizationLabel = EntityComparisonUtilityFunctions
|
String organizationLabel = OrganizationUtilityFunctions
|
||||||
.getEntityLabelFromDAO(vreq,
|
.getEntityLabelFromDAO(vreq,
|
||||||
entityURI);
|
entityURI);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitygrantcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitygrantcount;
|
||||||
|
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -23,7 +23,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class EntityGrantCountConstructQueryRunner implements ModelConstructor {
|
public class EntityGrantCountConstructQueryRunner implements ModelConstructor {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitygrantcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitygrantcount;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -25,10 +25,10 @@ import com.hp.hpl.jena.rdf.model.RDFNode;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Entity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Entity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SubEntity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SubEntity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This query runner is used to execute a sparql query that will fetch all the
|
* This query runner is used to execute a sparql query that will fetch all the
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitygrantcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.entitygrantcount;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -20,18 +20,18 @@ import com.hp.hpl.jena.rdf.model.Model;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.OrganizationUtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.EntityComparisonUtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Entity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Entity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SubEntity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.JsonObject;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json.JsonObject;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SubEntity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
|
||||||
|
|
||||||
|
|
||||||
public class EntityGrantCountRequestHandler implements
|
public class EntityGrantCountRequestHandler implements
|
||||||
|
@ -54,7 +54,7 @@ public class EntityGrantCountRequestHandler implements
|
||||||
String entityURI) throws MalformedQueryParametersException {
|
String entityURI) throws MalformedQueryParametersException {
|
||||||
if (StringUtils.isBlank(entityURI)) {
|
if (StringUtils.isBlank(entityURI)) {
|
||||||
|
|
||||||
entityURI = EntityComparisonUtilityFunctions
|
entityURI = OrganizationUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
|
@ -102,7 +102,7 @@ public class EntityGrantCountRequestHandler implements
|
||||||
vitroRequest,
|
vitroRequest,
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
EntityComparisonUtilityFunctions
|
OrganizationUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
dataset,
|
dataset,
|
||||||
|
@ -125,7 +125,7 @@ public class EntityGrantCountRequestHandler implements
|
||||||
|
|
||||||
|
|
||||||
Map<String, Set<String>> subOrganizationTypesResult =
|
Map<String, Set<String>> subOrganizationTypesResult =
|
||||||
EntityComparisonUtilityFunctions.getSubEntityTypes(
|
OrganizationUtilityFunctions.getSubEntityTypes(
|
||||||
log, dataset, entityURI);
|
log, dataset, entityURI);
|
||||||
|
|
||||||
return prepareDataResponse(entity, entity.getSubEntities(), subOrganizationTypesResult);
|
return prepareDataResponse(entity, entity.getSubEntities(), subOrganizationTypesResult);
|
||||||
|
@ -173,7 +173,7 @@ public class EntityGrantCountRequestHandler implements
|
||||||
throws MalformedQueryParametersException {
|
throws MalformedQueryParametersException {
|
||||||
|
|
||||||
Map<String, Set<String>> subOrganizationTypesResult =
|
Map<String, Set<String>> subOrganizationTypesResult =
|
||||||
EntityComparisonUtilityFunctions.getSubEntityTypes(
|
OrganizationUtilityFunctions.getSubEntityTypes(
|
||||||
log, dataset, subjectOrganization);
|
log, dataset, subjectOrganization);
|
||||||
|
|
||||||
return prepareStandaloneDataResponse(vitroRequest, entity, subOrganizationTypesResult);
|
return prepareStandaloneDataResponse(vitroRequest, entity, subOrganizationTypesResult);
|
||||||
|
@ -250,7 +250,7 @@ public class EntityGrantCountRequestHandler implements
|
||||||
|
|
||||||
String standaloneTemplate = "entityComparisonOnGrantsStandalone.ftl";
|
String standaloneTemplate = "entityComparisonOnGrantsStandalone.ftl";
|
||||||
|
|
||||||
String organizationLabel = EntityComparisonUtilityFunctions.getEntityLabelFromDAO(vreq,
|
String organizationLabel = OrganizationUtilityFunctions.getEntityLabelFromDAO(vreq,
|
||||||
entityURI);
|
entityURI);
|
||||||
|
|
||||||
Map<String, Object> body = new HashMap<String, Object>();
|
Map<String, Object> body = new HashMap<String, Object>();
|
|
@ -1,11 +0,0 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.cached;
|
|
||||||
|
|
||||||
public class EntityComparisonConstants {
|
|
||||||
|
|
||||||
public static enum DataVisMode {
|
|
||||||
CSV, JSON
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,376 @@
|
||||||
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
|
package edu.cornell.mannlib.vitro.webapp.visualization.mapofscience;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringEscapeUtils;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.OrganizationUtilityFunctions;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Entity;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.MapOfScienceActivity;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SubEntity;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json.MapOfScience;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.SelectOnModelUtilities;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
|
public class MapOfScienceVisualizationRequestHandler implements
|
||||||
|
VisualizationRequestHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseValues generateStandardVisualization(
|
||||||
|
VitroRequest vitroRequest, Log log, Dataset dataset)
|
||||||
|
throws MalformedQueryParametersException {
|
||||||
|
|
||||||
|
|
||||||
|
String entityURI = vitroRequest
|
||||||
|
.getParameter(VisualizationFrameworkConstants.INDIVIDUAL_URI_KEY);
|
||||||
|
|
||||||
|
return generateStandardVisualizationForScienceMapVis(
|
||||||
|
vitroRequest, log, dataset, entityURI);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseValues generateVisualizationForShortURLRequests(
|
||||||
|
Map<String, String> parameters, VitroRequest vitroRequest, Log log,
|
||||||
|
Dataset dataset) throws MalformedQueryParametersException {
|
||||||
|
|
||||||
|
|
||||||
|
return generateStandardVisualizationForScienceMapVis(
|
||||||
|
vitroRequest, log, dataset, parameters.get(VisualizationFrameworkConstants.INDIVIDUAL_URI_KEY));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private ResponseValues generateStandardVisualizationForScienceMapVis(
|
||||||
|
VitroRequest vitroRequest, Log log, Dataset dataset,
|
||||||
|
String entityURI) throws MalformedQueryParametersException {
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(entityURI)) {
|
||||||
|
|
||||||
|
entityURI = OrganizationUtilityFunctions
|
||||||
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
|
log,
|
||||||
|
dataset,
|
||||||
|
vitroRequest);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// System.out.println("current models in the system are");
|
||||||
|
// for (Map.Entry<String, Model> entry : ConstructedModelTracker.getAllModels().entrySet()) {
|
||||||
|
// System.out.println(entry.getKey() + " -> " + entry.getValue().size());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
return prepareStandaloneMarkupResponse(vitroRequest, entityURI);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> getSubjectEntityAndGenerateDataResponse(
|
||||||
|
VitroRequest vitroRequest, Log log, Dataset dataset,
|
||||||
|
String subjectEntityURI, VisConstants.DataVisMode visMode)
|
||||||
|
throws MalformedQueryParametersException {
|
||||||
|
|
||||||
|
Entity organizationEntity = SelectOnModelUtilities
|
||||||
|
.getSubjectOrganizationHierarchy(dataset, subjectEntityURI);
|
||||||
|
|
||||||
|
if (organizationEntity.getSubEntities() == null) {
|
||||||
|
|
||||||
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
|
return prepareStandaloneDataErrorResponse();
|
||||||
|
} else {
|
||||||
|
return prepareDataErrorResponse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Activity> documentURIForAssociatedPeopleTOVO = new HashMap<String, Activity>();
|
||||||
|
Map<String, Activity> allDocumentURIToVOs = new HashMap<String, Activity>();
|
||||||
|
|
||||||
|
allDocumentURIToVOs = SelectOnModelUtilities.getPublicationsWithJournalForAllSubOrganizations(dataset, organizationEntity);
|
||||||
|
|
||||||
|
Entity organizationWithAssociatedPeople = SelectOnModelUtilities
|
||||||
|
.getSubjectOrganizationAssociatedPeople(dataset, subjectEntityURI);
|
||||||
|
|
||||||
|
if (organizationWithAssociatedPeople.getSubEntities() != null) {
|
||||||
|
|
||||||
|
documentURIForAssociatedPeopleTOVO = SelectOnModelUtilities
|
||||||
|
.getPublicationsWithJournalForAssociatedPeople(dataset, organizationWithAssociatedPeople.getSubEntities());
|
||||||
|
|
||||||
|
organizationEntity = OrganizationUtilityFunctions.mergeEntityIfShareSameURI(
|
||||||
|
organizationEntity,
|
||||||
|
organizationWithAssociatedPeople);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (allDocumentURIToVOs.isEmpty() && documentURIForAssociatedPeopleTOVO.isEmpty()) {
|
||||||
|
|
||||||
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
|
return prepareStandaloneDataErrorResponse();
|
||||||
|
} else {
|
||||||
|
return prepareDataErrorResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (VisConstants.DataVisMode.JSON.equals(visMode)) {
|
||||||
|
return prepareStandaloneDataResponse(vitroRequest, organizationEntity);
|
||||||
|
} else {
|
||||||
|
return prepareDataResponse(organizationEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides response when json file containing the publication count over the
|
||||||
|
* years is requested.
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @param subentities
|
||||||
|
* @param subOrganizationTypesResult
|
||||||
|
*/
|
||||||
|
private Map<String, String> prepareDataResponse(Entity entity) {
|
||||||
|
|
||||||
|
String entityLabel = entity.getEntityLabel();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To make sure that null/empty records for entity names do not cause any mischief.
|
||||||
|
* */
|
||||||
|
if (StringUtils.isBlank(entityLabel)) {
|
||||||
|
entityLabel = "no-organization";
|
||||||
|
}
|
||||||
|
|
||||||
|
String outputFileName = UtilityFunctions.slugify(entityLabel)
|
||||||
|
+ "_publications-per-year" + ".csv";
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, String> fileData = new HashMap<String, String>();
|
||||||
|
|
||||||
|
fileData.put(DataVisualizationController.FILE_NAME_KEY,
|
||||||
|
outputFileName);
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_TYPE_KEY,
|
||||||
|
"application/octet-stream");
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_KEY,
|
||||||
|
getEntityPublicationsPerYearCSVContent(entity));
|
||||||
|
return fileData;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> prepareDataErrorResponse() {
|
||||||
|
|
||||||
|
String outputFileName = "no-organization_publications-per-year.csv";
|
||||||
|
|
||||||
|
Map<String, String> fileData = new HashMap<String, String>();
|
||||||
|
|
||||||
|
fileData.put(DataVisualizationController.FILE_NAME_KEY,
|
||||||
|
outputFileName);
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_TYPE_KEY,
|
||||||
|
"application/octet-stream");
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_KEY, "");
|
||||||
|
return fileData;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> prepareStandaloneDataErrorResponse() {
|
||||||
|
|
||||||
|
Map<String, String> fileData = new HashMap<String, String>();
|
||||||
|
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_TYPE_KEY,
|
||||||
|
"application/octet-stream");
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_KEY,
|
||||||
|
"{\"error\" : \"No Publications for this Organization found in VIVO.\"}");
|
||||||
|
return fileData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, String> generateDataVisualization(
|
||||||
|
VitroRequest vitroRequest, Log log, Dataset dataset)
|
||||||
|
throws MalformedQueryParametersException {
|
||||||
|
|
||||||
|
String entityURI = vitroRequest
|
||||||
|
.getParameter(VisualizationFrameworkConstants.INDIVIDUAL_URI_KEY);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This will provide the data in json format mainly used for standalone tmeporal vis.
|
||||||
|
* */
|
||||||
|
if (VisualizationFrameworkConstants.TEMPORAL_GRAPH_JSON_DATA_VIS_MODE
|
||||||
|
.equalsIgnoreCase(vitroRequest.getParameter(
|
||||||
|
VisualizationFrameworkConstants.VIS_MODE_KEY))) {
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(entityURI)) {
|
||||||
|
|
||||||
|
return getSubjectEntityAndGenerateDataResponse(
|
||||||
|
vitroRequest,
|
||||||
|
log,
|
||||||
|
dataset,
|
||||||
|
entityURI,
|
||||||
|
VisConstants.DataVisMode.JSON);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
return getSubjectEntityAndGenerateDataResponse(
|
||||||
|
vitroRequest,
|
||||||
|
log,
|
||||||
|
dataset,
|
||||||
|
OrganizationUtilityFunctions
|
||||||
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
|
log,
|
||||||
|
dataset,
|
||||||
|
vitroRequest),
|
||||||
|
VisConstants.DataVisMode.JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* This provides csv download files for the content in the tables.
|
||||||
|
* */
|
||||||
|
|
||||||
|
return getSubjectEntityAndGenerateDataResponse(
|
||||||
|
vitroRequest,
|
||||||
|
log,
|
||||||
|
dataset,
|
||||||
|
entityURI,
|
||||||
|
VisConstants.DataVisMode.CSV);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object generateAjaxVisualization(VitroRequest vitroRequest, Log log,
|
||||||
|
Dataset dataset) throws MalformedQueryParametersException {
|
||||||
|
throw new UnsupportedOperationException("Entity Pub Count does not provide Ajax Response.");
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> prepareStandaloneDataResponse(
|
||||||
|
VitroRequest vitroRequest,
|
||||||
|
Entity entity) {
|
||||||
|
|
||||||
|
Map<String, String> fileData = new HashMap<String, String>();
|
||||||
|
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_TYPE_KEY,
|
||||||
|
"application/octet-stream");
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_KEY,
|
||||||
|
writeMapOfScienceDataJSON(vitroRequest,
|
||||||
|
entity));
|
||||||
|
return fileData;
|
||||||
|
}
|
||||||
|
|
||||||
|
private TemplateResponseValues prepareStandaloneMarkupResponse(VitroRequest vreq,
|
||||||
|
String entityURI) {
|
||||||
|
|
||||||
|
String standaloneTemplate = "mapOfScienceStandalone.ftl";
|
||||||
|
|
||||||
|
String organizationLabel = OrganizationUtilityFunctions
|
||||||
|
.getEntityLabelFromDAO(vreq,
|
||||||
|
entityURI);
|
||||||
|
|
||||||
|
Map<String, Object> body = new HashMap<String, Object>();
|
||||||
|
body.put("title", organizationLabel + " - Map of Science Visualization");
|
||||||
|
body.put("organizationURI", entityURI);
|
||||||
|
body.put("organizationLocalName", UtilityFunctions.getIndividualLocalName(entityURI, vreq));
|
||||||
|
body.put("vivoDefaultNamespace", vreq.getWebappDaoFactory().getDefaultNamespace());
|
||||||
|
body.put("organizationLabel", organizationLabel);
|
||||||
|
|
||||||
|
return new TemplateResponseValues(standaloneTemplate, body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to generate a json file for year <-> publication count mapping.
|
||||||
|
* @param vreq
|
||||||
|
* @param subentities
|
||||||
|
* @param subOrganizationTypesResult
|
||||||
|
*/
|
||||||
|
private String writeMapOfScienceDataJSON(VitroRequest vreq,
|
||||||
|
Entity subjectEntity) {
|
||||||
|
|
||||||
|
Gson json = new Gson();
|
||||||
|
Set jsonContent = new HashSet();
|
||||||
|
|
||||||
|
for (SubEntity subentity : subjectEntity.getSubEntities()) {
|
||||||
|
|
||||||
|
MapOfScience entityJson = new MapOfScience(subentity.getIndividualURI());
|
||||||
|
|
||||||
|
entityJson.setLabel(subentity.getIndividualLabel());
|
||||||
|
|
||||||
|
entityJson.setLastCachedAtDateTime(subentity.getLastCachedAtDateTime());
|
||||||
|
|
||||||
|
if (subentity.getEntityClass().equals(VOConstants.EntityClassType.PERSON)) {
|
||||||
|
entityJson.setType("PERSON");
|
||||||
|
} else if (subentity.getEntityClass().equals(VOConstants.EntityClassType.ORGANIZATION)) {
|
||||||
|
entityJson.setType("ORGANIZATION");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, Integer> journalToPublicationCount = new HashMap<String, Integer>();
|
||||||
|
|
||||||
|
int mappedPublicationCount = 0;
|
||||||
|
int unMappedPublicationCount = 0;
|
||||||
|
|
||||||
|
for (Activity activity : subentity.getActivities()) {
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(((MapOfScienceActivity) activity).getPublishedInJournal())) {
|
||||||
|
|
||||||
|
String journalName = ((MapOfScienceActivity) activity).getPublishedInJournal();
|
||||||
|
if (journalToPublicationCount.containsKey(journalName)) {
|
||||||
|
|
||||||
|
journalToPublicationCount.put(journalName,
|
||||||
|
journalToPublicationCount.get(journalName) + 1);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
journalToPublicationCount.put(journalName, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
mappedPublicationCount++;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
unMappedPublicationCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
entityJson.setPubsMapped(mappedPublicationCount);
|
||||||
|
entityJson.setPubsUnmapped(unMappedPublicationCount);
|
||||||
|
entityJson.setSubdisciplineActivity(journalToPublicationCount);
|
||||||
|
|
||||||
|
jsonContent.add(entityJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
return json.toJson(jsonContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getEntityPublicationsPerYearCSVContent(Entity entity) {
|
||||||
|
|
||||||
|
StringBuilder csvFileContent = new StringBuilder();
|
||||||
|
|
||||||
|
csvFileContent.append("Entity Name, Publication Count, Entity Type\n");
|
||||||
|
|
||||||
|
for (SubEntity subEntity : entity.getSubEntities()) {
|
||||||
|
|
||||||
|
csvFileContent.append(StringEscapeUtils.escapeCsv(subEntity.getIndividualLabel()));
|
||||||
|
csvFileContent.append(", ");
|
||||||
|
csvFileContent.append(subEntity.getActivities().size());
|
||||||
|
csvFileContent.append(", ");
|
||||||
|
|
||||||
|
String allTypes = StringUtils.join(subEntity.getEntityTypeLabels(), "; ");
|
||||||
|
|
||||||
|
csvFileContent.append(StringEscapeUtils.escapeCsv(allTypes));
|
||||||
|
csvFileContent.append("\n");
|
||||||
|
}
|
||||||
|
return csvFileContent.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -8,16 +8,16 @@ import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.ModelFactoryInterface;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.ModelFactoryInterface;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.OrganizationAssociatedPeopleModelWithTypesFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.OrganizationAssociatedPeopleModelWithTypesFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.OrganizationModelWithTypesFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.OrganizationModelWithTypesFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.OrganizationToGrantsForSubOrganizationsFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.OrganizationToGrantsForSubOrganizationsFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.OrganizationToPublicationsForSubOrganizationsFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.OrganizationToPublicationsForSubOrganizationsFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.PeopleToGrantsFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.PeopleToGrantsFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.PeopleToPublicationsFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.PeopleToPublicationsFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.PersonToGrantsFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.PersonToGrantsFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.PersonToPublicationsFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.PersonToPublicationsFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory.SubOrganizationWithinModelFactory;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory.SubOrganizationWithinModelFactory;
|
||||||
|
|
||||||
public class ModelConstructorUtilities {
|
public class ModelConstructorUtilities {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
@ -15,7 +15,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class OrganizationAssociatedPeopleModelWithTypesConstructor implements ModelConstructor {
|
public class OrganizationAssociatedPeopleModelWithTypesConstructor implements ModelConstructor {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
@ -15,7 +15,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class OrganizationModelWithTypesConstructor implements ModelConstructor {
|
public class OrganizationModelWithTypesConstructor implements ModelConstructor {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -18,7 +18,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class OrganizationToGrantsForSubOrganizationsModelConstructor implements ModelConstructor {
|
public class OrganizationToGrantsForSubOrganizationsModelConstructor implements ModelConstructor {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
@ -15,7 +15,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class OrganizationToPublicationsForSubOrganizationsModelConstructor implements ModelConstructor {
|
public class OrganizationToPublicationsForSubOrganizationsModelConstructor implements ModelConstructor {
|
||||||
|
|
||||||
|
@ -47,6 +47,8 @@ public class OrganizationToPublicationsForSubOrganizationsModelConstructor imple
|
||||||
+ " ?Document rdfs:label ?DocumentLabel . "
|
+ " ?Document rdfs:label ?DocumentLabel . "
|
||||||
+ " ?Document core:dateTimeValue ?dateTimeValue . "
|
+ " ?Document core:dateTimeValue ?dateTimeValue . "
|
||||||
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
||||||
|
+ " ?Document core:hasPublicationVenue ?journal ."
|
||||||
|
+ " ?journal rdfs:label ?journalLabel . "
|
||||||
+ " } "
|
+ " } "
|
||||||
+ " WHERE { "
|
+ " WHERE { "
|
||||||
+ " <" + organizationURI + "> rdfs:label ?organizationLabel . "
|
+ " <" + organizationURI + "> rdfs:label ?organizationLabel . "
|
||||||
|
@ -62,6 +64,11 @@ public class OrganizationToPublicationsForSubOrganizationsModelConstructor imple
|
||||||
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
||||||
+ " } "
|
+ " } "
|
||||||
+ " "
|
+ " "
|
||||||
|
+ " OPTIONAL { "
|
||||||
|
+ " ?Document core:hasPublicationVenue ?journal ."
|
||||||
|
+ " ?journal rdfs:label ?journalLabel . "
|
||||||
|
+ " } "
|
||||||
|
+ " "
|
||||||
+ " LET(?now := afn:now()) "
|
+ " LET(?now := afn:now()) "
|
||||||
+ " } ";
|
+ " } ";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -18,7 +18,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class PeopleToGrantsModelConstructor implements ModelConstructor {
|
public class PeopleToGrantsModelConstructor implements ModelConstructor {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
@ -15,7 +15,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class PeopleToPublicationsModelConstructor implements ModelConstructor {
|
public class PeopleToPublicationsModelConstructor implements ModelConstructor {
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@ public class PeopleToPublicationsModelConstructor implements ModelConstructor {
|
||||||
+ " ?Document rdfs:label ?DocumentLabel . "
|
+ " ?Document rdfs:label ?DocumentLabel . "
|
||||||
+ " ?Document core:dateTimeValue ?dateTimeValue . "
|
+ " ?Document core:dateTimeValue ?dateTimeValue . "
|
||||||
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
||||||
|
+ " ?Document core:hasPublicationVenue ?journal ."
|
||||||
|
+ " ?journal rdfs:label ?journalLabel . "
|
||||||
+ " } "
|
+ " } "
|
||||||
+ " WHERE { "
|
+ " WHERE { "
|
||||||
+ " ?person core:authorInAuthorship ?Resource . "
|
+ " ?person core:authorInAuthorship ?Resource . "
|
||||||
|
@ -54,6 +56,11 @@ public class PeopleToPublicationsModelConstructor implements ModelConstructor {
|
||||||
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
||||||
+ " } "
|
+ " } "
|
||||||
+ " "
|
+ " "
|
||||||
|
+ " OPTIONAL { "
|
||||||
|
+ " ?Document core:hasPublicationVenue ?journal ."
|
||||||
|
+ " ?journal rdfs:label ?journalLabel . "
|
||||||
|
+ " } "
|
||||||
|
+ " "
|
||||||
+ " LET(?now := afn:now()) "
|
+ " LET(?now := afn:now()) "
|
||||||
+ " } ";
|
+ " } ";
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -18,7 +18,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class PersonToGrantsModelConstructor implements ModelConstructor {
|
public class PersonToGrantsModelConstructor implements ModelConstructor {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
@ -15,7 +15,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class PersonToPublicationsModelConstructor implements ModelConstructor {
|
public class PersonToPublicationsModelConstructor implements ModelConstructor {
|
||||||
|
|
||||||
|
@ -46,6 +46,8 @@ public class PersonToPublicationsModelConstructor implements ModelConstructor {
|
||||||
+ " ?Document rdfs:label ?DocumentLabel . "
|
+ " ?Document rdfs:label ?DocumentLabel . "
|
||||||
+ " ?Document core:dateTimeValue ?dateTimeValue . "
|
+ " ?Document core:dateTimeValue ?dateTimeValue . "
|
||||||
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
||||||
|
+ " ?Document core:hasPublicationVenue ?journal ."
|
||||||
|
+ " ?journal rdfs:label ?journalLabel . "
|
||||||
+ " } "
|
+ " } "
|
||||||
+ " WHERE { "
|
+ " WHERE { "
|
||||||
+ " <" + personURI + "> core:authorInAuthorship ?Resource . "
|
+ " <" + personURI + "> core:authorInAuthorship ?Resource . "
|
||||||
|
@ -57,6 +59,11 @@ public class PersonToPublicationsModelConstructor implements ModelConstructor {
|
||||||
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
+ " ?dateTimeValue core:dateTime ?publicationDate . "
|
||||||
+ " } "
|
+ " } "
|
||||||
+ " "
|
+ " "
|
||||||
|
+ " OPTIONAL { "
|
||||||
|
+ " ?Document core:hasPublicationVenue ?journal ."
|
||||||
|
+ " ?journal rdfs:label ?journalLabel . "
|
||||||
|
+ " } "
|
||||||
|
+ " "
|
||||||
+ " LET(?now := afn:now()) "
|
+ " LET(?now := afn:now()) "
|
||||||
+ " } ";
|
+ " } ";
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
@ -15,7 +15,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class SubOrganizationWithinModelConstructor implements ModelConstructor {
|
public class SubOrganizationWithinModelConstructor implements ModelConstructor {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.OrganizationAssociatedPeopleModelWithTypesConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.OrganizationAssociatedPeopleModelWithTypesConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class OrganizationAssociatedPeopleModelWithTypesFactory implements
|
public class OrganizationAssociatedPeopleModelWithTypesFactory implements
|
||||||
ModelFactoryInterface {
|
ModelFactoryInterface {
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.OrganizationModelWithTypesConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.OrganizationModelWithTypesConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class OrganizationModelWithTypesFactory implements ModelFactoryInterface {
|
public class OrganizationModelWithTypesFactory implements ModelFactoryInterface {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.OrganizationToGrantsForSubOrganizationsModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.OrganizationToGrantsForSubOrganizationsModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class OrganizationToGrantsForSubOrganizationsFactory implements
|
public class OrganizationToGrantsForSubOrganizationsFactory implements
|
||||||
ModelFactoryInterface {
|
ModelFactoryInterface {
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.OrganizationToPublicationsForSubOrganizationsModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.OrganizationToPublicationsForSubOrganizationsModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class OrganizationToPublicationsForSubOrganizationsFactory implements
|
public class OrganizationToPublicationsForSubOrganizationsFactory implements
|
||||||
ModelFactoryInterface {
|
ModelFactoryInterface {
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.PeopleToGrantsModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.PeopleToGrantsModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class PeopleToGrantsFactory implements ModelFactoryInterface {
|
public class PeopleToGrantsFactory implements ModelFactoryInterface {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.PeopleToPublicationsModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.PeopleToPublicationsModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class PeopleToPublicationsFactory implements ModelFactoryInterface {
|
public class PeopleToPublicationsFactory implements ModelFactoryInterface {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.PersonToGrantsModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.PersonToGrantsModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class PersonToGrantsFactory implements ModelFactoryInterface {
|
public class PersonToGrantsFactory implements ModelFactoryInterface {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.PersonToPublicationsModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.PersonToPublicationsModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class PersonToPublicationsFactory implements ModelFactoryInterface {
|
public class PersonToPublicationsFactory implements ModelFactoryInterface {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.factory;
|
package edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.factory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.modelconstructor.SubOrganizationWithinModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.modelconstructor.SubOrganizationWithinModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.ConstructedModelTracker;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.ConstructedModelTracker;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
|
|
||||||
public class SubOrganizationWithinModelFactory implements ModelFactoryInterface {
|
public class SubOrganizationWithinModelFactory implements ModelFactoryInterface {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.persongrantcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.persongrantcount;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -24,9 +24,9 @@ import com.hp.hpl.jena.rdf.model.RDFNode;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Individual;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Individual;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.persongrantcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.persongrantcount;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -16,15 +16,15 @@ import com.hp.hpl.jena.query.Dataset;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Individual;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Individual;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SparklineData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.persongrantcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.persongrantcount;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -13,12 +13,12 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SparklineData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.YearToEntityCountDataElement;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.YearToEntityCountDataElement;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
|
|
||||||
|
|
||||||
public class PersonGrantCountVisCodeGenerator {
|
public class PersonGrantCountVisCodeGenerator {
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personlevel;
|
package edu.cornell.mannlib.vitro.webapp.visualization.personlevel;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -15,24 +15,24 @@ import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.coauthorship.CoAuthorshipQueryRunner;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.coauthorship.CoAuthorshipVisCodeGenerator;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.collaborationutils.CollaborationData;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator.CoPIGrantCountConstructQueryRunner;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator.CoPIGrantCountQueryRunner;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator.CoPIVisCodeGenerator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coauthorship.CoAuthorshipQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.persongrantcount.PersonGrantCountQueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coauthorship.CoAuthorshipVisCodeGenerator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.persongrantcount.PersonGrantCountVisCodeGenerator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.collaborationutils.CollaborationData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.personpubcount.PersonPublicationCountQueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator.CoPIGrantCountConstructQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.personpubcount.PersonPublicationCountVisCodeGenerator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator.CoPIGrantCountQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator.CoPIVisCodeGenerator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.persongrantcount.PersonGrantCountQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.ModelConstructor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.persongrantcount.PersonGrantCountVisCodeGenerator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personpubcount.PersonPublicationCountQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personpubcount.PersonPublicationCountVisCodeGenerator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SparklineData;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.ModelConstructor;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This request handler is used to serve content rendered on the person level vis page
|
* This request handler is used to serve content rendered on the person level vis page
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personpubcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.personpubcount;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -24,9 +24,9 @@ import com.hp.hpl.jena.rdf.model.RDFNode;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Individual;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Individual;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personpubcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.personpubcount;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -16,15 +16,15 @@ import com.hp.hpl.jena.query.Dataset;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.DataVisualizationController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Individual;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Individual;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SparklineData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personpubcount;
|
package edu.cornell.mannlib.vitro.webapp.visualization.personpubcount;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -13,12 +13,12 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VisConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SparklineData;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineData;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.YearToEntityCountDataElement;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.YearToEntityCountDataElement;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
|
|
||||||
|
|
||||||
public class PersonPublicationCountVisCodeGenerator {
|
public class PersonPublicationCountVisCodeGenerator {
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.utilities;
|
package edu.cornell.mannlib.vitro.webapp.visualization.utilities;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -22,16 +22,16 @@ import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
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.ParamMap;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
|
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.filestorage.FileServingHelper;
|
import edu.cornell.mannlib.vitro.webapp.filestorage.FileServingHelper;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.GenericQueryMap;
|
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.GenericQueryMap;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.AllPropertiesQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.AllPropertiesQueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.GenericQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.GenericQueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This request handler is used when you need helpful information to add more context
|
* This request handler is used when you need helpful information to add more context
|
|
@ -1,8 +1,8 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface will make sure that VOs conveying any person's academic output like publications,
|
* This interface will make sure that VOs conveying any person's academic output like publications,
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -9,8 +9,8 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UniqueIDGenerator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UniqueIDGenerator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -9,8 +9,8 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.VOConstants;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UniqueIDGenerator;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UniqueIDGenerator;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
|
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
public class Individual {
|
public class Individual {
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
|
public class MapOfScienceActivity extends Activity {
|
||||||
|
|
||||||
|
private String publishedInJournal;
|
||||||
|
|
||||||
|
public MapOfScienceActivity(String activityURI) {
|
||||||
|
super(activityURI);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublishedInJournal(String publishedInJournal) {
|
||||||
|
this.publishedInJournal = publishedInJournal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPublishedInJournal() {
|
||||||
|
return publishedInJournal;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This object is used to store information about the yearToEntityCount Map in the format
|
* This object is used to store information about the yearToEntityCount Map in the format
|
|
@ -1,5 +1,5 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects;
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -0,0 +1,67 @@
|
||||||
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.json;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class MapOfScience {
|
||||||
|
|
||||||
|
private String uri;
|
||||||
|
private String label;
|
||||||
|
private String type;
|
||||||
|
private int pubsMapped;
|
||||||
|
private int pubsUnmapped;
|
||||||
|
private String lastCachedAtDateTime;
|
||||||
|
private Map<String, Integer> subdisciplineActivity = new HashMap<String, Integer>();
|
||||||
|
|
||||||
|
public MapOfScience(String uri) {
|
||||||
|
this.uri = uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
public void setUri(String uri) {
|
||||||
|
this.uri = uri;
|
||||||
|
}
|
||||||
|
public String getUri() {
|
||||||
|
return uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
public void setPubsMapped(int pubsMapped) {
|
||||||
|
this.pubsMapped = pubsMapped;
|
||||||
|
}
|
||||||
|
public int getPubsMapped() {
|
||||||
|
return pubsMapped;
|
||||||
|
}
|
||||||
|
public void setPubsUnmapped(int pubsUnmapped) {
|
||||||
|
this.pubsUnmapped = pubsUnmapped;
|
||||||
|
}
|
||||||
|
public int getPubsUnmapped() {
|
||||||
|
return pubsUnmapped;
|
||||||
|
}
|
||||||
|
public void setSubdisciplineActivity(Map<String, Integer> subdisciplineActivity) {
|
||||||
|
this.subdisciplineActivity = subdisciplineActivity;
|
||||||
|
}
|
||||||
|
public Map<String, Integer> getSubdisciplineActivity() {
|
||||||
|
return subdisciplineActivity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastCachedAtDateTime(String lastCachedAtDateTime) {
|
||||||
|
this.lastCachedAtDateTime = lastCachedAtDateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastCachedAtDateTime() {
|
||||||
|
return lastCachedAtDateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue