/*
 */
package org.datadryad.journalstatistics.extractor;

import org.dspace.core.Context;

/**
 * Base class for extracting statistics from a database
 * @author Dan Leehr <dan.leehr@nescent.org>
 */
public abstract class DatabaseExtractor<T> implements ExtractorInterface<T> {
    static final String JOURNAL_ELEMENT = "publicationName";
    static final String JOURNAL_QUALIFIER = null;
    static final String JOURNAL_SCHEMA = "prism";
    
    private Context context;
    public DatabaseExtractor(Context context) {
        this.context = context;
    }

    protected DatabaseExtractor() {
    }

    final Context getContext() {
        return context;
    }

    /**
     * Subclasses must override to do their work
     * @param journalName
     * @return
     */
    @Override
    public abstract T extract(String journalName);

}

@@ -52,16 +52,39 @@
 actor;%0A%0A
+import java.util.Date;%0A
 import o
@@ -464,121 +464,573 @@
     
-%0A    private Context context;%0A    public DatabaseExtractor(Context context) %7B%0A        this.context = context;%0A   
+static final Date DISTANT_PAST = new Date(Long.MIN_VALUE);%0A    static final Date DISTANT_FUTURE = new Date(Long.MAX_VALUE);%0A    %0A    Date beginDate = DISTANT_PAST;%0A    Date endDate = DISTANT_FUTURE;%0A    %0A    private Context context;%0A    public DatabaseExtractor(Context context) %7B%0A        this.context = context;%0A    %7D%0A%0A    public void setBeginDate(Date beginDate) %7B this.beginDate = beginDate; %7D%0A    public Date getBeginDate() %7B return beginDate; %7D%0A    public void setEndDate(Date endDate) %7B this.endDate = endDate; %7D%0A    public Date getEndDate() %7B return endDate;
  %7D%0A%0A

Add beginDate and endDate to DatabaseExtractor