Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add details about the list layouts

Table of Contents

Custom JSPs

To customize the presentation of the data of a CRIS entity other than rearranging the order of the data inside a box and deciding positioning, see “Group Metadata, aka boxes”, the system allow you to define your custom JSPs used instead of the out-of-box layout.

...

The snippet below show the default configuration for the Researcher Page components Service

...

Code Block
languagexml
themeEclipse
<!-- Components -->
<bean id="rpComponentsService" class="org.dspace.app.cris.integration.CrisComponentsService">
 <property name="components">
  <map>
   <entry key="dspaceitems" value-ref="publicationlist" />
   <entry key="projects" value-ref="projectlist" />
  </map>
 </property>
</bean>

...

Tip
For every components, a box with the same name and a custom JSP file must be defined. Placing such box in one or more Tab will enable the components component execution and visualization.


Warning

Components are evaluated (executed) only when a tab including its associated box is requested. If the components is not associated to any box or the box is not included in a visualized tab the code used by the component is not executed and the additional information retrieved by the components are not available. If you need to extend the visualization of a CRIS entity and you need some extra code to be always executed you can use the processors (see below)

Out-of-box the system include configurable components to explore inverse relationship between a CRIS object and DSpace items and a CRIS object and other CRIS objects. This approach other than be time saving make also the data model more consistent avoiding the creation of Out-of-box the system include configurable components to explore inverse relationship between a CRIS object and DSpace items and a CRIS object and other CRIS objects. This approach other than be time saving make also the data model more consistent avoiding the creation of wrong unilateral relationship. For example: if a researcher belongs to a department it has to be set up a pointer field via UI (see “Field Definition”). However, the OrgUnit entity not need a pointer to track the relationships between the department and all its researchers. The component executes the appropriate SOLR query to retrieve the referencing objects. The snippet below show the configuration of the publicationList component for the ResearcherPage

...

Code Block
languagexml
themeEclipse
<!-- Publication component for RP -->
<bean id="publicationlist"
 class="org.dspace.app.webui.cris.components.ItemsConfigurerComponent">
 <property name="relationConfiguration" ref="relationRPVSItemConfiguration" />
 <property name="commonFilter">
 <util:constant static-field="org.dspace.app.webui.cris.util.RelationPreferenceUtil.HIDDEN_FILTER"/>  </property>   
 <property name="target" value="org.dspace.app.cris.model.ResearcherPage" />
 <property name="types">
  <map>
   <entry key="selected" value-ref="selectedComponent" />
   <entry key="journal" value-ref="journalComponent" />
   <entry key="conference" value-ref="conferenceComponent" />
   <entry key="book" value-ref="bookComponent" />
   <entry key="patent" value-ref="patentComponent" />
   <entry key="other" value-ref="otherComponent" />
  </map>
 </property>
</bean>

...

The configuration of the clustering categories are done using spring beans. The snippet below show the default configuration for a “journal article” category applied to the publication list 

Code Block
languagexml
themeEclipse
<bean id="journalComponent" class="org.dspace.app.webui.cris.components.BeanFacetComponent">
 <property name="componentIdentifier" value="journal" />
 <property name="facetQuery">
  <value>dc.type:Article -relationpreferences.crisrp.publications.selected:{1}</value>
 </property>
 <property name="order"><value>asc</value></property>
 <property name="rpp"><value>20</value></property>
 <property name="sortby"><value>1</value></property> 
</bean>

...

Tip

The default configuration exclude the selected publications from their native category (article, book, etc.) so to have not overlapping categories but it can easily be changed modified the facet query definition removing the

-relationpreferences.crisrp.publications.selected:{1}

CRIS Processors

...

Tip

This feature has been introduced in DSpace-CRIS 5.5

A processor is a JAVA class that implements the interface org.dspace.app.cris.util.ICrisHomeProcessor<ACO extends ACrisObject> allowing the execution of extra code any times that a specific type of entity (Researcher Page, OrgUnits, etc.) is visualized. It has access to the request object so can provide additional information to a custom view to visualize more information maybe retrieved from external system or other dynamic behaviors.

It is the transposition to the CRIS entities of the DSpace Processor (Site, Item, Community, Collection in org.dspace.plugin).

Out of box it is provided the org.dspace.app.webui.cris.metrics.MetricsCrisHomeProcessor<ACO> that enable the retrieve and visualization of the metrics available for a specific object, it is defined as a spring bean in 

[dspace-installDir]/config/spring/cris/cris-processor.xml

