[DS-1144] Maven Project Consolidation : Statistics

This commit is contained in:
Mark Diggory
2012-10-03 02:55:52 -07:00
parent ef576f7012
commit 6e834495ae
46 changed files with 531 additions and 543 deletions

View File

@@ -347,6 +347,61 @@
<artifactId>jbibtex</artifactId> <artifactId>jbibtex</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
</dependency> </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>org.ostermiller</groupId>
<artifactId>utils</artifactId>
<version>1.07.00</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>0.18.6</version>
</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> </dependencies>
</project> </project>

View File

@@ -221,7 +221,7 @@ public class ElasticSearchLogger {
"} } }"; "} } }";
client.prepareIndex(indexName, indexType, "1") client.prepareIndex(indexName, indexType, "1")
.setSource(jsonBuilder() .setSource(XContentFactory.jsonBuilder()
.startObject() .startObject()
.field("user", "kimchy") .field("user", "kimchy")
.field("postDate", new Date()) .field("postDate", new Date())

View File

@@ -239,7 +239,7 @@ public class StatisticsImporterElasticSearch {
//TODO Is there any way to reuse ElasticSearchLogger.post() ? //TODO Is there any way to reuse ElasticSearchLogger.post() ?
// Save it in our server // Save it in our server
XContentBuilder postBuilder = jsonBuilder().startObject() XContentBuilder postBuilder = XContentFactory.jsonBuilder().startObject()
.field("id", dso.getID()) .field("id", dso.getID())
.field("typeIndex", dso.getType()) .field("typeIndex", dso.getType())
.field("type", dso.getTypeText()) .field("type", dso.getTypeText())

View File

@@ -38,10 +38,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-stats</artifactId>
</dependency>
<dependency> <dependency>
<groupId>commons-validator</groupId> <groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId> <artifactId>commons-validator</artifactId>

View File

@@ -1,27 +0,0 @@
/**
* 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/
*/
/**
* Build queries to the statistical subsystem and create UI elements from the
* results. The underlying SOLR engine uses a text-based query language. The
* classes here map a structure of constraint objects into that language.
* <p>
* {@link org.dspace.statistics.content.StatisticsDataVisits} is somewhat like a
* factory for statistical queries. An instance is customized with
* DatasetGenerator instances to specify interesting facets of the data and with
* filters to specify TBS. The "factory methods" then produce arrays of values
* meeting the factory's criteria, either raw or formatted for presentation.
* <p>
* DatasetGenerator subclasses are available for constraining the results to a
* given DSpaceObject, object type, and time interval.
* <p>
* A StatisticsDataVisits object can be wrapped in a
* {@link org.dspace.statistics.content.StatisticsDisplay}
* subclass to format its content as a list or a table.
*/
package org.dspace.statistics.content;

View File

@@ -43,10 +43,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-stats</artifactId>
</dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId> <artifactId>servlet-api</artifactId>

View File

@@ -11,7 +11,6 @@ import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request; import org.apache.cocoon.environment.Request;
import org.dspace.app.xmlui.utils.HandleUtil; import org.dspace.app.xmlui.utils.HandleUtil;
import org.dspace.app.xmlui.utils.UIException;
import org.dspace.app.xmlui.wing.Message; import org.dspace.app.xmlui.wing.Message;
import org.dspace.app.xmlui.wing.WingException; import org.dspace.app.xmlui.wing.WingException;
import org.dspace.app.xmlui.wing.element.Body; import org.dspace.app.xmlui.wing.element.Body;

View File

@@ -7,7 +7,6 @@
*/ */
package org.dspace.app.xmlui.aspect.statistics; package org.dspace.app.xmlui.aspect.statistics;
import com.google.gson.Gson;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.SolrServerException;
import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer; import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer;
@@ -21,20 +20,13 @@ import org.dspace.content.DSpaceObject;
import org.dspace.core.Constants; import org.dspace.core.Constants;
import org.dspace.core.Context; import org.dspace.core.Context;
import org.dspace.statistics.Dataset; import org.dspace.statistics.Dataset;
import org.dspace.statistics.ObjectCount;
import org.dspace.statistics.content.*;
import org.dspace.storage.rdbms.DatabaseManager;
import org.dspace.storage.rdbms.TableRow;
import org.dspace.storage.rdbms.TableRowIterator;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import java.io.IOException; import java.io.IOException;
import java.sql.SQLException; import java.sql.SQLException;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.Locale;
public class StatisticsTransformer extends AbstractDSpaceTransformer { public class StatisticsTransformer extends AbstractDSpaceTransformer {

View File

@@ -10,7 +10,6 @@ package org.dspace.app.xmlui.aspect.statisticsElasticSearch;
import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request; import org.apache.cocoon.environment.Request;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.dspace.app.xmlui.aspect.statistics.StatisticsTransformer;
import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer; import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer;
import org.dspace.app.xmlui.utils.HandleUtil; import org.dspace.app.xmlui.utils.HandleUtil;
import org.dspace.app.xmlui.wing.Message; import org.dspace.app.xmlui.wing.Message;

View File

@@ -79,10 +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-stats</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.dspace</groupId> <groupId>org.dspace</groupId>
<artifactId>dspace-discovery-provider</artifactId> <artifactId>dspace-discovery-provider</artifactId>

18
pom.xml
View File

@@ -223,19 +223,6 @@
</modules> </modules>
</profile> </profile>
<!--
Builds DSpace Solr Stats for DSpace
-->
<profile>
<id>dspace-stats</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>dspace-stats</module>
</modules>
</profile>
<!-- <!--
Builds DSpace discovery for DSpace Builds DSpace discovery for DSpace
--> -->
@@ -547,11 +534,6 @@
<artifactId>dspace-services-utils</artifactId> <artifactId>dspace-services-utils</artifactId>
<version>3.0-SNAPSHOT</version> <version>3.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-stats</artifactId>
<version>3.0-SNAPSHOT</version>
</dependency>
<!-- DSpace Localization Packages --> <!-- DSpace Localization Packages -->
<dependency> <dependency>
<groupId>org.dspace</groupId> <groupId>org.dspace</groupId>