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 c88384075fabd138ecbfa09242a3c308ecda2a30..2b304a310cb3bd3230bbfcb49c997b4a90662da3 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/DARIAHConstants.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/DARIAHConstants.java @@ -7,7 +7,6 @@ import java.util.List; * Collection of values never changing its content * * @author Maximilian Brodhun: SUB - * */ public final class DARIAHConstants { @@ -20,8 +19,8 @@ public final class DARIAHConstants { public static final String ITEM_IDENTIFIER_PREFIX = "hdl:"; public static final String COLLECTIONREGISTRY_PREFIX = "dariah:collection:"; - public static final String COLLECTION_MIMETYPE = "text/tg.collection+tg.aggregation+xml"; - public static final List<String> TEXTGRID_REP_ADMIN_CONTACT = Arrays.asList("textgrid-support@gwdg.de"); + public static final String COLLECTION_MIMETYPE = "text/vnd.dariah.dhrep.collection+turtle"; + public static final List<String> TEXTGRID_REP_ADMIN_CONTACT = Arrays.asList("support@de.dariah.eu"); /* * Rep Identification String Constants diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDeliverer.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDeliverer.java index e9bb862e68662087ee352ed00f19aec36c404374..825fa600e405d465730d71287a3cf1aa5a55f0cc 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDeliverer.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDeliverer.java @@ -43,7 +43,7 @@ public class RecordDeliverer { /* * Lists for the Dublin Core elements. Lists are needed since each DC fields - * is possible to occures several times + * is possible to occur several times */ private List<String> contributors = new ArrayList<String>(); @@ -84,6 +84,12 @@ public class RecordDeliverer { private OAI_ESClient oaiEsClient; + /** + * @param oaiEsClient + * @param workFields + * @param textgrid + * @param dariah + */ public RecordDeliverer(OAI_ESClient oaiEsClient, String[] workFields, boolean textgrid, boolean dariah) { this.oaiEsClient = oaiEsClient; @@ -98,9 +104,8 @@ public class RecordDeliverer { * * @param id * identifier within the EalsticSearch index - * @return grt the GetRecord response for the request + * @return Get the GetRecord response for the request */ - public GetRecordType getRecordById(String id) { ObjectFactory of = new ObjectFactory(); @@ -124,7 +129,6 @@ public class RecordDeliverer { if (tgObject.isExists()) { - String identifier; if (this.dariah == true) { @@ -176,6 +180,13 @@ public class RecordDeliverer { return grt; } + /** + * @param dateOfCreation + * @param identifier + * @param record + * @param dbc + * @return + */ public RecordType setRecordHeader(String dateOfCreation, String identifier, RecordType record, DublinCoreBuilder dbc) { @@ -189,6 +200,10 @@ public class RecordDeliverer { return record; } + /** + * @param id + * @return + */ public GetResponse furtherDCElements(String id) { if (!id.endsWith(".0")) { @@ -217,8 +232,11 @@ public class RecordDeliverer { return responseWorkValues; } - public void putContentIntoDCFieldLists(GetResponse responseWorkValues, GetResponse relatedWorkObject) { - + /** + * @param responseWorkValues + * @param relatedWorkObject + */ + public void putContentIntoDCFieldLists(GetResponse responseWorkValues, GetResponse relatedWorkObject) { this.contributors = DublinCoreFieldLoader.setContributor(responseWorkValues, this.contributorList); this.formats = DublinCoreFieldLoader.setFormat(responseWorkValues,this.formatList); this.identifiers = DublinCoreFieldLoader.setIdentifier(responseWorkValues, this.identifierList); @@ -238,8 +256,10 @@ public class RecordDeliverer { } + /** + * @param responseWorkValues + */ public void putContentIntoDCFieldLists(GetResponse responseWorkValues) { - this.contributors = DublinCoreFieldLoader.setContributor(responseWorkValues, this.contributorList); this.coverages = DublinCoreFieldLoader.setCoverage(responseWorkValues,this.coverageList); this.creators = DublinCoreFieldLoader.setCreator(responseWorkValues,this.creatorList); @@ -265,9 +285,7 @@ public class RecordDeliverer { * @param of * jaxb object factory the DublinCore elements */ - public void setDCObject(OaiDcType odt, ObjectFactory of, DublinCoreBuilder dbc) { - dbc.setContributor(this.contributors); dbc.setCoverage(this.coverages); dbc.setCreator(this.creators); @@ -286,6 +304,9 @@ public class RecordDeliverer { } + /** + * + */ public void listClearer() { this.contributors.clear(); this.coverages.clear(); @@ -450,8 +471,8 @@ public class RecordDeliverer { * the request from the client * @return requestCheck indicating if the request is correct or not */ - public boolean requestChecker(RequestType request) { + boolean requestCheck; if (request.getFrom() != null || request.getUntil() != null