diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/DARIAHConstants.java b/oaipmh-core/src/main/java/info/textgrid/middleware/DARIAHConstants.java index 4a98270796f5a2b0e0a1f8852b2e37a607b4d228..e45943ba64211cd73820a1132884f450f2fc4afd 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/DARIAHConstants.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/DARIAHConstants.java @@ -45,19 +45,19 @@ public final class DARIAHConstants { * TextGrid Metadata Fields for OAI-PMH Request (Mapping to DC) */ - public static final String CREATED = "metadata.dc:date"; - public static final String FORMAT = "metadata.dc:format"; - public static final String IDENTIFIER = "metadata.dc:identifier"; - public static final String DATA_CONTRIBUTOR = "metadata.dc:contributor"; + public static final String CREATED = "dariahObject.admnistrativeMetadata.dcterms:modified"; + public static final String FORMAT = "dariahObject.descriptiveMetadata.dc:format"; + public static final String IDENTIFIER = "dariahObject.descriptiveMetadata.dc:identifier"; + public static final String DATA_CONTRIBUTOR = "dariahObject.descriptiveMetadata.dc:contributor"; public static final String[] DARIAHFields = { - "metadata.dc:contributor", "metadata.dc:coverage", - "metadata.dc:creator", "metadata.dc:date", - "metadata.dc:description", "metadata.dc:format", - "metadata.dc:identifier", "metadata.dc:language", - "metadata.dc:publisher", "metadata.dc:relation", - "metadata.dc:rights", "metadata.dc:source", "metadata.dc:subject", - "metadata.dc:title", "metadata.dc:type" }; + "dariahObject.descriptiveMetadata.dc:contributor", "dariahObject.descriptiveMetadata.dc:coverage", + "dariahObject.descriptiveMetadata.dc:creator", "dariahObject.admnistrativeMetadata.dcterms:modified", + "dariahObject.descriptiveMetadata.dc:description", "dariahObject.descriptiveMetadata.dc:format", + "dariahObject.descriptiveMetadata.dc:identifier", "dariahObject.descriptiveMetadata.dc:language", + "dariahObject.descriptiveMetadata.dc:publisher", "dariahObject.descriptiveMetadata.dc:relation", + "dariahObject.descriptiveMetadata.dc:rights", "dariahObject.descriptiveMetadata.:source", "dariahObject.descriptiveMetadata.dc:subject", + "dariahObject.descriptiveMetadata.dc:title", "dariahObject.descriptiveMetadata.dc:type" }; public static final String[] DARIAHCollectionFields = { "metadata.dc:title" }; @@ -66,21 +66,21 @@ public final class DARIAHConstants { * fields */ - public static final String[] CONTRIBUTOR_LIST = { "metadata.dc:contributor" }; - public static final String[] COVERAGE_LIST = { "metadata.dc:coverage" }; - public static final String[] CREATOR_LIST = { "metadata.dc:cretor" }; - public static final String[] DATE_LIST = { "metadata.dc:date" }; - public static final String[] DESCRIPTION_LIST = { "metadata.dc:description" }; - public static final String[] FORMAT_LIST = { "metadata.dc:format" }; - public static final String[] IDENTIFIER_LIST = { "metadata.dc:identifier" }; - public static final String[] LANGUAGE_LIST = { "metadata.dc:language" }; - public static final String[] PUBLISHER_LIST = { "metadata.dc:publisher" }; - public static final String[] RELATIONS_LIST = { "metadata.dc:relation" }; - public static final String[] RIGHTS_LIST = { "metadata.dc:rights" }; - public static final String[] SOURCE_LIST = { "metadata.dc:source" }; - public static final String[] SUBJECT_LIST = { "metadata.dc:subject" }; - public static final String[] TITLE_LIST = { "metadata.dc:title" }; - public static final String[] TYPE_LIST = { "metadata.dc:type" }; + public static final String[] CONTRIBUTOR_LIST = { "dariahObject.descriptiveMetadata.dc:contributor" }; + public static final String[] COVERAGE_LIST = { "dariahObject.descriptiveMetadata.dc:coverage" }; + public static final String[] CREATOR_LIST = { "dariahObject.descriptiveMetadata.dc:cretor" }; + public static final String[] DATE_LIST = { "dariahObject.descriptiveMetadata.dc:date" }; + public static final String[] DESCRIPTION_LIST = { "dariahObject.descriptiveMetadata.dc:description" }; + public static final String[] FORMAT_LIST = { "dariahObject.descriptiveMetadata.dc:format" }; + public static final String[] IDENTIFIER_LIST = { "dariahObject.descriptiveMetadata.dc:identifier" }; + public static final String[] LANGUAGE_LIST = { "dariahObject.descriptiveMetadata.dc:language" }; + public static final String[] PUBLISHER_LIST = { "dariahObject.descriptiveMetadata.dc:publisher" }; + public static final String[] RELATIONS_LIST = { "dariahObject.descriptiveMetadata.dc:relation" }; + public static final String[] RIGHTS_LIST = { "dariahObject.descriptiveMetadata.dc:rights" }; + public static final String[] SOURCE_LIST = { "dariahObject.descriptiveMetadata.dc:source" }; + public static final String[] SUBJECT_LIST = { "dariahObject.descriptiveMetadata.dc:subject" }; + public static final String[] TITLE_LIST = { "dariahObject.descriptiveMetadata.dc:title" }; + public static final String[] TYPE_LIST = { "dariahObject.descriptiveMetadata.dc:type" }; public static final String[] IDENTIFIER_LIST_FIELDS = { "metadata.dc:identifier", "metadata.dc:date", "metadata.dc:format" }; public static final String RANGE_FIELD = "metadata.dc:date"; diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java index 7f82b05584aa9f16dcdb953905e719e809d0a6f6..c3efafe15028783efaccc57752c63d8fdf221f3c 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java @@ -41,8 +41,7 @@ public class RecordListDeliverer { // STATICS // ** - private static org.apache.commons.logging.Log log = LogFactory - .getLog(RecordDeliverer.class); + private static org.apache.commons.logging.Log log = LogFactory.getLog(RecordDeliverer.class); // ** // CLASS VARIABLES @@ -59,6 +58,7 @@ public class RecordListDeliverer { private String relationToFurtherMetadataObject; private String repositoryObjectURIPrefix; private String rangeField; + private String modifiedField; private boolean foundItems; @@ -388,7 +388,7 @@ public class RecordListDeliverer { System.out.println("DateSize: " + dates.size()); if(dates.size() > 0){ - header.setDatestamp(this.dates.get(0)); + header.setDatestamp(this.modifiedField); header.setIdentifier(this.identifiers.get(0)); System.out.println("identifiers: " + this.identifiers.get(0)); if (set != null) { @@ -669,6 +669,14 @@ public class RecordListDeliverer { this.foundItems = foundItems; } + public String getModifiedField() { + return modifiedField; + } + + public void setModifiedField(String modifiedField) { + this.modifiedField = modifiedField; + } + /* * public String getCollectionTitle() { return collectionTitle; } * diff --git a/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml b/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml index 92227aa6bd29dd914dc274d4317545afe742fb12..93484310563caed595e271219150c4c38a9f160d 100644 --- a/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml +++ b/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml @@ -106,7 +106,8 @@ <property name="sources" value="${sourceList}" /> <property name="subjects" value="${subjectList}" /> <property name="titles" value="${titleList}" /> - <property name="types" value="${typeList}" /> + <property name="types" value="${typeList}" /> + <property name="modifiedField" value="${modifiedField}" /> </bean> <bean id="Record" class="info.textgrid.middleware.RecordDeliverer">