mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 13:03:11 +00:00
[DS-1144] Maven Project Consolidation : Discovery
This commit is contained in:
@@ -188,6 +188,12 @@
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -15,10 +15,6 @@
|
||||
package org.dspace.discovery.configuration;
|
||||
|
||||
|
||||
import org.apache.commons.collections.iterators.ArrayListIterator;
|
||||
import org.dspace.discovery.DiscoverQuery;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>dspace-discovery-jspui-api</artifactId>
|
||||
<name>DSpace Discovery :: Discovery JSPUI API</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-jspui-api</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>solr-solrj</artifactId>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.flexjson</groupId>
|
||||
<artifactId>flexjson</artifactId>
|
||||
<version>2.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- external -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@@ -1,102 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>war</packaging>
|
||||
<artifactId>dspace-discovery-jspui-webapp</artifactId>
|
||||
<name>DSpace Discovery :: Discovery JSPUI Webapp</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-jspui-api</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>solr-solrj</artifactId>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-jspui-api</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- external -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<archiveClasses>false</archiveClasses>
|
||||
<attachClasses>true</attachClasses>
|
||||
<classesClassifier>classes</classesClassifier>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
|
||||
<warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
|
||||
<webResources>
|
||||
<resource>
|
||||
<filtering>true</filtering>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>WEB-INF/web.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.mycila.maven-license-plugin</groupId>
|
||||
<artifactId>maven-license-plugin</artifactId>
|
||||
<configuration>
|
||||
<!--Exclude license check for Discovery files which don't need it-->
|
||||
<excludes>
|
||||
<exclude>**/*.LICENSE</exclude>
|
||||
<exclude>**/jquery*</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<index>true</index>
|
||||
<manifestEntries>
|
||||
<Cocoon-Block-Name>discovery-xmlui-block</Cocoon-Block-Name>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
-->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -1,100 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<name>DSpace Discovery :: Discovery Provider Library</name>
|
||||
<description>
|
||||
|
||||
|
||||
|
||||
Build Information
|
||||
$Id: pom.xml 5367 2010-09-30 00:30:11Z mdiggory $
|
||||
$URL: https://scm.dspace.org/svn/repo/modules/dspace-discovery/trunk/provider/pom.xml $
|
||||
</description>
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.cocoon</groupId>
|
||||
<artifactId>cocoon-maven-plugin</artifactId>
|
||||
<version>1.0.0-M2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>prepare</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.7</version>
|
||||
<configuration>
|
||||
<connectors>
|
||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<port>8888</port>
|
||||
<maxIdleTime>30000</maxIdleTime>
|
||||
</connector>
|
||||
</connectors>
|
||||
<webAppSourceDirectory>${project.build.directory}/rcl/webapp</webAppSourceDirectory>
|
||||
<contextPath>/</contextPath>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>org.apache.cocoon.mode</name>
|
||||
<value>dev</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestEntries>
|
||||
<Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
-->
|
||||
<plugin>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-solr</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<name>DSpace Discovery :: Discovery Solr Implementation</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
<artifactId>solr-solrj</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
@@ -1,119 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-xmlui-api</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<name>DSpace Discovery :: Discovery XMLUI API</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-xmlui-api</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>solr-solrj</artifactId>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- external -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.cocoon</groupId>
|
||||
<artifactId>cocoon-maven-plugin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>prepare</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<archiveClasses>false</archiveClasses>
|
||||
<attachClasses>true</attachClasses>
|
||||
<classesClassifier>classes</classesClassifier>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
|
||||
<warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.7</version>
|
||||
<configuration>
|
||||
<connectors>
|
||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<port>8888</port>
|
||||
<maxIdleTime>30000</maxIdleTime>
|
||||
</connector>
|
||||
</connectors>
|
||||
<webAppSourceDirectory>${project.build.directory}/rcl/webapp</webAppSourceDirectory>
|
||||
<contextPath>/</contextPath>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>org.apache.cocoon.mode</name>
|
||||
<value>dev</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<index>true</index>
|
||||
<manifestEntries>
|
||||
<Cocoon-Block-Name>discovery-xmlui-block</Cocoon-Block-Name>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
-->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -1,139 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>war</packaging>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-xmlui-webapp</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<name>DSpace Discovery :: Discovery XMLUI Webapp</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-xmlui-api</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>solr-solrj</artifactId>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-xmlui-api</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- external -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.cocoon</groupId>
|
||||
<artifactId>cocoon-maven-plugin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>prepare</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<archiveClasses>false</archiveClasses>
|
||||
<attachClasses>true</attachClasses>
|
||||
<classesClassifier>classes</classesClassifier>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
|
||||
<warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
|
||||
<webResources>
|
||||
<resource>
|
||||
<filtering>true</filtering>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>WEB-INF/web.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.7</version>
|
||||
<configuration>
|
||||
<connectors>
|
||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<port>8888</port>
|
||||
<maxIdleTime>30000</maxIdleTime>
|
||||
</connector>
|
||||
</connectors>
|
||||
<webAppSourceDirectory>${project.build.directory}/rcl/webapp</webAppSourceDirectory>
|
||||
<contextPath>/</contextPath>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>org.apache.cocoon.mode</name>
|
||||
<value>dev</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.mycila.maven-license-plugin</groupId>
|
||||
<artifactId>maven-license-plugin</artifactId>
|
||||
<configuration>
|
||||
<!--Exclude license check for Discovery files which don't need it-->
|
||||
<excludes>
|
||||
<exclude>**/*.LICENSE</exclude>
|
||||
<exclude>**/jquery*</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<index>true</index>
|
||||
<manifestEntries>
|
||||
<Cocoon-Block-Name>discovery-xmlui-block</Cocoon-Block-Name>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
-->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -16,12 +16,6 @@
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>dspace-discovery-provider</module>
|
||||
<module>dspace-discovery-solr</module>
|
||||
<module>dspace-discovery-xmlui-api</module>
|
||||
<module>dspace-discovery-xmlui-webapp</module>
|
||||
<module>dspace-discovery-jspui-api</module>
|
||||
<module>dspace-discovery-jspui-webapp</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
|
@@ -68,6 +68,12 @@
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.flexjson</groupId>
|
||||
<artifactId>flexjson</artifactId>
|
||||
<version>2.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,82 +1,82 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.webui.discovery;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.dspace.app.webui.json.JSONRequest;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.discovery.DiscoverQuery;
|
||||
import org.dspace.discovery.DiscoverResult;
|
||||
import org.dspace.discovery.DiscoverResult.FacetResult;
|
||||
import org.dspace.discovery.SearchUtils;
|
||||
|
||||
import flexjson.JSONSerializer;
|
||||
|
||||
public class DiscoveryJSONRequest extends JSONRequest
|
||||
{
|
||||
|
||||
public void doJSONRequest(Context context, HttpServletRequest request,
|
||||
HttpServletResponse resp) throws AuthorizeException, IOException
|
||||
{
|
||||
String reqPath = request.getPathInfo();
|
||||
// remove the first slash if present
|
||||
if (reqPath.startsWith("/"))
|
||||
{
|
||||
reqPath = reqPath.substring(1);
|
||||
}
|
||||
|
||||
if (reqPath.equalsIgnoreCase(getSubPath() + "/autocomplete"))
|
||||
{
|
||||
doAutocomplete(context, request, resp);
|
||||
return;
|
||||
}
|
||||
// unkwon action (in future we can implement ajax for pagination, etc.)
|
||||
resp.sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||
return;
|
||||
}
|
||||
|
||||
private void doAutocomplete(Context context, HttpServletRequest request,
|
||||
HttpServletResponse resp)
|
||||
{
|
||||
try
|
||||
{
|
||||
DSpaceObject scope = DiscoverUtility.getSearchScope(context,
|
||||
request);
|
||||
DiscoverQuery autocompleteQuery = DiscoverUtility
|
||||
.getDiscoverAutocomplete(context, request, scope);
|
||||
DiscoverResult qResults = SearchUtils.getSearchService().search(
|
||||
context, autocompleteQuery);
|
||||
// extract the only facet present in the result response
|
||||
Set<String> facets = qResults.getFacetResults().keySet();
|
||||
List<FacetResult> fResults = new ArrayList<DiscoverResult.FacetResult>();
|
||||
if (facets != null && facets.size() > 0)
|
||||
{
|
||||
String autocompleteField = (String) facets.toArray()[0];
|
||||
fResults = qResults
|
||||
.getFacetResult(autocompleteField);
|
||||
}
|
||||
JSONSerializer serializer = new JSONSerializer();
|
||||
serializer.rootName("autocomplete");
|
||||
serializer.exclude("class","asFilterQuery");
|
||||
serializer.deepSerialize(fResults, resp.getWriter());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.webui.discovery;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.dspace.app.webui.json.JSONRequest;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.discovery.DiscoverQuery;
|
||||
import org.dspace.discovery.DiscoverResult;
|
||||
import org.dspace.discovery.DiscoverResult.FacetResult;
|
||||
import org.dspace.discovery.SearchUtils;
|
||||
|
||||
import flexjson.JSONSerializer;
|
||||
|
||||
public class DiscoveryJSONRequest extends JSONRequest
|
||||
{
|
||||
|
||||
public void doJSONRequest(Context context, HttpServletRequest request,
|
||||
HttpServletResponse resp) throws AuthorizeException, IOException
|
||||
{
|
||||
String reqPath = request.getPathInfo();
|
||||
// remove the first slash if present
|
||||
if (reqPath.startsWith("/"))
|
||||
{
|
||||
reqPath = reqPath.substring(1);
|
||||
}
|
||||
|
||||
if (reqPath.equalsIgnoreCase(getSubPath() + "/autocomplete"))
|
||||
{
|
||||
doAutocomplete(context, request, resp);
|
||||
return;
|
||||
}
|
||||
// unkwon action (in future we can implement ajax for pagination, etc.)
|
||||
resp.sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||
return;
|
||||
}
|
||||
|
||||
private void doAutocomplete(Context context, HttpServletRequest request,
|
||||
HttpServletResponse resp)
|
||||
{
|
||||
try
|
||||
{
|
||||
DSpaceObject scope = DiscoverUtility.getSearchScope(context,
|
||||
request);
|
||||
DiscoverQuery autocompleteQuery = DiscoverUtility
|
||||
.getDiscoverAutocomplete(context, request, scope);
|
||||
DiscoverResult qResults = SearchUtils.getSearchService().search(
|
||||
context, autocompleteQuery);
|
||||
// extract the only facet present in the result response
|
||||
Set<String> facets = qResults.getFacetResults().keySet();
|
||||
List<FacetResult> fResults = new ArrayList<DiscoverResult.FacetResult>();
|
||||
if (facets != null && facets.size() > 0)
|
||||
{
|
||||
String autocompleteField = (String) facets.toArray()[0];
|
||||
fResults = qResults
|
||||
.getFacetResult(autocompleteField);
|
||||
}
|
||||
JSONSerializer serializer = new JSONSerializer();
|
||||
serializer.rootName("autocomplete");
|
||||
serializer.exclude("class","asFilterQuery");
|
||||
serializer.deepSerialize(fResults, resp.getWriter());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,484 +1,483 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.webui.discovery;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dspace.app.bulkedit.DSpaceCSV;
|
||||
import org.dspace.app.bulkedit.MetadataExport;
|
||||
import org.dspace.app.util.OpenSearch;
|
||||
import org.dspace.app.util.SyndicationFeed;
|
||||
import org.dspace.app.webui.search.SearchProcessorException;
|
||||
import org.dspace.app.webui.search.SearchRequestProcessor;
|
||||
import org.dspace.app.webui.util.JSPManager;
|
||||
import org.dspace.app.webui.util.UIUtil;
|
||||
import org.dspace.authorize.AuthorizeManager;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.content.ItemIterator;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.I18nUtil;
|
||||
import org.dspace.core.LogManager;
|
||||
import org.dspace.discovery.DiscoverQuery;
|
||||
import org.dspace.discovery.DiscoverResult;
|
||||
import org.dspace.discovery.SearchServiceException;
|
||||
import org.dspace.discovery.SearchUtils;
|
||||
import org.dspace.discovery.configuration.DiscoveryConfiguration;
|
||||
import org.dspace.discovery.configuration.DiscoverySearchFilter;
|
||||
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
|
||||
import org.dspace.discovery.configuration.DiscoverySortFieldConfiguration;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
public class DiscoverySearchRequestProcessor implements SearchRequestProcessor
|
||||
{
|
||||
private static String msgKey = "org.dspace.app.webui.servlet.FeedServlet";
|
||||
|
||||
/** log4j category */
|
||||
private static Logger log = Logger.getLogger(DiscoverySearchRequestProcessor.class);
|
||||
|
||||
// locale-sensitive metadata labels
|
||||
private Map<String, Map<String, String>> localeLabels = null;
|
||||
|
||||
public synchronized void init()
|
||||
{
|
||||
if (localeLabels == null)
|
||||
{
|
||||
localeLabels = new HashMap<String, Map<String, String>>();
|
||||
}
|
||||
}
|
||||
|
||||
public void doOpenSearch(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws SearchProcessorException,
|
||||
IOException, ServletException
|
||||
{
|
||||
init();
|
||||
|
||||
// dispense with simple service document requests
|
||||
String scope = request.getParameter("scope");
|
||||
if (scope != null && "".equals(scope))
|
||||
{
|
||||
scope = null;
|
||||
}
|
||||
String path = request.getPathInfo();
|
||||
if (path != null && path.endsWith("description.xml"))
|
||||
{
|
||||
String svcDescrip = OpenSearch.getDescription(scope);
|
||||
response.setContentType(OpenSearch
|
||||
.getContentType("opensearchdescription"));
|
||||
response.setContentLength(svcDescrip.length());
|
||||
response.getWriter().write(svcDescrip);
|
||||
return;
|
||||
}
|
||||
|
||||
// get enough request parameters to decide on action to take
|
||||
String format = request.getParameter("format");
|
||||
if (format == null || "".equals(format))
|
||||
{
|
||||
// default to atom
|
||||
format = "atom";
|
||||
}
|
||||
|
||||
// do some sanity checking
|
||||
if (!OpenSearch.getFormats().contains(format))
|
||||
{
|
||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
||||
return;
|
||||
}
|
||||
|
||||
// then the rest - we are processing the query
|
||||
DSpaceObject container;
|
||||
try
|
||||
{
|
||||
container = DiscoverUtility.getSearchScope(context,
|
||||
request);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||
request, container, false);
|
||||
String query = queryArgs.getQuery();
|
||||
|
||||
// Perform the search
|
||||
DiscoverResult qResults = null;
|
||||
try
|
||||
{
|
||||
qResults = SearchUtils.getSearchService().search(context,
|
||||
container, queryArgs);
|
||||
}
|
||||
catch (SearchServiceException e)
|
||||
{
|
||||
log.error(
|
||||
LogManager.getHeader(context, "opensearch", "query="
|
||||
+ queryArgs.getQuery() + ",scope=" + scope
|
||||
+ ",error=" + e.getMessage()), e);
|
||||
throw new RuntimeException(e.getMessage(), e);
|
||||
}
|
||||
|
||||
// Log
|
||||
log.info(LogManager.getHeader(context, "opensearch",
|
||||
"scope=" + scope + ",query=\"" + query + "\",results=("
|
||||
+ qResults.getTotalSearchResults() + ")"));
|
||||
|
||||
// format and return results
|
||||
Map<String, String> labelMap = getLabels(request);
|
||||
DSpaceObject[] dsoResults = new DSpaceObject[qResults
|
||||
.getDspaceObjects().size()];
|
||||
qResults.getDspaceObjects().toArray(dsoResults);
|
||||
Document resultsDoc = OpenSearch.getResultsDoc(format, query,
|
||||
(int)qResults.getTotalSearchResults(), qResults.getStart(),
|
||||
qResults.getMaxResults(), container, dsoResults, labelMap);
|
||||
try
|
||||
{
|
||||
Transformer xf = TransformerFactory.newInstance().newTransformer();
|
||||
response.setContentType(OpenSearch.getContentType(format));
|
||||
xf.transform(new DOMSource(resultsDoc),
|
||||
new StreamResult(response.getWriter()));
|
||||
}
|
||||
catch (TransformerException e)
|
||||
{
|
||||
log.error(e);
|
||||
throw new ServletException(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, String> getLabels(HttpServletRequest request)
|
||||
{
|
||||
// Get access to the localized resource bundle
|
||||
Locale locale = UIUtil.getSessionLocale(request);
|
||||
Map<String, String> labelMap = localeLabels.get(locale.toString());
|
||||
if (labelMap == null)
|
||||
{
|
||||
labelMap = getLocaleLabels(locale);
|
||||
localeLabels.put(locale.toString(), labelMap);
|
||||
}
|
||||
return labelMap;
|
||||
}
|
||||
|
||||
private Map<String, String> getLocaleLabels(Locale locale)
|
||||
{
|
||||
Map<String, String> labelMap = new HashMap<String, String>();
|
||||
labelMap.put(SyndicationFeed.MSG_UNTITLED, I18nUtil.getMessage(msgKey + ".notitle", locale));
|
||||
labelMap.put(SyndicationFeed.MSG_LOGO_TITLE, I18nUtil.getMessage(msgKey + ".logo.title", locale));
|
||||
labelMap.put(SyndicationFeed.MSG_FEED_DESCRIPTION, I18nUtil.getMessage(msgKey + ".general-feed.description", locale));
|
||||
labelMap.put(SyndicationFeed.MSG_UITYPE, SyndicationFeed.UITYPE_JSPUI);
|
||||
for (String selector : SyndicationFeed.getDescriptionSelectors())
|
||||
{
|
||||
labelMap.put("metadata." + selector, I18nUtil.getMessage(SyndicationFeed.MSG_METADATA + selector, locale));
|
||||
}
|
||||
return labelMap;
|
||||
}
|
||||
|
||||
public void doSimpleSearch(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws SearchProcessorException,
|
||||
IOException, ServletException
|
||||
{
|
||||
Item[] resultsItems;
|
||||
Collection[] resultsCollections;
|
||||
Community[] resultsCommunities;
|
||||
DSpaceObject scope;
|
||||
try
|
||||
{
|
||||
scope = DiscoverUtility.getSearchScope(context, request);
|
||||
}
|
||||
catch (IllegalStateException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
|
||||
DiscoveryConfiguration discoveryConfiguration = SearchUtils
|
||||
.getDiscoveryConfiguration(scope);
|
||||
List<DiscoverySortFieldConfiguration> sortFields = discoveryConfiguration
|
||||
.getSearchSortConfiguration().getSortFields();
|
||||
List<String> sortOptions = new ArrayList<String>();
|
||||
for (DiscoverySortFieldConfiguration sortFieldConfiguration : sortFields)
|
||||
{
|
||||
String sortField = SearchUtils.getSearchService().toSortFieldIndex(
|
||||
sortFieldConfiguration.getMetadataField(),
|
||||
sortFieldConfiguration.getType());
|
||||
sortOptions.add(sortField);
|
||||
}
|
||||
request.setAttribute("sortOptions", sortOptions);
|
||||
|
||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||
request, scope, true);
|
||||
|
||||
List<DiscoverySearchFilterFacet> availableFacet = discoveryConfiguration
|
||||
.getSidebarFacets();
|
||||
|
||||
request.setAttribute("facetsConfig",
|
||||
availableFacet != null ? availableFacet
|
||||
: new ArrayList<DiscoverySearchFilterFacet>());
|
||||
int etal = UIUtil.getIntParameter(request, "etal");
|
||||
if (etal == -1)
|
||||
{
|
||||
etal = ConfigurationManager
|
||||
.getIntProperty("webui.itemlist.author-limit");
|
||||
}
|
||||
|
||||
request.setAttribute("etal", etal);
|
||||
|
||||
String query = queryArgs.getQuery();
|
||||
request.setAttribute("query", query);
|
||||
request.setAttribute("queryArgs", queryArgs);
|
||||
List<DiscoverySearchFilter> availableFilters = discoveryConfiguration
|
||||
.getSearchFilters();
|
||||
request.setAttribute("availableFilters", availableFilters);
|
||||
|
||||
List<String[]> appliedFilters = DiscoverUtility.getFilters(request);
|
||||
request.setAttribute("appliedFilters", appliedFilters);
|
||||
List<String> appliedFilterQueries = new ArrayList<String>();
|
||||
for (String[] filter : appliedFilters)
|
||||
{
|
||||
appliedFilterQueries.add(filter[0] + "::" + filter[1] + "::"
|
||||
+ filter[2]);
|
||||
}
|
||||
request.setAttribute("appliedFilterQueries", appliedFilterQueries);
|
||||
List<DSpaceObject> scopes = new ArrayList<DSpaceObject>();
|
||||
if (scope == null)
|
||||
{
|
||||
Community[] topCommunities;
|
||||
try
|
||||
{
|
||||
topCommunities = Community.findAllTop(context);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
for (Community com : topCommunities)
|
||||
{
|
||||
scopes.add(com);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
DSpaceObject pDso = scope.getParentObject();
|
||||
while (pDso != null)
|
||||
{
|
||||
// add to the available scopes in reverse order
|
||||
scopes.add(0, pDso);
|
||||
pDso = pDso.getParentObject();
|
||||
}
|
||||
scopes.add(scope);
|
||||
if (scope instanceof Community)
|
||||
{
|
||||
Community[] comms = ((Community) scope).getSubcommunities();
|
||||
for (Community com : comms)
|
||||
{
|
||||
scopes.add(com);
|
||||
}
|
||||
Collection[] colls = ((Community) scope).getCollections();
|
||||
for (Collection col : colls)
|
||||
{
|
||||
scopes.add(col);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
request.setAttribute("scope", scope);
|
||||
request.setAttribute("scopes", scopes);
|
||||
|
||||
// Perform the search
|
||||
DiscoverResult qResults = null;
|
||||
try
|
||||
{
|
||||
qResults = SearchUtils.getSearchService().search(context, scope,
|
||||
queryArgs);
|
||||
List<Community> resultsListComm = new ArrayList<Community>();
|
||||
List<Collection> resultsListColl = new ArrayList<Collection>();
|
||||
List<Item> resultsListItem = new ArrayList<Item>();
|
||||
|
||||
for (DSpaceObject dso : qResults.getDspaceObjects())
|
||||
{
|
||||
if (dso instanceof Item)
|
||||
{
|
||||
resultsListItem.add((Item) dso);
|
||||
}
|
||||
else if (dso instanceof Collection)
|
||||
{
|
||||
resultsListColl.add((Collection) dso);
|
||||
|
||||
}
|
||||
else if (dso instanceof Community)
|
||||
{
|
||||
resultsListComm.add((Community) dso);
|
||||
}
|
||||
}
|
||||
|
||||
// Make objects from the handles - make arrays, fill them out
|
||||
resultsCommunities = new Community[resultsListComm.size()];
|
||||
resultsCollections = new Collection[resultsListColl.size()];
|
||||
resultsItems = new Item[resultsListItem.size()];
|
||||
|
||||
resultsCommunities = resultsListComm.toArray(resultsCommunities);
|
||||
resultsCollections = resultsListColl.toArray(resultsCollections);
|
||||
resultsItems = resultsListItem.toArray(resultsItems);
|
||||
|
||||
// Log
|
||||
log.info(LogManager.getHeader(context, "search", "scope=" + scope
|
||||
+ ",query=\"" + query + "\",results=("
|
||||
+ resultsCommunities.length + ","
|
||||
+ resultsCollections.length + "," + resultsItems.length
|
||||
+ ")"));
|
||||
|
||||
// Pass in some page qualities
|
||||
// total number of pages
|
||||
long pageTotal = 1 + ((qResults.getTotalSearchResults() - 1) / qResults
|
||||
.getMaxResults());
|
||||
|
||||
// current page being displayed
|
||||
long pageCurrent = 1 + (qResults.getStart() / qResults
|
||||
.getMaxResults());
|
||||
|
||||
// pageLast = min(pageCurrent+3,pageTotal)
|
||||
long pageLast = ((pageCurrent + 3) > pageTotal) ? pageTotal
|
||||
: (pageCurrent + 3);
|
||||
|
||||
// pageFirst = max(1,pageCurrent-3)
|
||||
long pageFirst = ((pageCurrent - 3) > 1) ? (pageCurrent - 3) : 1;
|
||||
|
||||
// Pass the results to the display JSP
|
||||
request.setAttribute("items", resultsItems);
|
||||
request.setAttribute("communities", resultsCommunities);
|
||||
request.setAttribute("collections", resultsCollections);
|
||||
|
||||
request.setAttribute("pagetotal", new Long(pageTotal));
|
||||
request.setAttribute("pagecurrent", new Long(pageCurrent));
|
||||
request.setAttribute("pagelast", new Long(pageLast));
|
||||
request.setAttribute("pagefirst", new Long(pageFirst));
|
||||
|
||||
request.setAttribute("queryresults", qResults);
|
||||
|
||||
try
|
||||
{
|
||||
if (AuthorizeManager.isAdmin(context))
|
||||
{
|
||||
// Set a variable to create admin buttons
|
||||
request.setAttribute("admin_button", new Boolean(true));
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e); }
|
||||
|
||||
if ("submit_export_metadata".equals(UIUtil.getSubmitButton(request,
|
||||
"submit")))
|
||||
{
|
||||
exportMetadata(context, response, resultsItems);
|
||||
}
|
||||
}
|
||||
catch (SearchServiceException e)
|
||||
{
|
||||
log.error(
|
||||
LogManager.getHeader(context, "search", "query="
|
||||
+ queryArgs.getQuery() + ",scope=" + scope
|
||||
+ ",error=" + e.getMessage()), e);
|
||||
request.setAttribute("search.error", true);
|
||||
request.setAttribute("search.error.message", e.getMessage());
|
||||
}
|
||||
|
||||
JSPManager.showJSP(request, response, "/search/discovery.jsp");
|
||||
}
|
||||
|
||||
/**
|
||||
* Export the search results as a csv file
|
||||
*
|
||||
* @param context
|
||||
* The DSpace context
|
||||
* @param response
|
||||
* The request object
|
||||
* @param items
|
||||
* The result items
|
||||
* @throws IOException
|
||||
* @throws ServletException
|
||||
*/
|
||||
protected void exportMetadata(Context context,
|
||||
HttpServletResponse response, Item[] items) throws IOException,
|
||||
ServletException
|
||||
{
|
||||
// Log the attempt
|
||||
log.info(LogManager.getHeader(context, "metadataexport",
|
||||
"exporting_search"));
|
||||
|
||||
// Export a search view
|
||||
ArrayList iids = new ArrayList();
|
||||
for (Item item : items)
|
||||
{
|
||||
iids.add(item.getID());
|
||||
}
|
||||
ItemIterator ii = new ItemIterator(context, iids);
|
||||
MetadataExport exporter = new MetadataExport(context, ii, false);
|
||||
|
||||
// Perform the export
|
||||
DSpaceCSV csv = exporter.export();
|
||||
|
||||
// Return the csv file
|
||||
response.setContentType("text/csv; charset=UTF-8");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=search-results.csv");
|
||||
PrintWriter out = response.getWriter();
|
||||
out.write(csv.toString());
|
||||
out.flush();
|
||||
out.close();
|
||||
log.info(LogManager.getHeader(context, "metadataexport",
|
||||
"exported_file:search-results.csv"));
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for constructing the discovery advanced search form
|
||||
*
|
||||
* @author Andrea Bollini
|
||||
*/
|
||||
@Override
|
||||
public void doAdvancedSearch(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws SearchProcessorException,
|
||||
IOException, ServletException
|
||||
{
|
||||
// just redirect to the simple search servlet.
|
||||
// The advanced form is always displayed with Discovery togheter with
|
||||
// the search result
|
||||
// the first access to the advanced form performs a search for
|
||||
// "anythings" (SOLR *:*)
|
||||
response.sendRedirect(request.getContextPath() + "/simple-search");
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.webui.discovery;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dspace.app.bulkedit.DSpaceCSV;
|
||||
import org.dspace.app.bulkedit.MetadataExport;
|
||||
import org.dspace.app.util.OpenSearch;
|
||||
import org.dspace.app.util.SyndicationFeed;
|
||||
import org.dspace.app.webui.search.SearchProcessorException;
|
||||
import org.dspace.app.webui.search.SearchRequestProcessor;
|
||||
import org.dspace.app.webui.util.JSPManager;
|
||||
import org.dspace.app.webui.util.UIUtil;
|
||||
import org.dspace.authorize.AuthorizeManager;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.content.ItemIterator;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.I18nUtil;
|
||||
import org.dspace.core.LogManager;
|
||||
import org.dspace.discovery.DiscoverQuery;
|
||||
import org.dspace.discovery.DiscoverResult;
|
||||
import org.dspace.discovery.SearchServiceException;
|
||||
import org.dspace.discovery.SearchUtils;
|
||||
import org.dspace.discovery.configuration.DiscoveryConfiguration;
|
||||
import org.dspace.discovery.configuration.DiscoverySearchFilter;
|
||||
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
|
||||
import org.dspace.discovery.configuration.DiscoverySortFieldConfiguration;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
public class DiscoverySearchRequestProcessor implements SearchRequestProcessor
|
||||
{
|
||||
private static String msgKey = "org.dspace.app.webui.servlet.FeedServlet";
|
||||
|
||||
/** log4j category */
|
||||
private static Logger log = Logger.getLogger(DiscoverySearchRequestProcessor.class);
|
||||
|
||||
// locale-sensitive metadata labels
|
||||
private Map<String, Map<String, String>> localeLabels = null;
|
||||
|
||||
public synchronized void init()
|
||||
{
|
||||
if (localeLabels == null)
|
||||
{
|
||||
localeLabels = new HashMap<String, Map<String, String>>();
|
||||
}
|
||||
}
|
||||
|
||||
public void doOpenSearch(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws SearchProcessorException,
|
||||
IOException, ServletException
|
||||
{
|
||||
init();
|
||||
|
||||
// dispense with simple service document requests
|
||||
String scope = request.getParameter("scope");
|
||||
if (scope != null && "".equals(scope))
|
||||
{
|
||||
scope = null;
|
||||
}
|
||||
String path = request.getPathInfo();
|
||||
if (path != null && path.endsWith("description.xml"))
|
||||
{
|
||||
String svcDescrip = OpenSearch.getDescription(scope);
|
||||
response.setContentType(OpenSearch
|
||||
.getContentType("opensearchdescription"));
|
||||
response.setContentLength(svcDescrip.length());
|
||||
response.getWriter().write(svcDescrip);
|
||||
return;
|
||||
}
|
||||
|
||||
// get enough request parameters to decide on action to take
|
||||
String format = request.getParameter("format");
|
||||
if (format == null || "".equals(format))
|
||||
{
|
||||
// default to atom
|
||||
format = "atom";
|
||||
}
|
||||
|
||||
// do some sanity checking
|
||||
if (!OpenSearch.getFormats().contains(format))
|
||||
{
|
||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
||||
return;
|
||||
}
|
||||
|
||||
// then the rest - we are processing the query
|
||||
DSpaceObject container;
|
||||
try
|
||||
{
|
||||
container = DiscoverUtility.getSearchScope(context,
|
||||
request);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||
request, container, false);
|
||||
String query = queryArgs.getQuery();
|
||||
|
||||
// Perform the search
|
||||
DiscoverResult qResults = null;
|
||||
try
|
||||
{
|
||||
qResults = SearchUtils.getSearchService().search(context,
|
||||
container, queryArgs);
|
||||
}
|
||||
catch (SearchServiceException e)
|
||||
{
|
||||
log.error(
|
||||
LogManager.getHeader(context, "opensearch", "query="
|
||||
+ queryArgs.getQuery() + ",scope=" + scope
|
||||
+ ",error=" + e.getMessage()), e);
|
||||
throw new RuntimeException(e.getMessage(), e);
|
||||
}
|
||||
|
||||
// Log
|
||||
log.info(LogManager.getHeader(context, "opensearch",
|
||||
"scope=" + scope + ",query=\"" + query + "\",results=("
|
||||
+ qResults.getTotalSearchResults() + ")"));
|
||||
|
||||
// format and return results
|
||||
Map<String, String> labelMap = getLabels(request);
|
||||
DSpaceObject[] dsoResults = new DSpaceObject[qResults
|
||||
.getDspaceObjects().size()];
|
||||
qResults.getDspaceObjects().toArray(dsoResults);
|
||||
Document resultsDoc = OpenSearch.getResultsDoc(format, query,
|
||||
(int)qResults.getTotalSearchResults(), qResults.getStart(),
|
||||
qResults.getMaxResults(), container, dsoResults, labelMap);
|
||||
try
|
||||
{
|
||||
Transformer xf = TransformerFactory.newInstance().newTransformer();
|
||||
response.setContentType(OpenSearch.getContentType(format));
|
||||
xf.transform(new DOMSource(resultsDoc),
|
||||
new StreamResult(response.getWriter()));
|
||||
}
|
||||
catch (TransformerException e)
|
||||
{
|
||||
log.error(e);
|
||||
throw new ServletException(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, String> getLabels(HttpServletRequest request)
|
||||
{
|
||||
// Get access to the localized resource bundle
|
||||
Locale locale = UIUtil.getSessionLocale(request);
|
||||
Map<String, String> labelMap = localeLabels.get(locale.toString());
|
||||
if (labelMap == null)
|
||||
{
|
||||
labelMap = getLocaleLabels(locale);
|
||||
localeLabels.put(locale.toString(), labelMap);
|
||||
}
|
||||
return labelMap;
|
||||
}
|
||||
|
||||
private Map<String, String> getLocaleLabels(Locale locale)
|
||||
{
|
||||
Map<String, String> labelMap = new HashMap<String, String>();
|
||||
labelMap.put(SyndicationFeed.MSG_UNTITLED, I18nUtil.getMessage(msgKey + ".notitle", locale));
|
||||
labelMap.put(SyndicationFeed.MSG_LOGO_TITLE, I18nUtil.getMessage(msgKey + ".logo.title", locale));
|
||||
labelMap.put(SyndicationFeed.MSG_FEED_DESCRIPTION, I18nUtil.getMessage(msgKey + ".general-feed.description", locale));
|
||||
labelMap.put(SyndicationFeed.MSG_UITYPE, SyndicationFeed.UITYPE_JSPUI);
|
||||
for (String selector : SyndicationFeed.getDescriptionSelectors())
|
||||
{
|
||||
labelMap.put("metadata." + selector, I18nUtil.getMessage(SyndicationFeed.MSG_METADATA + selector, locale));
|
||||
}
|
||||
return labelMap;
|
||||
}
|
||||
|
||||
public void doSimpleSearch(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws SearchProcessorException,
|
||||
IOException, ServletException
|
||||
{
|
||||
Item[] resultsItems;
|
||||
Collection[] resultsCollections;
|
||||
Community[] resultsCommunities;
|
||||
DSpaceObject scope;
|
||||
try
|
||||
{
|
||||
scope = DiscoverUtility.getSearchScope(context, request);
|
||||
}
|
||||
catch (IllegalStateException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
|
||||
DiscoveryConfiguration discoveryConfiguration = SearchUtils
|
||||
.getDiscoveryConfiguration(scope);
|
||||
List<DiscoverySortFieldConfiguration> sortFields = discoveryConfiguration
|
||||
.getSearchSortConfiguration().getSortFields();
|
||||
List<String> sortOptions = new ArrayList<String>();
|
||||
for (DiscoverySortFieldConfiguration sortFieldConfiguration : sortFields)
|
||||
{
|
||||
String sortField = SearchUtils.getSearchService().toSortFieldIndex(
|
||||
sortFieldConfiguration.getMetadataField(),
|
||||
sortFieldConfiguration.getType());
|
||||
sortOptions.add(sortField);
|
||||
}
|
||||
request.setAttribute("sortOptions", sortOptions);
|
||||
|
||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||
request, scope, true);
|
||||
|
||||
List<DiscoverySearchFilterFacet> availableFacet = discoveryConfiguration
|
||||
.getSidebarFacets();
|
||||
|
||||
request.setAttribute("facetsConfig",
|
||||
availableFacet != null ? availableFacet
|
||||
: new ArrayList<DiscoverySearchFilterFacet>());
|
||||
int etal = UIUtil.getIntParameter(request, "etal");
|
||||
if (etal == -1)
|
||||
{
|
||||
etal = ConfigurationManager
|
||||
.getIntProperty("webui.itemlist.author-limit");
|
||||
}
|
||||
|
||||
request.setAttribute("etal", etal);
|
||||
|
||||
String query = queryArgs.getQuery();
|
||||
request.setAttribute("query", query);
|
||||
request.setAttribute("queryArgs", queryArgs);
|
||||
List<DiscoverySearchFilter> availableFilters = discoveryConfiguration
|
||||
.getSearchFilters();
|
||||
request.setAttribute("availableFilters", availableFilters);
|
||||
|
||||
List<String[]> appliedFilters = DiscoverUtility.getFilters(request);
|
||||
request.setAttribute("appliedFilters", appliedFilters);
|
||||
List<String> appliedFilterQueries = new ArrayList<String>();
|
||||
for (String[] filter : appliedFilters)
|
||||
{
|
||||
appliedFilterQueries.add(filter[0] + "::" + filter[1] + "::"
|
||||
+ filter[2]);
|
||||
}
|
||||
request.setAttribute("appliedFilterQueries", appliedFilterQueries);
|
||||
List<DSpaceObject> scopes = new ArrayList<DSpaceObject>();
|
||||
if (scope == null)
|
||||
{
|
||||
Community[] topCommunities;
|
||||
try
|
||||
{
|
||||
topCommunities = Community.findAllTop(context);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
for (Community com : topCommunities)
|
||||
{
|
||||
scopes.add(com);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
DSpaceObject pDso = scope.getParentObject();
|
||||
while (pDso != null)
|
||||
{
|
||||
// add to the available scopes in reverse order
|
||||
scopes.add(0, pDso);
|
||||
pDso = pDso.getParentObject();
|
||||
}
|
||||
scopes.add(scope);
|
||||
if (scope instanceof Community)
|
||||
{
|
||||
Community[] comms = ((Community) scope).getSubcommunities();
|
||||
for (Community com : comms)
|
||||
{
|
||||
scopes.add(com);
|
||||
}
|
||||
Collection[] colls = ((Community) scope).getCollections();
|
||||
for (Collection col : colls)
|
||||
{
|
||||
scopes.add(col);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
request.setAttribute("scope", scope);
|
||||
request.setAttribute("scopes", scopes);
|
||||
|
||||
// Perform the search
|
||||
DiscoverResult qResults = null;
|
||||
try
|
||||
{
|
||||
qResults = SearchUtils.getSearchService().search(context, scope,
|
||||
queryArgs);
|
||||
List<Community> resultsListComm = new ArrayList<Community>();
|
||||
List<Collection> resultsListColl = new ArrayList<Collection>();
|
||||
List<Item> resultsListItem = new ArrayList<Item>();
|
||||
|
||||
for (DSpaceObject dso : qResults.getDspaceObjects())
|
||||
{
|
||||
if (dso instanceof Item)
|
||||
{
|
||||
resultsListItem.add((Item) dso);
|
||||
}
|
||||
else if (dso instanceof Collection)
|
||||
{
|
||||
resultsListColl.add((Collection) dso);
|
||||
|
||||
}
|
||||
else if (dso instanceof Community)
|
||||
{
|
||||
resultsListComm.add((Community) dso);
|
||||
}
|
||||
}
|
||||
|
||||
// Make objects from the handles - make arrays, fill them out
|
||||
resultsCommunities = new Community[resultsListComm.size()];
|
||||
resultsCollections = new Collection[resultsListColl.size()];
|
||||
resultsItems = new Item[resultsListItem.size()];
|
||||
|
||||
resultsCommunities = resultsListComm.toArray(resultsCommunities);
|
||||
resultsCollections = resultsListColl.toArray(resultsCollections);
|
||||
resultsItems = resultsListItem.toArray(resultsItems);
|
||||
|
||||
// Log
|
||||
log.info(LogManager.getHeader(context, "search", "scope=" + scope
|
||||
+ ",query=\"" + query + "\",results=("
|
||||
+ resultsCommunities.length + ","
|
||||
+ resultsCollections.length + "," + resultsItems.length
|
||||
+ ")"));
|
||||
|
||||
// Pass in some page qualities
|
||||
// total number of pages
|
||||
long pageTotal = 1 + ((qResults.getTotalSearchResults() - 1) / qResults
|
||||
.getMaxResults());
|
||||
|
||||
// current page being displayed
|
||||
long pageCurrent = 1 + (qResults.getStart() / qResults
|
||||
.getMaxResults());
|
||||
|
||||
// pageLast = min(pageCurrent+3,pageTotal)
|
||||
long pageLast = ((pageCurrent + 3) > pageTotal) ? pageTotal
|
||||
: (pageCurrent + 3);
|
||||
|
||||
// pageFirst = max(1,pageCurrent-3)
|
||||
long pageFirst = ((pageCurrent - 3) > 1) ? (pageCurrent - 3) : 1;
|
||||
|
||||
// Pass the results to the display JSP
|
||||
request.setAttribute("items", resultsItems);
|
||||
request.setAttribute("communities", resultsCommunities);
|
||||
request.setAttribute("collections", resultsCollections);
|
||||
|
||||
request.setAttribute("pagetotal", new Long(pageTotal));
|
||||
request.setAttribute("pagecurrent", new Long(pageCurrent));
|
||||
request.setAttribute("pagelast", new Long(pageLast));
|
||||
request.setAttribute("pagefirst", new Long(pageFirst));
|
||||
|
||||
request.setAttribute("queryresults", qResults);
|
||||
|
||||
try
|
||||
{
|
||||
if (AuthorizeManager.isAdmin(context))
|
||||
{
|
||||
// Set a variable to create admin buttons
|
||||
request.setAttribute("admin_button", new Boolean(true));
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new SearchProcessorException(e.getMessage(), e); }
|
||||
|
||||
if ("submit_export_metadata".equals(UIUtil.getSubmitButton(request,
|
||||
"submit")))
|
||||
{
|
||||
exportMetadata(context, response, resultsItems);
|
||||
}
|
||||
}
|
||||
catch (SearchServiceException e)
|
||||
{
|
||||
log.error(
|
||||
LogManager.getHeader(context, "search", "query="
|
||||
+ queryArgs.getQuery() + ",scope=" + scope
|
||||
+ ",error=" + e.getMessage()), e);
|
||||
request.setAttribute("search.error", true);
|
||||
request.setAttribute("search.error.message", e.getMessage());
|
||||
}
|
||||
|
||||
JSPManager.showJSP(request, response, "/search/discovery.jsp");
|
||||
}
|
||||
|
||||
/**
|
||||
* Export the search results as a csv file
|
||||
*
|
||||
* @param context
|
||||
* The DSpace context
|
||||
* @param response
|
||||
* The request object
|
||||
* @param items
|
||||
* The result items
|
||||
* @throws IOException
|
||||
* @throws ServletException
|
||||
*/
|
||||
protected void exportMetadata(Context context,
|
||||
HttpServletResponse response, Item[] items) throws IOException,
|
||||
ServletException
|
||||
{
|
||||
// Log the attempt
|
||||
log.info(LogManager.getHeader(context, "metadataexport",
|
||||
"exporting_search"));
|
||||
|
||||
// Export a search view
|
||||
ArrayList iids = new ArrayList();
|
||||
for (Item item : items)
|
||||
{
|
||||
iids.add(item.getID());
|
||||
}
|
||||
ItemIterator ii = new ItemIterator(context, iids);
|
||||
MetadataExport exporter = new MetadataExport(context, ii, false);
|
||||
|
||||
// Perform the export
|
||||
DSpaceCSV csv = exporter.export();
|
||||
|
||||
// Return the csv file
|
||||
response.setContentType("text/csv; charset=UTF-8");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=search-results.csv");
|
||||
PrintWriter out = response.getWriter();
|
||||
out.write(csv.toString());
|
||||
out.flush();
|
||||
out.close();
|
||||
log.info(LogManager.getHeader(context, "metadataexport",
|
||||
"exported_file:search-results.csv"));
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for constructing the discovery advanced search form
|
||||
*
|
||||
* @author Andrea Bollini
|
||||
*/
|
||||
@Override
|
||||
public void doAdvancedSearch(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws SearchProcessorException,
|
||||
IOException, ServletException
|
||||
{
|
||||
// just redirect to the simple search servlet.
|
||||
// The advanced form is always displayed with Discovery togheter with
|
||||
// the search result
|
||||
// the first access to the advanced form performs a search for
|
||||
// "anythings" (SOLR *:*)
|
||||
response.sendRedirect(request.getContextPath() + "/simple-search");
|
||||
}
|
||||
|
||||
}
|
@@ -1,97 +1,97 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.webui.discovery;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.LogManager;
|
||||
import org.dspace.discovery.DiscoverQuery;
|
||||
import org.dspace.discovery.DiscoverResult;
|
||||
import org.dspace.discovery.SearchServiceException;
|
||||
import org.dspace.discovery.SearchUtils;
|
||||
import org.dspace.discovery.configuration.DiscoveryConfiguration;
|
||||
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
|
||||
import org.dspace.plugin.CollectionHomeProcessor;
|
||||
import org.dspace.plugin.CommunityHomeProcessor;
|
||||
import org.dspace.plugin.PluginException;
|
||||
import org.dspace.plugin.SiteHomeProcessor;
|
||||
|
||||
public class SideBarFacetProcessor implements CollectionHomeProcessor,
|
||||
CommunityHomeProcessor, SiteHomeProcessor
|
||||
{
|
||||
/** log4j category */
|
||||
private static Logger log = Logger.getLogger(SideBarFacetProcessor.class);
|
||||
|
||||
@Override
|
||||
public void process(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response, Community community)
|
||||
throws PluginException, AuthorizeException
|
||||
{
|
||||
process(context, request, response, (DSpaceObject) community);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response, Collection collection)
|
||||
throws PluginException, AuthorizeException
|
||||
{
|
||||
process(context, request, response, (DSpaceObject) collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws PluginException,
|
||||
AuthorizeException
|
||||
{
|
||||
process(context, request, response, (DSpaceObject) null);
|
||||
}
|
||||
|
||||
private void process(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response, DSpaceObject scope)
|
||||
{
|
||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||
request, scope, true);
|
||||
queryArgs.setMaxResults(0);
|
||||
DiscoverResult qResults;
|
||||
try
|
||||
{
|
||||
qResults = SearchUtils.getSearchService().search(context, scope,
|
||||
queryArgs);
|
||||
request.setAttribute("discovery.fresults",
|
||||
qResults.getFacetResults());
|
||||
DiscoveryConfiguration discoveryConfiguration = SearchUtils
|
||||
.getDiscoveryConfiguration(scope);
|
||||
List<DiscoverySearchFilterFacet> availableFacet = discoveryConfiguration
|
||||
.getSidebarFacets();
|
||||
|
||||
request.setAttribute("facetsConfig",
|
||||
availableFacet != null ? availableFacet
|
||||
: new ArrayList<DiscoverySearchFilterFacet>());
|
||||
if (scope !=null)
|
||||
{
|
||||
request.setAttribute("discovery.searchScope",
|
||||
"/handle/" + scope.getHandle());
|
||||
}
|
||||
}
|
||||
catch (SearchServiceException e)
|
||||
{
|
||||
log.error(LogManager.getHeader(context,
|
||||
"discovery-process-sidebar", "scope=" + scope));
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.webui.discovery;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.LogManager;
|
||||
import org.dspace.discovery.DiscoverQuery;
|
||||
import org.dspace.discovery.DiscoverResult;
|
||||
import org.dspace.discovery.SearchServiceException;
|
||||
import org.dspace.discovery.SearchUtils;
|
||||
import org.dspace.discovery.configuration.DiscoveryConfiguration;
|
||||
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
|
||||
import org.dspace.plugin.CollectionHomeProcessor;
|
||||
import org.dspace.plugin.CommunityHomeProcessor;
|
||||
import org.dspace.plugin.PluginException;
|
||||
import org.dspace.plugin.SiteHomeProcessor;
|
||||
|
||||
public class SideBarFacetProcessor implements CollectionHomeProcessor,
|
||||
CommunityHomeProcessor, SiteHomeProcessor
|
||||
{
|
||||
/** log4j category */
|
||||
private static Logger log = Logger.getLogger(SideBarFacetProcessor.class);
|
||||
|
||||
@Override
|
||||
public void process(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response, Community community)
|
||||
throws PluginException, AuthorizeException
|
||||
{
|
||||
process(context, request, response, (DSpaceObject) community);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response, Collection collection)
|
||||
throws PluginException, AuthorizeException
|
||||
{
|
||||
process(context, request, response, (DSpaceObject) collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws PluginException,
|
||||
AuthorizeException
|
||||
{
|
||||
process(context, request, response, (DSpaceObject) null);
|
||||
}
|
||||
|
||||
private void process(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response, DSpaceObject scope)
|
||||
{
|
||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||
request, scope, true);
|
||||
queryArgs.setMaxResults(0);
|
||||
DiscoverResult qResults;
|
||||
try
|
||||
{
|
||||
qResults = SearchUtils.getSearchService().search(context, scope,
|
||||
queryArgs);
|
||||
request.setAttribute("discovery.fresults",
|
||||
qResults.getFacetResults());
|
||||
DiscoveryConfiguration discoveryConfiguration = SearchUtils
|
||||
.getDiscoveryConfiguration(scope);
|
||||
List<DiscoverySearchFilterFacet> availableFacet = discoveryConfiguration
|
||||
.getSidebarFacets();
|
||||
|
||||
request.setAttribute("facetsConfig",
|
||||
availableFacet != null ? availableFacet
|
||||
: new ArrayList<DiscoverySearchFilterFacet>());
|
||||
if (scope !=null)
|
||||
{
|
||||
request.setAttribute("discovery.searchScope",
|
||||
"/handle/" + scope.getHandle());
|
||||
}
|
||||
}
|
||||
catch (SearchServiceException e)
|
||||
{
|
||||
log.error(LogManager.getHeader(context,
|
||||
"discovery-process-sidebar", "scope=" + scope));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,34 +1,34 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
h3.facets {margin-left:0px;}
|
||||
div.facetsBox {margin:2px;min-width: 180px;width: 180px;}
|
||||
div.facetsBox ul {list-style: none; list-style-position: inside; padding:0px;}
|
||||
div.facet {margin-left:0px;margin-right:0px;border: 1px solid #CCCCCC; padding: 5px;}
|
||||
li.facet-next, li.facet-previous {margin-bottom:10px; margin-top:10px;font-weight: bold;}
|
||||
li.facet-next {text-align: right;}
|
||||
.facetName {font-weight: bold;}
|
||||
div.discovery-query {border: 1px solid #CCCCCC;background-color: #EEEEEE;padding:10px;white-space: nowrap;}
|
||||
div.discovery-query a {font-size: smaller;display: block;margin:2px;margin-left:5px;}
|
||||
div.discovery-search-appliedFilters {margin-top: 10px; background-color: #FFFFFF; border: 1px solid #CCCCCC;padding:10px;}
|
||||
div.discovery-search-appliedFilters span {font-weight: bold;display:block;margin-bottom:5px;}
|
||||
div.discovery-query label {font-weight: bold;margin:5px;}
|
||||
div.discovery-query select {margin-bottom:5px;}
|
||||
div.discovery-search-filters{border: 1px solid #CCCCCC;padding:10px;}
|
||||
div.discovery-search-filters span {display:block;margin:5px;}
|
||||
div.discovery-search-filters span.discovery-search-filters-heading {font-weight: bold};
|
||||
div.discovery-search-filters select {margin:5px;}
|
||||
div.discovery-pagination-controls {margin-top: 10px; background-color: #EEEEEE; border: 1px solid #CCCCCC;padding:10px;}
|
||||
|
||||
.clearfix:after {clear: both;content: ".";display: block;height: 0;visibility: hidden;}
|
||||
.pagination-masked.top {margin-top: 5px;}
|
||||
div.discovery-result-pagination {margin: 20px;margin-bottom:0px;line-height: 1em;padding: 10px;vertical-align: middle;}
|
||||
div.discovery-result-pagination h2.info, div.discovery-result-pagination p.info {float: left;margin:0px;}
|
||||
div.discovery-result-pagination ul.links {float: right;margin:0px;list-style: none outside none;}
|
||||
div.discovery-result-pagination ul.links li {display: inline; padding-left: 2px; padding-right: 2px;}
|
||||
.current-page-link {color: #CCCCCC;font-weight: bold;}
|
||||
div.discovery-result-results {padding:10px;}
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
h3.facets {margin-left:0px;}
|
||||
div.facetsBox {margin:2px;min-width: 180px;width: 180px;}
|
||||
div.facetsBox ul {list-style: none; list-style-position: inside; padding:0px;}
|
||||
div.facet {margin-left:0px;margin-right:0px;border: 1px solid #CCCCCC; padding: 5px;}
|
||||
li.facet-next, li.facet-previous {margin-bottom:10px; margin-top:10px;font-weight: bold;}
|
||||
li.facet-next {text-align: right;}
|
||||
.facetName {font-weight: bold;}
|
||||
div.discovery-query {border: 1px solid #CCCCCC;background-color: #EEEEEE;padding:10px;white-space: nowrap;}
|
||||
div.discovery-query a {font-size: smaller;display: block;margin:2px;margin-left:5px;}
|
||||
div.discovery-search-appliedFilters {margin-top: 10px; background-color: #FFFFFF; border: 1px solid #CCCCCC;padding:10px;}
|
||||
div.discovery-search-appliedFilters span {font-weight: bold;display:block;margin-bottom:5px;}
|
||||
div.discovery-query label {font-weight: bold;margin:5px;}
|
||||
div.discovery-query select {margin-bottom:5px;}
|
||||
div.discovery-search-filters{border: 1px solid #CCCCCC;padding:10px;}
|
||||
div.discovery-search-filters span {display:block;margin:5px;}
|
||||
div.discovery-search-filters span.discovery-search-filters-heading {font-weight: bold};
|
||||
div.discovery-search-filters select {margin:5px;}
|
||||
div.discovery-pagination-controls {margin-top: 10px; background-color: #EEEEEE; border: 1px solid #CCCCCC;padding:10px;}
|
||||
|
||||
.clearfix:after {clear: both;content: ".";display: block;height: 0;visibility: hidden;}
|
||||
.pagination-masked.top {margin-top: 5px;}
|
||||
div.discovery-result-pagination {margin: 20px;margin-bottom:0px;line-height: 1em;padding: 10px;vertical-align: middle;}
|
||||
div.discovery-result-pagination h2.info, div.discovery-result-pagination p.info {float: left;margin:0px;}
|
||||
div.discovery-result-pagination ul.links {float: right;margin:0px;list-style: none outside none;}
|
||||
div.discovery-result-pagination ul.links li {display: inline; padding-left: 2px; padding-right: 2px;}
|
||||
.current-page-link {color: #CCCCCC;font-weight: bold;}
|
||||
div.discovery-result-results {padding:10px;}
|
@@ -1,255 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<parent>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<groupId>org.dspace</groupId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-stats</artifactId>
|
||||
<name>DSpace Solr Statistics Logging Client Library</name>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<description>Library of Shared UsageEvent and EventConsumer Tools for Logging to Solr.</description>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>setupTestEnvironment</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/testing</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<classifier>testEnvironment</classifier>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>edu.iu.ul.maven.plugins</groupId>
|
||||
<artifactId>fileweaver</artifactId>
|
||||
<version>1.0</version>
|
||||
<configuration>
|
||||
<outputs>
|
||||
<output>
|
||||
<outputPath>${project.build.directory}/testing</outputPath>
|
||||
<name>dspace.cfg.woven</name>
|
||||
<parts>
|
||||
<part><path>${project.build.directory}/testing/dspace/config/dspace.cfg</path></part>
|
||||
<part><path>${project.build.directory}/testing/dspace.cfg.more</path></part>
|
||||
</parts>
|
||||
<properties>
|
||||
<dspace.dir>${project.build.directory}/testing/dspace</dspace.dir>
|
||||
</properties>
|
||||
</output>
|
||||
</outputs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>edit-dspace-cfg</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>weave</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<dspace.dir>${project.build.directory}/testing/dspace</dspace.dir>
|
||||
<dspace.configuration>${project.build.directory}/testing/dspace.cfg.woven</dspace.configuration>
|
||||
<dspace.log.init.disable>true</dspace.log.init.disable>
|
||||
<db.schema.path>${project.build.directory}/testing/dspace/etc/h2/database_schema.sql</db.schema.path>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Ben Bosman</name>
|
||||
<email>ben at atmire.com</email>
|
||||
<url>http://www.atmire.com</url>
|
||||
<organization>@MIRE</organization>
|
||||
<organizationUrl>http://www.atmire.com</organizationUrl>
|
||||
<timezone>+1</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<name>Mark Diggory</name>
|
||||
<email>mdiggory at atmire.com</email>
|
||||
<url>http://www.atmire.com</url>
|
||||
<organization>@MIRE</organization>
|
||||
<organizationUrl>http://www.atmire.com</organizationUrl>
|
||||
<timezone>-5</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<name>Lieven Droogmans</name>
|
||||
<email>lieven at atmire.com</email>
|
||||
<url>http://www.atmire.com</url>
|
||||
<organization>@MIRE</organization>
|
||||
<organizationUrl>http://www.atmire.com</organizationUrl>
|
||||
<timezone>+1</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<name>Art Lowel</name>
|
||||
<email>art at atmire.com</email>
|
||||
<url>http://www.atmire.com</url>
|
||||
<organization>@MIRE</organization>
|
||||
<organizationUrl>http://www.atmire.com</organizationUrl>
|
||||
<timezone>+1</timezone>
|
||||
</developer>
|
||||
<developer>
|
||||
<name>Kevin Van de velde</name>
|
||||
<email>kevin at atmire.com</email>
|
||||
<url>http://www.atmire.com</url>
|
||||
<organization>@MIRE</organization>
|
||||
<organizationUrl>http://www.atmire.com</organizationUrl>
|
||||
<timezone>+1</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<contributors />
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-services-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
<artifactId>solr-solrj</artifactId>
|
||||
<version>${lucene.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-configuration</groupId>
|
||||
<artifactId>commons-configuration</artifactId>
|
||||
<version>1.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace.dependencies</groupId>
|
||||
<artifactId>dspace-geoip</artifactId>
|
||||
<version>1.2.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace.dnsjava</groupId>
|
||||
<artifactId>dnsjava</artifactId>
|
||||
<version>2.0.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ostermiller</groupId>
|
||||
<artifactId>utils</artifactId>
|
||||
<version>1.07.00</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.databene</groupId>
|
||||
<artifactId>contiperf</artifactId>
|
||||
<version>1.07</version>
|
||||
<type>jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace.dependencies.jmockit</groupId>
|
||||
<artifactId>dspace-jmockit</artifactId>
|
||||
<version>0.999.4</version>
|
||||
<type>jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.3.158</version>
|
||||
<type>jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.2</version>
|
||||
<type>jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch</artifactId>
|
||||
<version>0.18.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-cli</groupId>
|
||||
<artifactId>commons-cli</artifactId>
|
||||
</dependency>
|
||||
<!-- Gson: Java to Json conversion -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<reporting>
|
||||
<excludeDefaults>false</excludeDefaults>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<configuration>
|
||||
<minmemory>128m</minmemory>
|
||||
<maxmemory>1g</maxmemory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<configuration>
|
||||
<aggregate>true</aggregate>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</project>
|
@@ -79,14 +79,6 @@
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-services-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-solr</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
|
@@ -68,11 +68,6 @@
|
||||
</webResources>
|
||||
<overlays>
|
||||
<overlay></overlay>
|
||||
<overlay>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-jspui-webapp</artifactId>
|
||||
<type>war</type>
|
||||
</overlay>
|
||||
<overlay>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-jspui-webapp</artifactId>
|
||||
@@ -102,29 +97,11 @@
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-jspui-api</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-jspui-webapp</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-jspui-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
|
@@ -96,11 +96,6 @@
|
||||
<artifactId>dspace-lni-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
|
@@ -96,10 +96,6 @@
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-sword-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
|
@@ -104,11 +104,6 @@
|
||||
<classifier>classes</classifier>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
|
@@ -122,25 +122,6 @@
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-solr</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-xmlui-api</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-xmlui-webapp</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-sword-client-xmlui-api</artifactId>
|
||||
|
39
pom.xml
39
pom.xml
@@ -223,19 +223,6 @@
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
Builds DSpace discovery for DSpace
|
||||
-->
|
||||
<profile>
|
||||
<id>dspace-discovery</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>dspace-discovery</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
Builds XOAI Gateway WAR for DSpace
|
||||
-->
|
||||
@@ -290,19 +277,6 @@
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
Builds DSpace Sword Client from local source if present
|
||||
-->
|
||||
<profile>
|
||||
<id>dspace-sword-client</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>dspace-sword-client</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
Builds XMLUI WAR for DSpace
|
||||
-->
|
||||
@@ -341,15 +315,12 @@
|
||||
</activation>
|
||||
<modules>
|
||||
<module>dspace-api</module>
|
||||
<module>dspace-stats</module>
|
||||
<module>dspace-discovery</module>
|
||||
<module>dspace-jspui</module>
|
||||
<module>dspace-xmlui</module>
|
||||
<module>dspace-lni</module>
|
||||
<module>dspace-oai</module>
|
||||
<module>dspace-sword</module>
|
||||
<module>dspace-swordv2</module>
|
||||
<module>dspace-sword-client</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
@@ -530,16 +501,6 @@
|
||||
<version>[1.8.0.0,1.9.0.0)</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-provider</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-discovery-solr</artifactId>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- DSpace third Party Dependencies -->
|
||||
|
||||
<!-- Explicitly Specify Latest Version of Spring -->
|
||||
|
Reference in New Issue
Block a user