mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
[DS-1144] Maven Project Consolidation : Discovery
This commit is contained in:
@@ -188,6 +188,12 @@
|
|||||||
<groupId>commons-fileupload</groupId>
|
<groupId>commons-fileupload</groupId>
|
||||||
<artifactId>commons-fileupload</artifactId>
|
<artifactId>commons-fileupload</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-httpclient</groupId>
|
||||||
|
<artifactId>commons-httpclient</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<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;
|
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.ArrayList;
|
||||||
import java.util.List;
|
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>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<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>
|
</modules>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@@ -68,6 +68,12 @@
|
|||||||
<artifactId>spring-webmvc</artifactId>
|
<artifactId>spring-webmvc</artifactId>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.flexjson</groupId>
|
||||||
|
<artifactId>flexjson</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</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
|
* 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
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
* tree and available online at
|
* tree and available online at
|
||||||
*
|
*
|
||||||
* http://www.dspace.org/license/
|
* http://www.dspace.org/license/
|
||||||
*/
|
*/
|
||||||
package org.dspace.app.webui.discovery;
|
package org.dspace.app.webui.discovery;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.dspace.app.webui.json.JSONRequest;
|
import org.dspace.app.webui.json.JSONRequest;
|
||||||
import org.dspace.authorize.AuthorizeException;
|
import org.dspace.authorize.AuthorizeException;
|
||||||
import org.dspace.content.DSpaceObject;
|
import org.dspace.content.DSpaceObject;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.discovery.DiscoverQuery;
|
import org.dspace.discovery.DiscoverQuery;
|
||||||
import org.dspace.discovery.DiscoverResult;
|
import org.dspace.discovery.DiscoverResult;
|
||||||
import org.dspace.discovery.DiscoverResult.FacetResult;
|
import org.dspace.discovery.DiscoverResult.FacetResult;
|
||||||
import org.dspace.discovery.SearchUtils;
|
import org.dspace.discovery.SearchUtils;
|
||||||
|
|
||||||
import flexjson.JSONSerializer;
|
import flexjson.JSONSerializer;
|
||||||
|
|
||||||
public class DiscoveryJSONRequest extends JSONRequest
|
public class DiscoveryJSONRequest extends JSONRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
public void doJSONRequest(Context context, HttpServletRequest request,
|
public void doJSONRequest(Context context, HttpServletRequest request,
|
||||||
HttpServletResponse resp) throws AuthorizeException, IOException
|
HttpServletResponse resp) throws AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
String reqPath = request.getPathInfo();
|
String reqPath = request.getPathInfo();
|
||||||
// remove the first slash if present
|
// remove the first slash if present
|
||||||
if (reqPath.startsWith("/"))
|
if (reqPath.startsWith("/"))
|
||||||
{
|
{
|
||||||
reqPath = reqPath.substring(1);
|
reqPath = reqPath.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reqPath.equalsIgnoreCase(getSubPath() + "/autocomplete"))
|
if (reqPath.equalsIgnoreCase(getSubPath() + "/autocomplete"))
|
||||||
{
|
{
|
||||||
doAutocomplete(context, request, resp);
|
doAutocomplete(context, request, resp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// unkwon action (in future we can implement ajax for pagination, etc.)
|
// unkwon action (in future we can implement ajax for pagination, etc.)
|
||||||
resp.sendError(HttpServletResponse.SC_NOT_FOUND);
|
resp.sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doAutocomplete(Context context, HttpServletRequest request,
|
private void doAutocomplete(Context context, HttpServletRequest request,
|
||||||
HttpServletResponse resp)
|
HttpServletResponse resp)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DSpaceObject scope = DiscoverUtility.getSearchScope(context,
|
DSpaceObject scope = DiscoverUtility.getSearchScope(context,
|
||||||
request);
|
request);
|
||||||
DiscoverQuery autocompleteQuery = DiscoverUtility
|
DiscoverQuery autocompleteQuery = DiscoverUtility
|
||||||
.getDiscoverAutocomplete(context, request, scope);
|
.getDiscoverAutocomplete(context, request, scope);
|
||||||
DiscoverResult qResults = SearchUtils.getSearchService().search(
|
DiscoverResult qResults = SearchUtils.getSearchService().search(
|
||||||
context, autocompleteQuery);
|
context, autocompleteQuery);
|
||||||
// extract the only facet present in the result response
|
// extract the only facet present in the result response
|
||||||
Set<String> facets = qResults.getFacetResults().keySet();
|
Set<String> facets = qResults.getFacetResults().keySet();
|
||||||
List<FacetResult> fResults = new ArrayList<DiscoverResult.FacetResult>();
|
List<FacetResult> fResults = new ArrayList<DiscoverResult.FacetResult>();
|
||||||
if (facets != null && facets.size() > 0)
|
if (facets != null && facets.size() > 0)
|
||||||
{
|
{
|
||||||
String autocompleteField = (String) facets.toArray()[0];
|
String autocompleteField = (String) facets.toArray()[0];
|
||||||
fResults = qResults
|
fResults = qResults
|
||||||
.getFacetResult(autocompleteField);
|
.getFacetResult(autocompleteField);
|
||||||
}
|
}
|
||||||
JSONSerializer serializer = new JSONSerializer();
|
JSONSerializer serializer = new JSONSerializer();
|
||||||
serializer.rootName("autocomplete");
|
serializer.rootName("autocomplete");
|
||||||
serializer.exclude("class","asFilterQuery");
|
serializer.exclude("class","asFilterQuery");
|
||||||
serializer.deepSerialize(fResults, resp.getWriter());
|
serializer.deepSerialize(fResults, resp.getWriter());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
throw new RuntimeException(e.getMessage(), e);
|
throw new RuntimeException(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,484 +1,483 @@
|
|||||||
/**
|
/**
|
||||||
* The contents of this file are subject to the license and copyright
|
* 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
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
* tree and available online at
|
* tree and available online at
|
||||||
*
|
*
|
||||||
* http://www.dspace.org/license/
|
* http://www.dspace.org/license/
|
||||||
*/
|
*/
|
||||||
package org.dspace.app.webui.discovery;
|
package org.dspace.app.webui.discovery;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.xml.transform.Transformer;
|
||||||
import javax.xml.transform.Transformer;
|
import javax.xml.transform.TransformerException;
|
||||||
import javax.xml.transform.TransformerException;
|
import javax.xml.transform.TransformerFactory;
|
||||||
import javax.xml.transform.TransformerFactory;
|
import javax.xml.transform.dom.DOMSource;
|
||||||
import javax.xml.transform.dom.DOMSource;
|
import javax.xml.transform.stream.StreamResult;
|
||||||
import javax.xml.transform.stream.StreamResult;
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.apache.log4j.Logger;
|
import org.dspace.app.bulkedit.DSpaceCSV;
|
||||||
import org.dspace.app.bulkedit.DSpaceCSV;
|
import org.dspace.app.bulkedit.MetadataExport;
|
||||||
import org.dspace.app.bulkedit.MetadataExport;
|
import org.dspace.app.util.OpenSearch;
|
||||||
import org.dspace.app.util.OpenSearch;
|
import org.dspace.app.util.SyndicationFeed;
|
||||||
import org.dspace.app.util.SyndicationFeed;
|
import org.dspace.app.webui.search.SearchProcessorException;
|
||||||
import org.dspace.app.webui.search.SearchProcessorException;
|
import org.dspace.app.webui.search.SearchRequestProcessor;
|
||||||
import org.dspace.app.webui.search.SearchRequestProcessor;
|
import org.dspace.app.webui.util.JSPManager;
|
||||||
import org.dspace.app.webui.util.JSPManager;
|
import org.dspace.app.webui.util.UIUtil;
|
||||||
import org.dspace.app.webui.util.UIUtil;
|
import org.dspace.authorize.AuthorizeManager;
|
||||||
import org.dspace.authorize.AuthorizeManager;
|
import org.dspace.content.Collection;
|
||||||
import org.dspace.content.Collection;
|
import org.dspace.content.Community;
|
||||||
import org.dspace.content.Community;
|
import org.dspace.content.DSpaceObject;
|
||||||
import org.dspace.content.DSpaceObject;
|
import org.dspace.content.Item;
|
||||||
import org.dspace.content.Item;
|
import org.dspace.content.ItemIterator;
|
||||||
import org.dspace.content.ItemIterator;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.I18nUtil;
|
||||||
import org.dspace.core.I18nUtil;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.discovery.DiscoverQuery;
|
||||||
import org.dspace.discovery.DiscoverQuery;
|
import org.dspace.discovery.DiscoverResult;
|
||||||
import org.dspace.discovery.DiscoverResult;
|
import org.dspace.discovery.SearchServiceException;
|
||||||
import org.dspace.discovery.SearchServiceException;
|
import org.dspace.discovery.SearchUtils;
|
||||||
import org.dspace.discovery.SearchUtils;
|
import org.dspace.discovery.configuration.DiscoveryConfiguration;
|
||||||
import org.dspace.discovery.configuration.DiscoveryConfiguration;
|
import org.dspace.discovery.configuration.DiscoverySearchFilter;
|
||||||
import org.dspace.discovery.configuration.DiscoverySearchFilter;
|
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
|
||||||
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
|
import org.dspace.discovery.configuration.DiscoverySortFieldConfiguration;
|
||||||
import org.dspace.discovery.configuration.DiscoverySortFieldConfiguration;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Document;
|
|
||||||
|
public class DiscoverySearchRequestProcessor implements SearchRequestProcessor
|
||||||
public class DiscoverySearchRequestProcessor implements SearchRequestProcessor
|
{
|
||||||
{
|
private static String msgKey = "org.dspace.app.webui.servlet.FeedServlet";
|
||||||
private static String msgKey = "org.dspace.app.webui.servlet.FeedServlet";
|
|
||||||
|
/** log4j category */
|
||||||
/** log4j category */
|
private static Logger log = Logger.getLogger(DiscoverySearchRequestProcessor.class);
|
||||||
private static Logger log = Logger.getLogger(DiscoverySearchRequestProcessor.class);
|
|
||||||
|
// locale-sensitive metadata labels
|
||||||
// locale-sensitive metadata labels
|
private Map<String, Map<String, String>> localeLabels = null;
|
||||||
private Map<String, Map<String, String>> localeLabels = null;
|
|
||||||
|
public synchronized void init()
|
||||||
public synchronized void init()
|
{
|
||||||
{
|
if (localeLabels == null)
|
||||||
if (localeLabels == null)
|
{
|
||||||
{
|
localeLabels = new HashMap<String, Map<String, String>>();
|
||||||
localeLabels = new HashMap<String, Map<String, String>>();
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public void doOpenSearch(Context context, HttpServletRequest request,
|
||||||
public void doOpenSearch(Context context, HttpServletRequest request,
|
HttpServletResponse response) throws SearchProcessorException,
|
||||||
HttpServletResponse response) throws SearchProcessorException,
|
IOException, ServletException
|
||||||
IOException, ServletException
|
{
|
||||||
{
|
init();
|
||||||
init();
|
|
||||||
|
// dispense with simple service document requests
|
||||||
// dispense with simple service document requests
|
String scope = request.getParameter("scope");
|
||||||
String scope = request.getParameter("scope");
|
if (scope != null && "".equals(scope))
|
||||||
if (scope != null && "".equals(scope))
|
{
|
||||||
{
|
scope = null;
|
||||||
scope = null;
|
}
|
||||||
}
|
String path = request.getPathInfo();
|
||||||
String path = request.getPathInfo();
|
if (path != null && path.endsWith("description.xml"))
|
||||||
if (path != null && path.endsWith("description.xml"))
|
{
|
||||||
{
|
String svcDescrip = OpenSearch.getDescription(scope);
|
||||||
String svcDescrip = OpenSearch.getDescription(scope);
|
response.setContentType(OpenSearch
|
||||||
response.setContentType(OpenSearch
|
.getContentType("opensearchdescription"));
|
||||||
.getContentType("opensearchdescription"));
|
response.setContentLength(svcDescrip.length());
|
||||||
response.setContentLength(svcDescrip.length());
|
response.getWriter().write(svcDescrip);
|
||||||
response.getWriter().write(svcDescrip);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
// get enough request parameters to decide on action to take
|
||||||
// get enough request parameters to decide on action to take
|
String format = request.getParameter("format");
|
||||||
String format = request.getParameter("format");
|
if (format == null || "".equals(format))
|
||||||
if (format == null || "".equals(format))
|
{
|
||||||
{
|
// default to atom
|
||||||
// default to atom
|
format = "atom";
|
||||||
format = "atom";
|
}
|
||||||
}
|
|
||||||
|
// do some sanity checking
|
||||||
// do some sanity checking
|
if (!OpenSearch.getFormats().contains(format))
|
||||||
if (!OpenSearch.getFormats().contains(format))
|
{
|
||||||
{
|
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
||||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
// then the rest - we are processing the query
|
||||||
// then the rest - we are processing the query
|
DSpaceObject container;
|
||||||
DSpaceObject container;
|
try
|
||||||
try
|
{
|
||||||
{
|
container = DiscoverUtility.getSearchScope(context,
|
||||||
container = DiscoverUtility.getSearchScope(context,
|
request);
|
||||||
request);
|
}
|
||||||
}
|
catch (Exception e)
|
||||||
catch (Exception e)
|
{
|
||||||
{
|
throw new SearchProcessorException(e.getMessage(), e);
|
||||||
throw new SearchProcessorException(e.getMessage(), e);
|
}
|
||||||
}
|
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
request, container, false);
|
||||||
request, container, false);
|
String query = queryArgs.getQuery();
|
||||||
String query = queryArgs.getQuery();
|
|
||||||
|
// Perform the search
|
||||||
// Perform the search
|
DiscoverResult qResults = null;
|
||||||
DiscoverResult qResults = null;
|
try
|
||||||
try
|
{
|
||||||
{
|
qResults = SearchUtils.getSearchService().search(context,
|
||||||
qResults = SearchUtils.getSearchService().search(context,
|
container, queryArgs);
|
||||||
container, queryArgs);
|
}
|
||||||
}
|
catch (SearchServiceException e)
|
||||||
catch (SearchServiceException e)
|
{
|
||||||
{
|
log.error(
|
||||||
log.error(
|
LogManager.getHeader(context, "opensearch", "query="
|
||||||
LogManager.getHeader(context, "opensearch", "query="
|
+ queryArgs.getQuery() + ",scope=" + scope
|
||||||
+ queryArgs.getQuery() + ",scope=" + scope
|
+ ",error=" + e.getMessage()), e);
|
||||||
+ ",error=" + e.getMessage()), e);
|
throw new RuntimeException(e.getMessage(), e);
|
||||||
throw new RuntimeException(e.getMessage(), e);
|
}
|
||||||
}
|
|
||||||
|
// Log
|
||||||
// Log
|
log.info(LogManager.getHeader(context, "opensearch",
|
||||||
log.info(LogManager.getHeader(context, "opensearch",
|
"scope=" + scope + ",query=\"" + query + "\",results=("
|
||||||
"scope=" + scope + ",query=\"" + query + "\",results=("
|
+ qResults.getTotalSearchResults() + ")"));
|
||||||
+ qResults.getTotalSearchResults() + ")"));
|
|
||||||
|
// format and return results
|
||||||
// format and return results
|
Map<String, String> labelMap = getLabels(request);
|
||||||
Map<String, String> labelMap = getLabels(request);
|
DSpaceObject[] dsoResults = new DSpaceObject[qResults
|
||||||
DSpaceObject[] dsoResults = new DSpaceObject[qResults
|
.getDspaceObjects().size()];
|
||||||
.getDspaceObjects().size()];
|
qResults.getDspaceObjects().toArray(dsoResults);
|
||||||
qResults.getDspaceObjects().toArray(dsoResults);
|
Document resultsDoc = OpenSearch.getResultsDoc(format, query,
|
||||||
Document resultsDoc = OpenSearch.getResultsDoc(format, query,
|
(int)qResults.getTotalSearchResults(), qResults.getStart(),
|
||||||
(int)qResults.getTotalSearchResults(), qResults.getStart(),
|
qResults.getMaxResults(), container, dsoResults, labelMap);
|
||||||
qResults.getMaxResults(), container, dsoResults, labelMap);
|
try
|
||||||
try
|
{
|
||||||
{
|
Transformer xf = TransformerFactory.newInstance().newTransformer();
|
||||||
Transformer xf = TransformerFactory.newInstance().newTransformer();
|
response.setContentType(OpenSearch.getContentType(format));
|
||||||
response.setContentType(OpenSearch.getContentType(format));
|
xf.transform(new DOMSource(resultsDoc),
|
||||||
xf.transform(new DOMSource(resultsDoc),
|
new StreamResult(response.getWriter()));
|
||||||
new StreamResult(response.getWriter()));
|
}
|
||||||
}
|
catch (TransformerException e)
|
||||||
catch (TransformerException e)
|
{
|
||||||
{
|
log.error(e);
|
||||||
log.error(e);
|
throw new ServletException(e.toString());
|
||||||
throw new ServletException(e.toString());
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private Map<String, String> getLabels(HttpServletRequest request)
|
||||||
private Map<String, String> getLabels(HttpServletRequest request)
|
{
|
||||||
{
|
// Get access to the localized resource bundle
|
||||||
// Get access to the localized resource bundle
|
Locale locale = UIUtil.getSessionLocale(request);
|
||||||
Locale locale = UIUtil.getSessionLocale(request);
|
Map<String, String> labelMap = localeLabels.get(locale.toString());
|
||||||
Map<String, String> labelMap = localeLabels.get(locale.toString());
|
if (labelMap == null)
|
||||||
if (labelMap == null)
|
{
|
||||||
{
|
labelMap = getLocaleLabels(locale);
|
||||||
labelMap = getLocaleLabels(locale);
|
localeLabels.put(locale.toString(), labelMap);
|
||||||
localeLabels.put(locale.toString(), labelMap);
|
}
|
||||||
}
|
return labelMap;
|
||||||
return labelMap;
|
}
|
||||||
}
|
|
||||||
|
private Map<String, String> getLocaleLabels(Locale locale)
|
||||||
private Map<String, String> getLocaleLabels(Locale locale)
|
{
|
||||||
{
|
Map<String, String> labelMap = new HashMap<String, String>();
|
||||||
Map<String, String> labelMap = new HashMap<String, String>();
|
labelMap.put(SyndicationFeed.MSG_UNTITLED, I18nUtil.getMessage(msgKey + ".notitle", locale));
|
||||||
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_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_FEED_DESCRIPTION, I18nUtil.getMessage(msgKey + ".general-feed.description", locale));
|
labelMap.put(SyndicationFeed.MSG_UITYPE, SyndicationFeed.UITYPE_JSPUI);
|
||||||
labelMap.put(SyndicationFeed.MSG_UITYPE, SyndicationFeed.UITYPE_JSPUI);
|
for (String selector : SyndicationFeed.getDescriptionSelectors())
|
||||||
for (String selector : SyndicationFeed.getDescriptionSelectors())
|
{
|
||||||
{
|
labelMap.put("metadata." + selector, I18nUtil.getMessage(SyndicationFeed.MSG_METADATA + selector, locale));
|
||||||
labelMap.put("metadata." + selector, I18nUtil.getMessage(SyndicationFeed.MSG_METADATA + selector, locale));
|
}
|
||||||
}
|
return labelMap;
|
||||||
return labelMap;
|
}
|
||||||
}
|
|
||||||
|
public void doSimpleSearch(Context context, HttpServletRequest request,
|
||||||
public void doSimpleSearch(Context context, HttpServletRequest request,
|
HttpServletResponse response) throws SearchProcessorException,
|
||||||
HttpServletResponse response) throws SearchProcessorException,
|
IOException, ServletException
|
||||||
IOException, ServletException
|
{
|
||||||
{
|
Item[] resultsItems;
|
||||||
Item[] resultsItems;
|
Collection[] resultsCollections;
|
||||||
Collection[] resultsCollections;
|
Community[] resultsCommunities;
|
||||||
Community[] resultsCommunities;
|
DSpaceObject scope;
|
||||||
DSpaceObject scope;
|
try
|
||||||
try
|
{
|
||||||
{
|
scope = DiscoverUtility.getSearchScope(context, request);
|
||||||
scope = DiscoverUtility.getSearchScope(context, request);
|
}
|
||||||
}
|
catch (IllegalStateException e)
|
||||||
catch (IllegalStateException e)
|
{
|
||||||
{
|
throw new SearchProcessorException(e.getMessage(), e);
|
||||||
throw new SearchProcessorException(e.getMessage(), e);
|
}
|
||||||
}
|
catch (SQLException e)
|
||||||
catch (SQLException e)
|
{
|
||||||
{
|
throw new SearchProcessorException(e.getMessage(), e);
|
||||||
throw new SearchProcessorException(e.getMessage(), e);
|
}
|
||||||
}
|
|
||||||
|
DiscoveryConfiguration discoveryConfiguration = SearchUtils
|
||||||
DiscoveryConfiguration discoveryConfiguration = SearchUtils
|
.getDiscoveryConfiguration(scope);
|
||||||
.getDiscoveryConfiguration(scope);
|
List<DiscoverySortFieldConfiguration> sortFields = discoveryConfiguration
|
||||||
List<DiscoverySortFieldConfiguration> sortFields = discoveryConfiguration
|
.getSearchSortConfiguration().getSortFields();
|
||||||
.getSearchSortConfiguration().getSortFields();
|
List<String> sortOptions = new ArrayList<String>();
|
||||||
List<String> sortOptions = new ArrayList<String>();
|
for (DiscoverySortFieldConfiguration sortFieldConfiguration : sortFields)
|
||||||
for (DiscoverySortFieldConfiguration sortFieldConfiguration : sortFields)
|
{
|
||||||
{
|
String sortField = SearchUtils.getSearchService().toSortFieldIndex(
|
||||||
String sortField = SearchUtils.getSearchService().toSortFieldIndex(
|
sortFieldConfiguration.getMetadataField(),
|
||||||
sortFieldConfiguration.getMetadataField(),
|
sortFieldConfiguration.getType());
|
||||||
sortFieldConfiguration.getType());
|
sortOptions.add(sortField);
|
||||||
sortOptions.add(sortField);
|
}
|
||||||
}
|
request.setAttribute("sortOptions", sortOptions);
|
||||||
request.setAttribute("sortOptions", sortOptions);
|
|
||||||
|
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
request, scope, true);
|
||||||
request, scope, true);
|
|
||||||
|
List<DiscoverySearchFilterFacet> availableFacet = discoveryConfiguration
|
||||||
List<DiscoverySearchFilterFacet> availableFacet = discoveryConfiguration
|
.getSidebarFacets();
|
||||||
.getSidebarFacets();
|
|
||||||
|
request.setAttribute("facetsConfig",
|
||||||
request.setAttribute("facetsConfig",
|
availableFacet != null ? availableFacet
|
||||||
availableFacet != null ? availableFacet
|
: new ArrayList<DiscoverySearchFilterFacet>());
|
||||||
: new ArrayList<DiscoverySearchFilterFacet>());
|
int etal = UIUtil.getIntParameter(request, "etal");
|
||||||
int etal = UIUtil.getIntParameter(request, "etal");
|
if (etal == -1)
|
||||||
if (etal == -1)
|
{
|
||||||
{
|
etal = ConfigurationManager
|
||||||
etal = ConfigurationManager
|
.getIntProperty("webui.itemlist.author-limit");
|
||||||
.getIntProperty("webui.itemlist.author-limit");
|
}
|
||||||
}
|
|
||||||
|
request.setAttribute("etal", etal);
|
||||||
request.setAttribute("etal", etal);
|
|
||||||
|
String query = queryArgs.getQuery();
|
||||||
String query = queryArgs.getQuery();
|
request.setAttribute("query", query);
|
||||||
request.setAttribute("query", query);
|
request.setAttribute("queryArgs", queryArgs);
|
||||||
request.setAttribute("queryArgs", queryArgs);
|
List<DiscoverySearchFilter> availableFilters = discoveryConfiguration
|
||||||
List<DiscoverySearchFilter> availableFilters = discoveryConfiguration
|
.getSearchFilters();
|
||||||
.getSearchFilters();
|
request.setAttribute("availableFilters", availableFilters);
|
||||||
request.setAttribute("availableFilters", availableFilters);
|
|
||||||
|
List<String[]> appliedFilters = DiscoverUtility.getFilters(request);
|
||||||
List<String[]> appliedFilters = DiscoverUtility.getFilters(request);
|
request.setAttribute("appliedFilters", appliedFilters);
|
||||||
request.setAttribute("appliedFilters", appliedFilters);
|
List<String> appliedFilterQueries = new ArrayList<String>();
|
||||||
List<String> appliedFilterQueries = new ArrayList<String>();
|
for (String[] filter : appliedFilters)
|
||||||
for (String[] filter : appliedFilters)
|
{
|
||||||
{
|
appliedFilterQueries.add(filter[0] + "::" + filter[1] + "::"
|
||||||
appliedFilterQueries.add(filter[0] + "::" + filter[1] + "::"
|
+ filter[2]);
|
||||||
+ filter[2]);
|
}
|
||||||
}
|
request.setAttribute("appliedFilterQueries", appliedFilterQueries);
|
||||||
request.setAttribute("appliedFilterQueries", appliedFilterQueries);
|
List<DSpaceObject> scopes = new ArrayList<DSpaceObject>();
|
||||||
List<DSpaceObject> scopes = new ArrayList<DSpaceObject>();
|
if (scope == null)
|
||||||
if (scope == null)
|
{
|
||||||
{
|
Community[] topCommunities;
|
||||||
Community[] topCommunities;
|
try
|
||||||
try
|
{
|
||||||
{
|
topCommunities = Community.findAllTop(context);
|
||||||
topCommunities = Community.findAllTop(context);
|
}
|
||||||
}
|
catch (SQLException e)
|
||||||
catch (SQLException e)
|
{
|
||||||
{
|
throw new SearchProcessorException(e.getMessage(), e);
|
||||||
throw new SearchProcessorException(e.getMessage(), e);
|
}
|
||||||
}
|
for (Community com : topCommunities)
|
||||||
for (Community com : topCommunities)
|
{
|
||||||
{
|
scopes.add(com);
|
||||||
scopes.add(com);
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
try
|
||||||
try
|
{
|
||||||
{
|
DSpaceObject pDso = scope.getParentObject();
|
||||||
DSpaceObject pDso = scope.getParentObject();
|
while (pDso != null)
|
||||||
while (pDso != null)
|
{
|
||||||
{
|
// add to the available scopes in reverse order
|
||||||
// add to the available scopes in reverse order
|
scopes.add(0, pDso);
|
||||||
scopes.add(0, pDso);
|
pDso = pDso.getParentObject();
|
||||||
pDso = pDso.getParentObject();
|
}
|
||||||
}
|
scopes.add(scope);
|
||||||
scopes.add(scope);
|
if (scope instanceof Community)
|
||||||
if (scope instanceof Community)
|
{
|
||||||
{
|
Community[] comms = ((Community) scope).getSubcommunities();
|
||||||
Community[] comms = ((Community) scope).getSubcommunities();
|
for (Community com : comms)
|
||||||
for (Community com : comms)
|
{
|
||||||
{
|
scopes.add(com);
|
||||||
scopes.add(com);
|
}
|
||||||
}
|
Collection[] colls = ((Community) scope).getCollections();
|
||||||
Collection[] colls = ((Community) scope).getCollections();
|
for (Collection col : colls)
|
||||||
for (Collection col : colls)
|
{
|
||||||
{
|
scopes.add(col);
|
||||||
scopes.add(col);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
catch (SQLException e)
|
||||||
catch (SQLException e)
|
{
|
||||||
{
|
throw new SearchProcessorException(e.getMessage(), e);
|
||||||
throw new SearchProcessorException(e.getMessage(), e);
|
}
|
||||||
}
|
}
|
||||||
}
|
request.setAttribute("scope", scope);
|
||||||
request.setAttribute("scope", scope);
|
request.setAttribute("scopes", scopes);
|
||||||
request.setAttribute("scopes", scopes);
|
|
||||||
|
// Perform the search
|
||||||
// Perform the search
|
DiscoverResult qResults = null;
|
||||||
DiscoverResult qResults = null;
|
try
|
||||||
try
|
{
|
||||||
{
|
qResults = SearchUtils.getSearchService().search(context, scope,
|
||||||
qResults = SearchUtils.getSearchService().search(context, scope,
|
queryArgs);
|
||||||
queryArgs);
|
List<Community> resultsListComm = new ArrayList<Community>();
|
||||||
List<Community> resultsListComm = new ArrayList<Community>();
|
List<Collection> resultsListColl = new ArrayList<Collection>();
|
||||||
List<Collection> resultsListColl = new ArrayList<Collection>();
|
List<Item> resultsListItem = new ArrayList<Item>();
|
||||||
List<Item> resultsListItem = new ArrayList<Item>();
|
|
||||||
|
for (DSpaceObject dso : qResults.getDspaceObjects())
|
||||||
for (DSpaceObject dso : qResults.getDspaceObjects())
|
{
|
||||||
{
|
if (dso instanceof Item)
|
||||||
if (dso instanceof Item)
|
{
|
||||||
{
|
resultsListItem.add((Item) dso);
|
||||||
resultsListItem.add((Item) dso);
|
}
|
||||||
}
|
else if (dso instanceof Collection)
|
||||||
else if (dso instanceof Collection)
|
{
|
||||||
{
|
resultsListColl.add((Collection) dso);
|
||||||
resultsListColl.add((Collection) dso);
|
|
||||||
|
}
|
||||||
}
|
else if (dso instanceof Community)
|
||||||
else if (dso instanceof Community)
|
{
|
||||||
{
|
resultsListComm.add((Community) dso);
|
||||||
resultsListComm.add((Community) dso);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// Make objects from the handles - make arrays, fill them out
|
||||||
// Make objects from the handles - make arrays, fill them out
|
resultsCommunities = new Community[resultsListComm.size()];
|
||||||
resultsCommunities = new Community[resultsListComm.size()];
|
resultsCollections = new Collection[resultsListColl.size()];
|
||||||
resultsCollections = new Collection[resultsListColl.size()];
|
resultsItems = new Item[resultsListItem.size()];
|
||||||
resultsItems = new Item[resultsListItem.size()];
|
|
||||||
|
resultsCommunities = resultsListComm.toArray(resultsCommunities);
|
||||||
resultsCommunities = resultsListComm.toArray(resultsCommunities);
|
resultsCollections = resultsListColl.toArray(resultsCollections);
|
||||||
resultsCollections = resultsListColl.toArray(resultsCollections);
|
resultsItems = resultsListItem.toArray(resultsItems);
|
||||||
resultsItems = resultsListItem.toArray(resultsItems);
|
|
||||||
|
// Log
|
||||||
// Log
|
log.info(LogManager.getHeader(context, "search", "scope=" + scope
|
||||||
log.info(LogManager.getHeader(context, "search", "scope=" + scope
|
+ ",query=\"" + query + "\",results=("
|
||||||
+ ",query=\"" + query + "\",results=("
|
+ resultsCommunities.length + ","
|
||||||
+ resultsCommunities.length + ","
|
+ resultsCollections.length + "," + resultsItems.length
|
||||||
+ resultsCollections.length + "," + resultsItems.length
|
+ ")"));
|
||||||
+ ")"));
|
|
||||||
|
// Pass in some page qualities
|
||||||
// Pass in some page qualities
|
// total number of pages
|
||||||
// total number of pages
|
long pageTotal = 1 + ((qResults.getTotalSearchResults() - 1) / qResults
|
||||||
long pageTotal = 1 + ((qResults.getTotalSearchResults() - 1) / qResults
|
.getMaxResults());
|
||||||
.getMaxResults());
|
|
||||||
|
// current page being displayed
|
||||||
// current page being displayed
|
long pageCurrent = 1 + (qResults.getStart() / qResults
|
||||||
long pageCurrent = 1 + (qResults.getStart() / qResults
|
.getMaxResults());
|
||||||
.getMaxResults());
|
|
||||||
|
// pageLast = min(pageCurrent+3,pageTotal)
|
||||||
// pageLast = min(pageCurrent+3,pageTotal)
|
long pageLast = ((pageCurrent + 3) > pageTotal) ? pageTotal
|
||||||
long pageLast = ((pageCurrent + 3) > pageTotal) ? pageTotal
|
: (pageCurrent + 3);
|
||||||
: (pageCurrent + 3);
|
|
||||||
|
// pageFirst = max(1,pageCurrent-3)
|
||||||
// pageFirst = max(1,pageCurrent-3)
|
long pageFirst = ((pageCurrent - 3) > 1) ? (pageCurrent - 3) : 1;
|
||||||
long pageFirst = ((pageCurrent - 3) > 1) ? (pageCurrent - 3) : 1;
|
|
||||||
|
// Pass the results to the display JSP
|
||||||
// Pass the results to the display JSP
|
request.setAttribute("items", resultsItems);
|
||||||
request.setAttribute("items", resultsItems);
|
request.setAttribute("communities", resultsCommunities);
|
||||||
request.setAttribute("communities", resultsCommunities);
|
request.setAttribute("collections", resultsCollections);
|
||||||
request.setAttribute("collections", resultsCollections);
|
|
||||||
|
request.setAttribute("pagetotal", new Long(pageTotal));
|
||||||
request.setAttribute("pagetotal", new Long(pageTotal));
|
request.setAttribute("pagecurrent", new Long(pageCurrent));
|
||||||
request.setAttribute("pagecurrent", new Long(pageCurrent));
|
request.setAttribute("pagelast", new Long(pageLast));
|
||||||
request.setAttribute("pagelast", new Long(pageLast));
|
request.setAttribute("pagefirst", new Long(pageFirst));
|
||||||
request.setAttribute("pagefirst", new Long(pageFirst));
|
|
||||||
|
request.setAttribute("queryresults", qResults);
|
||||||
request.setAttribute("queryresults", qResults);
|
|
||||||
|
try
|
||||||
try
|
{
|
||||||
{
|
if (AuthorizeManager.isAdmin(context))
|
||||||
if (AuthorizeManager.isAdmin(context))
|
{
|
||||||
{
|
// Set a variable to create admin buttons
|
||||||
// Set a variable to create admin buttons
|
request.setAttribute("admin_button", new Boolean(true));
|
||||||
request.setAttribute("admin_button", new Boolean(true));
|
}
|
||||||
}
|
}
|
||||||
}
|
catch (SQLException e)
|
||||||
catch (SQLException e)
|
{
|
||||||
{
|
throw new SearchProcessorException(e.getMessage(), e); }
|
||||||
throw new SearchProcessorException(e.getMessage(), e); }
|
|
||||||
|
if ("submit_export_metadata".equals(UIUtil.getSubmitButton(request,
|
||||||
if ("submit_export_metadata".equals(UIUtil.getSubmitButton(request,
|
"submit")))
|
||||||
"submit")))
|
{
|
||||||
{
|
exportMetadata(context, response, resultsItems);
|
||||||
exportMetadata(context, response, resultsItems);
|
}
|
||||||
}
|
}
|
||||||
}
|
catch (SearchServiceException e)
|
||||||
catch (SearchServiceException e)
|
{
|
||||||
{
|
log.error(
|
||||||
log.error(
|
LogManager.getHeader(context, "search", "query="
|
||||||
LogManager.getHeader(context, "search", "query="
|
+ queryArgs.getQuery() + ",scope=" + scope
|
||||||
+ queryArgs.getQuery() + ",scope=" + scope
|
+ ",error=" + e.getMessage()), e);
|
||||||
+ ",error=" + e.getMessage()), e);
|
request.setAttribute("search.error", true);
|
||||||
request.setAttribute("search.error", true);
|
request.setAttribute("search.error.message", e.getMessage());
|
||||||
request.setAttribute("search.error.message", e.getMessage());
|
}
|
||||||
}
|
|
||||||
|
JSPManager.showJSP(request, response, "/search/discovery.jsp");
|
||||||
JSPManager.showJSP(request, response, "/search/discovery.jsp");
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
/**
|
* Export the search results as a csv file
|
||||||
* Export the search results as a csv file
|
*
|
||||||
*
|
* @param context
|
||||||
* @param context
|
* The DSpace context
|
||||||
* The DSpace context
|
* @param response
|
||||||
* @param response
|
* The request object
|
||||||
* The request object
|
* @param items
|
||||||
* @param items
|
* The result items
|
||||||
* The result items
|
* @throws IOException
|
||||||
* @throws IOException
|
* @throws ServletException
|
||||||
* @throws ServletException
|
*/
|
||||||
*/
|
protected void exportMetadata(Context context,
|
||||||
protected void exportMetadata(Context context,
|
HttpServletResponse response, Item[] items) throws IOException,
|
||||||
HttpServletResponse response, Item[] items) throws IOException,
|
ServletException
|
||||||
ServletException
|
{
|
||||||
{
|
// Log the attempt
|
||||||
// Log the attempt
|
log.info(LogManager.getHeader(context, "metadataexport",
|
||||||
log.info(LogManager.getHeader(context, "metadataexport",
|
"exporting_search"));
|
||||||
"exporting_search"));
|
|
||||||
|
// Export a search view
|
||||||
// Export a search view
|
ArrayList iids = new ArrayList();
|
||||||
ArrayList iids = new ArrayList();
|
for (Item item : items)
|
||||||
for (Item item : items)
|
{
|
||||||
{
|
iids.add(item.getID());
|
||||||
iids.add(item.getID());
|
}
|
||||||
}
|
ItemIterator ii = new ItemIterator(context, iids);
|
||||||
ItemIterator ii = new ItemIterator(context, iids);
|
MetadataExport exporter = new MetadataExport(context, ii, false);
|
||||||
MetadataExport exporter = new MetadataExport(context, ii, false);
|
|
||||||
|
// Perform the export
|
||||||
// Perform the export
|
DSpaceCSV csv = exporter.export();
|
||||||
DSpaceCSV csv = exporter.export();
|
|
||||||
|
// Return the csv file
|
||||||
// Return the csv file
|
response.setContentType("text/csv; charset=UTF-8");
|
||||||
response.setContentType("text/csv; charset=UTF-8");
|
response.setHeader("Content-Disposition",
|
||||||
response.setHeader("Content-Disposition",
|
"attachment; filename=search-results.csv");
|
||||||
"attachment; filename=search-results.csv");
|
PrintWriter out = response.getWriter();
|
||||||
PrintWriter out = response.getWriter();
|
out.write(csv.toString());
|
||||||
out.write(csv.toString());
|
out.flush();
|
||||||
out.flush();
|
out.close();
|
||||||
out.close();
|
log.info(LogManager.getHeader(context, "metadataexport",
|
||||||
log.info(LogManager.getHeader(context, "metadataexport",
|
"exported_file:search-results.csv"));
|
||||||
"exported_file:search-results.csv"));
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
/**
|
* Method for constructing the discovery advanced search form
|
||||||
* Method for constructing the discovery advanced search form
|
*
|
||||||
*
|
* @author Andrea Bollini
|
||||||
* @author Andrea Bollini
|
*/
|
||||||
*/
|
@Override
|
||||||
@Override
|
public void doAdvancedSearch(Context context, HttpServletRequest request,
|
||||||
public void doAdvancedSearch(Context context, HttpServletRequest request,
|
HttpServletResponse response) throws SearchProcessorException,
|
||||||
HttpServletResponse response) throws SearchProcessorException,
|
IOException, ServletException
|
||||||
IOException, ServletException
|
{
|
||||||
{
|
// just redirect to the simple search servlet.
|
||||||
// just redirect to the simple search servlet.
|
// The advanced form is always displayed with Discovery togheter with
|
||||||
// The advanced form is always displayed with Discovery togheter with
|
// the search result
|
||||||
// the search result
|
// the first access to the advanced form performs a search for
|
||||||
// the first access to the advanced form performs a search for
|
// "anythings" (SOLR *:*)
|
||||||
// "anythings" (SOLR *:*)
|
response.sendRedirect(request.getContextPath() + "/simple-search");
|
||||||
response.sendRedirect(request.getContextPath() + "/simple-search");
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
@@ -1,97 +1,97 @@
|
|||||||
/**
|
/**
|
||||||
* The contents of this file are subject to the license and copyright
|
* 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
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
* tree and available online at
|
* tree and available online at
|
||||||
*
|
*
|
||||||
* http://www.dspace.org/license/
|
* http://www.dspace.org/license/
|
||||||
*/
|
*/
|
||||||
package org.dspace.app.webui.discovery;
|
package org.dspace.app.webui.discovery;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.authorize.AuthorizeException;
|
import org.dspace.authorize.AuthorizeException;
|
||||||
import org.dspace.content.Collection;
|
import org.dspace.content.Collection;
|
||||||
import org.dspace.content.Community;
|
import org.dspace.content.Community;
|
||||||
import org.dspace.content.DSpaceObject;
|
import org.dspace.content.DSpaceObject;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.discovery.DiscoverQuery;
|
import org.dspace.discovery.DiscoverQuery;
|
||||||
import org.dspace.discovery.DiscoverResult;
|
import org.dspace.discovery.DiscoverResult;
|
||||||
import org.dspace.discovery.SearchServiceException;
|
import org.dspace.discovery.SearchServiceException;
|
||||||
import org.dspace.discovery.SearchUtils;
|
import org.dspace.discovery.SearchUtils;
|
||||||
import org.dspace.discovery.configuration.DiscoveryConfiguration;
|
import org.dspace.discovery.configuration.DiscoveryConfiguration;
|
||||||
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
|
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
|
||||||
import org.dspace.plugin.CollectionHomeProcessor;
|
import org.dspace.plugin.CollectionHomeProcessor;
|
||||||
import org.dspace.plugin.CommunityHomeProcessor;
|
import org.dspace.plugin.CommunityHomeProcessor;
|
||||||
import org.dspace.plugin.PluginException;
|
import org.dspace.plugin.PluginException;
|
||||||
import org.dspace.plugin.SiteHomeProcessor;
|
import org.dspace.plugin.SiteHomeProcessor;
|
||||||
|
|
||||||
public class SideBarFacetProcessor implements CollectionHomeProcessor,
|
public class SideBarFacetProcessor implements CollectionHomeProcessor,
|
||||||
CommunityHomeProcessor, SiteHomeProcessor
|
CommunityHomeProcessor, SiteHomeProcessor
|
||||||
{
|
{
|
||||||
/** log4j category */
|
/** log4j category */
|
||||||
private static Logger log = Logger.getLogger(SideBarFacetProcessor.class);
|
private static Logger log = Logger.getLogger(SideBarFacetProcessor.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(Context context, HttpServletRequest request,
|
public void process(Context context, HttpServletRequest request,
|
||||||
HttpServletResponse response, Community community)
|
HttpServletResponse response, Community community)
|
||||||
throws PluginException, AuthorizeException
|
throws PluginException, AuthorizeException
|
||||||
{
|
{
|
||||||
process(context, request, response, (DSpaceObject) community);
|
process(context, request, response, (DSpaceObject) community);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(Context context, HttpServletRequest request,
|
public void process(Context context, HttpServletRequest request,
|
||||||
HttpServletResponse response, Collection collection)
|
HttpServletResponse response, Collection collection)
|
||||||
throws PluginException, AuthorizeException
|
throws PluginException, AuthorizeException
|
||||||
{
|
{
|
||||||
process(context, request, response, (DSpaceObject) collection);
|
process(context, request, response, (DSpaceObject) collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(Context context, HttpServletRequest request,
|
public void process(Context context, HttpServletRequest request,
|
||||||
HttpServletResponse response) throws PluginException,
|
HttpServletResponse response) throws PluginException,
|
||||||
AuthorizeException
|
AuthorizeException
|
||||||
{
|
{
|
||||||
process(context, request, response, (DSpaceObject) null);
|
process(context, request, response, (DSpaceObject) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void process(Context context, HttpServletRequest request,
|
private void process(Context context, HttpServletRequest request,
|
||||||
HttpServletResponse response, DSpaceObject scope)
|
HttpServletResponse response, DSpaceObject scope)
|
||||||
{
|
{
|
||||||
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
DiscoverQuery queryArgs = DiscoverUtility.getDiscoverQuery(context,
|
||||||
request, scope, true);
|
request, scope, true);
|
||||||
queryArgs.setMaxResults(0);
|
queryArgs.setMaxResults(0);
|
||||||
DiscoverResult qResults;
|
DiscoverResult qResults;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
qResults = SearchUtils.getSearchService().search(context, scope,
|
qResults = SearchUtils.getSearchService().search(context, scope,
|
||||||
queryArgs);
|
queryArgs);
|
||||||
request.setAttribute("discovery.fresults",
|
request.setAttribute("discovery.fresults",
|
||||||
qResults.getFacetResults());
|
qResults.getFacetResults());
|
||||||
DiscoveryConfiguration discoveryConfiguration = SearchUtils
|
DiscoveryConfiguration discoveryConfiguration = SearchUtils
|
||||||
.getDiscoveryConfiguration(scope);
|
.getDiscoveryConfiguration(scope);
|
||||||
List<DiscoverySearchFilterFacet> availableFacet = discoveryConfiguration
|
List<DiscoverySearchFilterFacet> availableFacet = discoveryConfiguration
|
||||||
.getSidebarFacets();
|
.getSidebarFacets();
|
||||||
|
|
||||||
request.setAttribute("facetsConfig",
|
request.setAttribute("facetsConfig",
|
||||||
availableFacet != null ? availableFacet
|
availableFacet != null ? availableFacet
|
||||||
: new ArrayList<DiscoverySearchFilterFacet>());
|
: new ArrayList<DiscoverySearchFilterFacet>());
|
||||||
if (scope !=null)
|
if (scope !=null)
|
||||||
{
|
{
|
||||||
request.setAttribute("discovery.searchScope",
|
request.setAttribute("discovery.searchScope",
|
||||||
"/handle/" + scope.getHandle());
|
"/handle/" + scope.getHandle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SearchServiceException e)
|
catch (SearchServiceException e)
|
||||||
{
|
{
|
||||||
log.error(LogManager.getHeader(context,
|
log.error(LogManager.getHeader(context,
|
||||||
"discovery-process-sidebar", "scope=" + scope));
|
"discovery-process-sidebar", "scope=" + scope));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,34 +1,34 @@
|
|||||||
/**
|
/**
|
||||||
* The contents of this file are subject to the license and copyright
|
* 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
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
* tree and available online at
|
* tree and available online at
|
||||||
*
|
*
|
||||||
* http://www.dspace.org/license/
|
* http://www.dspace.org/license/
|
||||||
*/
|
*/
|
||||||
h3.facets {margin-left:0px;}
|
h3.facets {margin-left:0px;}
|
||||||
div.facetsBox {margin:2px;min-width: 180px;width: 180px;}
|
div.facetsBox {margin:2px;min-width: 180px;width: 180px;}
|
||||||
div.facetsBox ul {list-style: none; list-style-position: inside; padding:0px;}
|
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;}
|
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, li.facet-previous {margin-bottom:10px; margin-top:10px;font-weight: bold;}
|
||||||
li.facet-next {text-align: right;}
|
li.facet-next {text-align: right;}
|
||||||
.facetName {font-weight: bold;}
|
.facetName {font-weight: bold;}
|
||||||
div.discovery-query {border: 1px solid #CCCCCC;background-color: #EEEEEE;padding:10px;white-space: nowrap;}
|
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-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 {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-search-appliedFilters span {font-weight: bold;display:block;margin-bottom:5px;}
|
||||||
div.discovery-query label {font-weight: bold;margin:5px;}
|
div.discovery-query label {font-weight: bold;margin:5px;}
|
||||||
div.discovery-query select {margin-bottom:5px;}
|
div.discovery-query select {margin-bottom:5px;}
|
||||||
div.discovery-search-filters{border: 1px solid #CCCCCC;padding:10px;}
|
div.discovery-search-filters{border: 1px solid #CCCCCC;padding:10px;}
|
||||||
div.discovery-search-filters span {display:block;margin:5px;}
|
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 span.discovery-search-filters-heading {font-weight: bold};
|
||||||
div.discovery-search-filters select {margin:5px;}
|
div.discovery-search-filters select {margin:5px;}
|
||||||
div.discovery-pagination-controls {margin-top: 10px; background-color: #EEEEEE; border: 1px solid #CCCCCC;padding:10px;}
|
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;}
|
.clearfix:after {clear: both;content: ".";display: block;height: 0;visibility: hidden;}
|
||||||
.pagination-masked.top {margin-top: 5px;}
|
.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 {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 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 {float: right;margin:0px;list-style: none outside none;}
|
||||||
div.discovery-result-pagination ul.links li {display: inline; padding-left: 2px; padding-right: 2px;}
|
div.discovery-result-pagination ul.links li {display: inline; padding-left: 2px; padding-right: 2px;}
|
||||||
.current-page-link {color: #CCCCCC;font-weight: bold;}
|
.current-page-link {color: #CCCCCC;font-weight: bold;}
|
||||||
div.discovery-result-results {padding:10px;}
|
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>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-services-utils</artifactId>
|
<artifactId>dspace-services-utils</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.dspace</groupId>
|
|
||||||
<artifactId>dspace-discovery-provider</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dspace</groupId>
|
|
||||||
<artifactId>dspace-discovery-solr</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>servlet-api</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
|
@@ -68,11 +68,6 @@
|
|||||||
</webResources>
|
</webResources>
|
||||||
<overlays>
|
<overlays>
|
||||||
<overlay></overlay>
|
<overlay></overlay>
|
||||||
<overlay>
|
|
||||||
<groupId>org.dspace</groupId>
|
|
||||||
<artifactId>dspace-discovery-jspui-webapp</artifactId>
|
|
||||||
<type>war</type>
|
|
||||||
</overlay>
|
|
||||||
<overlay>
|
<overlay>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-jspui-webapp</artifactId>
|
<artifactId>dspace-jspui-webapp</artifactId>
|
||||||
@@ -102,29 +97,11 @@
|
|||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-jspui-api</artifactId>
|
<artifactId>dspace-jspui-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dspace</groupId>
|
|
||||||
<artifactId>dspace-discovery-provider</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>servlet-api</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
|
@@ -96,11 +96,6 @@
|
|||||||
<artifactId>dspace-lni-core</artifactId>
|
<artifactId>dspace-lni-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dspace</groupId>
|
|
||||||
<artifactId>dspace-discovery-provider</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>servlet-api</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
|
@@ -96,10 +96,6 @@
|
|||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-sword-api</artifactId>
|
<artifactId>dspace-sword-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.dspace</groupId>
|
|
||||||
<artifactId>dspace-discovery-provider</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>servlet-api</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
|
@@ -104,11 +104,6 @@
|
|||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dspace</groupId>
|
|
||||||
<artifactId>dspace-discovery-provider</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>servlet-api</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
|
@@ -122,25 +122,6 @@
|
|||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-sword-client-xmlui-api</artifactId>
|
<artifactId>dspace-sword-client-xmlui-api</artifactId>
|
||||||
|
39
pom.xml
39
pom.xml
@@ -223,19 +223,6 @@
|
|||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</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
|
Builds XOAI Gateway WAR for DSpace
|
||||||
-->
|
-->
|
||||||
@@ -290,19 +277,6 @@
|
|||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</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
|
Builds XMLUI WAR for DSpace
|
||||||
-->
|
-->
|
||||||
@@ -341,15 +315,12 @@
|
|||||||
</activation>
|
</activation>
|
||||||
<modules>
|
<modules>
|
||||||
<module>dspace-api</module>
|
<module>dspace-api</module>
|
||||||
<module>dspace-stats</module>
|
|
||||||
<module>dspace-discovery</module>
|
|
||||||
<module>dspace-jspui</module>
|
<module>dspace-jspui</module>
|
||||||
<module>dspace-xmlui</module>
|
<module>dspace-xmlui</module>
|
||||||
<module>dspace-lni</module>
|
<module>dspace-lni</module>
|
||||||
<module>dspace-oai</module>
|
<module>dspace-oai</module>
|
||||||
<module>dspace-sword</module>
|
<module>dspace-sword</module>
|
||||||
<module>dspace-swordv2</module>
|
<module>dspace-swordv2</module>
|
||||||
<module>dspace-sword-client</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
@@ -530,16 +501,6 @@
|
|||||||
<version>[1.8.0.0,1.9.0.0)</version>
|
<version>[1.8.0.0,1.9.0.0)</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</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 -->
|
<!-- DSpace third Party Dependencies -->
|
||||||
|
|
||||||
<!-- Explicitly Specify Latest Version of Spring -->
|
<!-- Explicitly Specify Latest Version of Spring -->
|
||||||
|
Reference in New Issue
Block a user