Code Block
languagexml
themeEclipse
	<bean class="org.dspace.app.webui.cris.metrics.MetricsCrisHomeProcessor"
		id="rpHomeProcessor">
		<property name="configurator" ref="org.dspace.app.webui.cris.metrics.MetricsProcessorConfigurator"/>
		<property name="rankingLevels">
			<list>
				<value>1</value>
				<value>5</value>
				<value>10</value>
				<value>20</value>
				<value>50</value>
			</list>
		</property>
		<property name="metricTypes">
			<list>
				<value>view_aggregate</value>
				<value>download_aggregate</value>
				<value>scopus_aggregate</value>
				<value>scopus_count</value>
				<value>wos_aggregate</value>
				<value>wos_count</value>
				<value>pubmed_aggregate</value>
				<value>pubmed_count</value>
			</list>
		</property>
		<property name="clazz" value="org.dspace.app.cris.model.ResearcherPage" />
		<property name="searchService" ref="org.dspace.discovery.SearchService" />
	</bean>

Customize the Home page

The home page includes a number of static text that can be edited using the Edit news functionality and dynamic content generated by SiteProcessor.

In addition to what is provided by a standard DSpace the following improvements and extra functionalities are available:

  • It is possible to configure a footer news editable from the Edit news admin functionality that is shown in all the public pages
  • A processor that build an infographics of the site contents aggregating the entities types under three icons
    • org.dspace.app.webui.discovery.GlobalFacetProcessor
  • There are three additional process that allow to list in the home page the top items sorted respectively by number of citations, number of view, number of download
    • org.dspace.app.webui.components.MostViewedMetricItemSite
    • org.dspace.app.webui.components.MostDownloadedMetricItemSite
    • org.dspace.app.webui.components.MostCitedItemSite

These functionalities are all than the MostCitedItemSite plugin enabled by default in the DSpace-CRIS home.jsp and dspace.cfg configuration

Code Block
themeEclipse
plugin.sequence.org.dspace.plugin.SiteHomeProcessor = \
        org.dspace.app.webui.components.RecentSiteSubmissions,\
        org.dspace.app.webui.discovery.GlobalFacetProcessor,\
        org.dspace.app.webui.components.MostViewedMetricItemSite,\
        org.dspace.app.webui.components.MostDownloadedMetricItemSite

