{
-
- @Override
- public String apply(final String value) {
- if (!value.endsWith("Z"))
- return value + "T00:00:00Z";
- return value;
- }
-}
\ No newline at end of file
Index: modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/CannotDisseminateFormatException.java
===================================================================
--- modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/CannotDisseminateFormatException.java (revision 57194)
+++ modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/CannotDisseminateFormatException.java (nonexistent)
@@ -1,13 +0,0 @@
-package eu.dnetlib.oai;
-
-import eu.dnetlib.rmi.provision.OaiPublisherException;
-
-public class CannotDisseminateFormatException extends OaiPublisherException {
-
- private static final long serialVersionUID = -1395014964372657558L;
-
- public CannotDisseminateFormatException(final String message) {
- super(message);
- }
-
-}
Index: modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/PublisherField.java
===================================================================
--- modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/PublisherField.java (revision 57194)
+++ modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/PublisherField.java (nonexistent)
@@ -1,72 +0,0 @@
-package eu.dnetlib.oai;
-
-import com.google.common.collect.Multimap;
-
-/**
- * Instances of this class represent fields to be explicitely managed by the OAI Publisher, for example for indexing purposes.
- *
- * @author alessia
- */
-public class PublisherField {
-
- /**
- * Name of the field.
- */
- private String fieldName;
- /**
- * True if the value of the field is a list (i.e. repeatable values). False otherwise.
- **/
- private boolean repeatable;
- /**
- * Information about where to take values for this field.
- *
- * Keys are metadata format: name-layout-interpretation; values are xpaths.
- *
- */
- private Multimap sources;
-
- public PublisherField() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public PublisherField(final String fieldName, final boolean repeatable, final Multimap sources) {
- super();
- this.fieldName = fieldName;
- this.repeatable = repeatable;
- this.sources = sources;
- }
-
- public String getFieldName() {
- return fieldName;
- }
-
- public void setFieldName(final String fieldName) {
- this.fieldName = fieldName;
- }
-
- public boolean isRepeatable() {
- return repeatable;
- }
-
- public void setRepeatable(final boolean repeatable) {
- this.repeatable = repeatable;
- }
-
- public Multimap getSources() {
- return sources;
- }
-
- public void setSources(final Multimap sources) {
- this.sources = sources;
- }
-
- @Override
- public String toString() {
- return "PublisherField{" +
- "fieldName='" + fieldName + '\'' +
- ", repeatable=" + repeatable +
- ", sources=" + sources +
- '}';
- }
-}
Index: modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/conf/OAIConfigurationStringReader.java
===================================================================
--- modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/conf/OAIConfigurationStringReader.java (revision 57194)
+++ modules/dnet-data-provision-services/branches/saxonHE-SOLR772/src/main/java/eu/dnetlib/oai/conf/OAIConfigurationStringReader.java (nonexistent)
@@ -1,215 +0,0 @@
-package eu.dnetlib.oai.conf;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import com.google.common.collect.Lists;
-import eu.dnetlib.oai.PublisherField;
-import eu.dnetlib.oai.info.SetInfo;
-import eu.dnetlib.rmi.provision.MDFInfo;
-import eu.dnetlib.rmi.provision.OaiPublisherRuntimeException;
-import eu.dnetlib.utils.MetadataReference;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-
-/**
- * Instances of this class reads the OAI configuration from a string, which is the configuration profile passed in as a string.
- *
- * @author alessia
- */
-public class OAIConfigurationStringReader implements OAIConfigurationReader {
-
- private static final Log log = LogFactory.getLog(OAIConfigurationStringReader.class); // NOPMD by marko on 11/24/08 5:02 PM
-
- private OAIConfiguration oaiConfiguration;
- @Autowired
- private OAIConfigurationParser configurationParser;
-
- public OAIConfigurationStringReader() {
- this.oaiConfiguration = null;
- }
-
- public OAIConfigurationStringReader(final String profile) {
- this.readConfiguration(profile);
- }
-
- public void readConfiguration(final String profile) {
- log.debug(profile);
- try {
- this.oaiConfiguration = this.configurationParser.getConfiguration(profile);
- } catch (final IOException e) {
- throw new OaiPublisherRuntimeException("Could not read OAI configuration profile", e);
- }
- }
-
- public boolean isConfigurationLoaded() {
- return this.oaiConfiguration != null;
- }
-
- @Override
- public List getSets() {
- if (isConfigurationLoaded()) {
- return Lists.newArrayList(this.oaiConfiguration.getSetsMap().values());
- } else {
- throw new OaiPublisherRuntimeException("Configuration is not loaded");
- }
- }
-
- @Override
- public List getSets(final boolean onlyEnabled) {
-
- if (isConfigurationLoaded()) {
- return this.oaiConfiguration.getSetsMap().values().stream().filter(it -> onlyEnabled ? it.isEnabled() : true).collect(
- Collectors.toList());
- } else {
- throw new OaiPublisherRuntimeException("Configuration is not loaded");
- }
- }
-
- @Override
- public List getSetSpecs() {
- if (isConfigurationLoaded()) {
- return Lists.newArrayList(this.oaiConfiguration.getSetsMap().keySet());
- } else {
- throw new OaiPublisherRuntimeException("Configuration is not loaded");
- }
- }
-
- @Override
- public List getSetSpecs(final boolean onlyEnabled) {
- if (isConfigurationLoaded()) {
- if (!onlyEnabled) { return this.getSetSpecs(); }
- final List enabled = this.getSets(true);
- return enabled.stream().map(it -> it.getSetSpec()).collect(Collectors.toList());
-
- } else {
- throw new OaiPublisherRuntimeException("Configuration is not loaded");
- }
- }
-
- @Override
- public List