All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.gdcc.xoai.xml.WriterContext Maven / Gradle / Ivy

There is a newer version: 5.2.2
Show newest version
package io.gdcc.xoai.xml;

import io.gdcc.xoai.model.oaipmh.Granularity;
import io.gdcc.xoai.services.api.ResumptionTokenFormat;
import io.gdcc.xoai.services.impl.SimpleResumptionTokenFormat;

public interface WriterContext {

    default Granularity getGranularity() {
        return Granularity.Second;
    }

    default ResumptionTokenFormat getResumptionTokenFormat() {
        return new SimpleResumptionTokenFormat().withGranularity(getGranularity());
    }

    /**
     * This is used for Dataverse 4/5 backward compatibility, because they added an attribute to the
     * <record><metadata> element, containing the API URL of a record in
     * their special metadata format "dataverse_json".
     *
     * 

The data provider repository configuration uses this to make the behaviour configurable. * * @deprecated Remove when Dataverse 6 is old enough that no ones uses this workaround anymore. * @return true when {@link io.gdcc.xoai.model.oaipmh.results.Record} should add attributes to * <metadata>, false otherwise (default) */ @Deprecated(since = "5.0") default boolean isMetadataAttributesEnabled() { return false; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy