The SOLR Statistics system of DSpace has been extended in several aspects. It is now able to collect and visualize statistics about the CRIS Entities as allow further extension using StatsIndexPlugin in a similar way than the IndexerPlugin for the Search system.

The extended implementation is configured in the [installDir]/config/spring/statistics-solr.xml file

 

<bean class="org.dspace.app.cris.statistics.CrisSolrLogger" id="org.dspace.statistics.SolrLogger">
 <property name="spiderDetector" ref="org.dspace.statistics.util.SpiderDetector"/>
</bean>
<bean class="org.dspace.statistics.util.SpiderDetector" id="org.dspace.statistics.util.SpiderDetector"/>

 

The [installDir]/config/spring/statistics.xml file contains the spring beans definition to configure the extra indexers to invoke collecting statistics and most of the UI aspects of the statistics functionalities (number of  “top relation”, “top country” to show, timeline, etc.)

<bean id="identifierExtraIndexer" class="org.dspace.statistics.IdentifierStatsIndexPlugin"/> 

Allow the indexing of the unique key of the SOLR search document in the statistics document so to allow the use of SOLR join query to retrieve statistics of related objects (i.e. number of visualization over time of all researcher’s items, top visualized items for researcher, etc.)

The configuration of the statistics functionalities for the DSpace standard entities (Items, Collections and Communities) are done through spring beans. The following snippet show the default configuration for the DSpace Items

 

<bean id="itemStatsComponent" class="org.dspace.app.cris.integration.statistics.StatComponentsService">
 <property name="excludeBot" value="true"/> <!-- <value>-isBot:true</value>  -->
 <property name="showSelectedObject" value="true"/>
 <property name="topRelation" value="20"/>
 <property name="components">
  <map>
   <entry key="selectedObject" value-ref="statsitem" />    
   <entry key="bitstream" value-ref="statsbitstreamforitem" />
  </map>
 </property>
 <property name="topCountryLength" value="10" />
 <property name="topContinentLength" value="-1" />
 <property name="topCityLength" value="10" />  
 <property name="showMoreLength" value="20" />
 <property name="yearsQuery" value="5" />
</bean>

 

Most of the properties are self-explained; the one that need further details is components. A map of referring beans that describe the sections available in the statistics UI for DSpace Items.

There are two sections:

  • selectedObject, is the reserved word to define the StatComponent “section” used to visualize the statistics of the current object

  • bitstream, it defines a “section” where the top bitstream visualization are shown

 

<bean id="statsitem"
  class="org.dspace.app.webui.cris.components.statistics.StatSelectedObjectComponent"> 
 <property name="relationObjectType" value="2" />  
</bean>
 
<bean id="statsbitstreamforitem"
 class="org.dspace.app.webui.cris.components.statistics.StatBitstreamTopObjectComponent">
 <property name="relationObjectType" value="0" /> 
 <property name="bean" ref="commonItemBean" />
 <property name="crisSearchService" ref="org.dspace.discovery.SearchService" />
</bean>

<bean id="commonItemBean" class="org.dspace.app.webui.cris.components.BeanComponent">
 <property name="componentIdentifier" value="collection" />
 <property name="query"><value>search.resourceid:{0}</value></property>  
</bean>
Also the configuration of the statistics functionalities for the CRIS entities (ResearcherPage, OrgUnit, Project and DynamicObject) are done through spring beans. The following snippet show the default configuration for the ResearcherPages
<bean id="rpStatsComponent"            class="org.dspace.app.cris.integration.statistics.CrisStatComponentsService">
 <property name="excludeBot" value="true"/> <!-- <value>-isBot:true</value>  -->
 <property name="showSelectedObject" value="true"/>
 <property name="showExtraTab" value="true"/>
 <property name="topRelation" value="20"/>
 <property name="topCountryLength" value="10" />
 <property name="topContinentLength" value="-1" />
 <property name="topCityLength" value="10" />  
 <property name="showMoreLength" value="20" />
 <property name="yearsQuery" value="5" />
 <property name="crisComponentsService" ref="rpComponentsService"/>
 <property name="selectedObject" ref="rpSelectedObject"/>
</bean>

 

The bean definition is very similar to the definition used for standard DSpace Entities except for the components management. For the CRIS Entities the components are derived by the definitions done in the CrisComponentService, see “CRIS Components”.

This mean that the user defined categories for clustering the relationship, for example the researcher’s publication list by publication type, are used also in the statistics functionality so to show view and download of all the researcher’s publication over time by publication type.

The current object is specified as direct property of the CrisStatComponent bean

 

<bean id="rpSelectedObject"
 class="org.dspace.app.webui.cris.components.statistics.CrisRPStatsDualSelectedComponent"> 
 <property name="applicationService" ref="applicationService" />
</bean>

 

These settings are injected in the UI using spring beans definition in [webapp-JSPUI]/WEB-INF/springmvc-rp-servlet.xml, the following snippet show the injection of the rpStatsComponets

 

<bean id="rpStatisticsController"
  class="org.dspace.app.webui.cris.controller.statistics.CrisStatisticsController">
 <property name="solrConfig">
  <ref bean="solrConfig" />
 </property>
 <property name="statsComponentsService">
  <ref bean="rpStatisticRequestsManager" />
 </property>
 …

 

The rpStatisticRequestsManager is indeed defined in

[webapp-JSPUI]/WEB-INF/spring/applicationContext-rp.xml

 

<bean id="rpStatisticRequestsManager" factory-bean="researcher"
    factory-method="getRPStatsComponents" />

 

where the factory bean researcher is only used to access the upper level “dspace-api” Spring Context.

  • No labels