Skip to content
Snippets Groups Projects
Commit 8c453ce5 authored by Stefan E. Funk's avatar Stefan E. Funk
Browse files

minor changes, typos, etcpp.

added new dariahrepository collection mimetype (not used at the moment in oaipmh), but adapted now.
parent 1e4ddcd3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment