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.

...

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.

...

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

In 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

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

...

    • .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,\
        
Code Block
languagexml
themeEclipse
<bean class="org.dspace.app.webui.cris.components.ExploreMapProcessors" id="org.dspace.app.webui.cris.discovery.GlobalFacetProcessor,\
        org.dspace.app.webui.components.ExploreMapProcessors">
	<property name="processorsMap">
		<map>
				<entry key="publications">
					<list>
						<bean class="MostViewedMetricItemSite,\
        org.dspace.app.webui.cris.components.BrowseProcessor">
							...
							</bean>
					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>		...
						</list>
				</entry>
				<entry key="researcherprofilesgroup-left">
					...<list>
				</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

		<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.

...

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">
GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="browseNames">
		<list>
"name" value="fundings"/>					<value>itemdept</value>
			<value>author</value>
			<value>title</value>
			<value>type<</value>bean>
			<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.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="name" value="journal"/>							
						</bean>
						<bean class="org.dspace.app.webui.crisdiscovery.componentsGlobalFacetProcessorConfigurator.TopObjectsProcessorInnerGlobalFacetProcessorConfigurator">
							<property name="viewConfigurationname" refvalue="dspaceitemsLayoutViewevents" />
	<property name="type" value="recentsubmission" />
	<property name="sortField" value="dateaccessioned_dt" />
	<property name="order" value="desc" />
	<property name="num" value="4" />
</bean>
<bean 							
						</bean>
					</list>				
				</entry>
				<entry key="group-right">
					<list>
						<bean
							class="org.dspace.app.webui.crisdiscovery.componentsGlobalFacetProcessorConfigurator.TopObjectsProcessorInnerGlobalFacetProcessorConfigurator">
							<property name="viewConfigurationname" refvalue="dspaceitemsLayoutViewpublications" />
							<!-- <property name="typesecondLevelFacet"> value="view"<list> <value>itemtype</>value> 
	<property name="sortField" value="crismetrics_view" />
	<property name="order" value="desc" />
	<property name="extraInfo">
		<value>crismetrics_view</value>
	</property>
								</list> </property> -->
						</bean>
						<bean
							class="org.dspace.app.webui.discovery.GlobalFacetProcessorConfigurator.InnerGlobalFacetProcessorConfigurator">
							<property name="numname" value="4conferencematerials" />
</bean>

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

 

...

						</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.)