The org.dspace.app.webui.discovery.GlobalFacetProcessor is configured as a spring bean in  [dspace-installDir/config/spring/cris/cris-layout-processor.xml

Code Block
languagexml
themeEclipse
<bean class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator" name="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator">		
		<property name="groups">
			<map>
				<entry key="group-left">
					<list>
						<bean class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="researcherprofiles"/>							
						</bean>		
					</list>				
				</entry>
				<entry key="group-center">
					<list>
						<bean class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="orgunits"/>							
						</bean>
						<bean class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="fundings"/>							
						</bean>
						<bean class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="journal"/>							
						</bean>
						<bean class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="events"/>							
						</bean>
					</list>				
				</entry>
				<entry key="group-right">
					<list>
						<bean
							class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="publications" />
							<!-- <property name="secondLevelFacet"> <list> <value>itemtype</value> 
								</list> </property> -->
						</bean>
						<bean
							class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="conferencematerials" />
						</bean>
						<bean
							class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="datasets" />
						</bean>
						<bean
							class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="patents" />
						</bean>
						<bean
							class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="theses" />
						</bean>
						<bean
							class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="others" />
						</bean>
					</list>			
				</entry>
			</map>
		</property>
	</bean>

To enable the MostCitedItemSite it is necessary to add the processor to the previous configuration snippet and configure the retrieval of the citation counts from Pubmed, Scopus or Web of Science. See Integration with external databases

These processors are indeed based on the use of spring beans with the following ID viewedTopItemManager, downloadedTopItemManager and citedTopItemManager. So it is possible further customize the behavior editing the spring definition that can be found in [dspace-installDir/config/spring/cris/cris-processor.xml

Code Block
languagexml
themeEclipse
	<bean class="org.dspace.app.webui.components.TopItemManager"
		name="citedTopItemManager">
		<property name="sortCriteria" value="scopus" />
		<property name="searchService" ref="org.dspace.discovery.SearchService" />
		<property name="maxResults" value="5" />
	</bean>

For example changing the sortCriteria from scopus to pubmed the component will list the first five publications (maxResults) for number of citation in Pubmed (assuming that pubmed is the name assigned to the pubmed citation count metric).

Defining the site sections (Explore)

Tip

This feature has been introduced in DSpace-CRIS 5.5

It is possible to highlight specific area of the database defining an entry page for each section. The sections are automatically defined as the entity types defined by the Global Search configuration but not all the entity types need to be included in the top navigation bar.

The section / entity type included in the navigation bar are defined by the following property in the [dspace-installDir]/config/modules/cris.cfg

Code Block
themeEclipse
navbar.cris-entities = publications,researcherprofiles,orgunits,fundings

For each section it is possible to define which browses proposes and which dynamic components include. The system looks up for a Singleton Service id org.dspace.app.webui.cris.components.ExploreMapProcessors by default it is defined in  [dspace-installDir]/config/spring/cris-processor.xml indeed each piece of information to include in the section page is linked to an ExploreProcessor

Code Block
languagexml
themeEclipse
<bean class="org.dspace.app.webui.cris.components.ExploreMapProcessors" id="org.dspace.app.webui.cris.components.ExploreMapProcessors">
	<property name="processorsMap">
		<map>
				<entry key="publications">
					<list>
						<bean class="org.dspace.app.webui.cris.components.BrowseProcessor">
							...
							</bean>
							...
						</list>
				</entry>
				<entry key="researcherprofiles">
					...
				</entry>
				...
			</map>
	</property>
</bean>

each section is an entry of in the above map containing a list of implementation of the org.dspace.app.webui.cris.components.ExploreProcessor interface.

By default two implementations of such interface are available

  • org.dspace.app.webui.cris.components.BrowseProcessor - it allows to set the list of browse to include in the section
  • org.dspace.app.webui.cris.components.TopObjectsProcessor - it allows to configure a list a top objects customizing the sorting criteria (most recent, most viewed, most downloaded, etc.)

The following configuration snippet define six browses to include in that specific order in a section

Code Block
languagexml
themeEclipse
<bean class="org.dspace.app.webui.cris.components.BrowseProcessor">
	<property name="browseNames">
		<list>
			<value>itemdept</value>
			<value>author</value>
			<value>title</value>
			<value>type</value>
			<value>dateissued</value>
			<value>subject</value>
		</list>
	</property>
</bean>

here an two examples of configuration for the TopObjectsProcessor

Code Block
languagexml
themeEclipse
<bean class="org.dspace.app.webui.cris.components.TopObjectsProcessor">
	<property name="viewConfiguration" ref="dspaceitemsLayoutView" />
	<property name="type" value="recentsubmission" />
	<property name="sortField" value="dateaccessioned_dt" />
	<property name="order" value="desc" />
	<property name="num" value="4" />
</bean>
<bean class="org.dspace.app.webui.cris.components.TopObjectsProcessor">
	<property name="viewConfiguration" ref="dspaceitemsLayoutView" />
	<property name="type" value="view" />
	<property name="sortField" value="crismetrics_view" />
	<property name="order" value="desc" />
	<property name="extraInfo">
		<value>crismetrics_view</value>
	</property>
	<property name="num" value="4" />
</bean>

The indexes proposed for the advanced search are instead derived by the discovery configuration associated with the entity type alias (publications, researcherprofiles, etc.)

Defining a list layout

The Global search and the previous defined processor (TopObjects, etc.) used in the section explore and in the home page refer to a "viewConfiguration" that is usually defined in the config/spring/api/global-list-layout.xml file

The file contains one or more bean definitions for the class org.dspace.discovery.configuration.DiscoveryViewConfiguration

Code Block
languagexml
<bean id="dspaceitemsLayoutView"
		class="org.dspace.discovery.configuration.DiscoveryViewConfiguration">
		<property name="metadataHeadingFields">
			<list>
				<bean
					class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
					<property name="mandatory" value="true" />
					<property name="preHtml" value="<b>" />
					<property name="postHtml" value="</b>" />
					<property name="field" value="dc.title" />
					<property name="decorator" value="title" />
				</bean>
				<bean
					class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
					<property name="mandatory" value="true" />
					<property name="preHtml" value="<span class='text-muted'>" />
					<property name="postHtml" value="</span><br/>" />
					<property name="field" value="dc.contributor.author" />
					<property name="decorator" value="itemcrisref" />
				</bean>
				<bean
					class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
					<property name="mandatory" value="true" />
					<property name="postHtml" value="<br/>" />
					<property name="field" value="dc.identifier.citation" />
				</bean>
				<bean
					class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
					<property name="mandatory" value="true" />
					<property name="preHtml" value="<small>" />
					<property name="postHtml" value="</small>" />
					<property name="field" value="dc.type" />
				</bean>
			</list>
		</property>
		<property name="metadataDescriptionFields">
			<list>
				<bean
					class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
					<property name="field" value="dc.subject" />
					<property name="postHtml" value="<br />" />
				</bean>
				<bean
					class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
					<property name="field" value="dc.description.abstract" />
					<property name="postHtml" value="<br />" />
				</bean>
			</list>
		</property>
	</bean>


The bean has two properties

  • metadataHeadingFields: defines which metadata are included as heading of each result
  • metadataDescriptionFields: defines which metadata are listed in a key - value layout under each result

both properties accept a list of DiscoveryViewFieldConfiguration beans with the following properties

  • mandatory: default false, if true the information will be always displayed. Otherwise it is only displayed if the field match the user query, in such case a snippet of the content is presented
  • preHtml and postHtml: any additional html code to include before and after the value. Please note that empty values will be always skipped
  • field: the metadata to use
  • decorator: an optional reference to a org.dspace.app.webui.util.IDisplayMetadataValueStrategy  plugin defined in the dspace.cfg (the plugin name must be used, i.e. itemcrisref, doi, etc.)