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

Add some property fields to beans

parent 3ec82f20
No related branches found
No related tags found
No related merge requests found
......@@ -175,11 +175,6 @@ public class RecordDelivererDATACITE extends RecordDelivererAbstract {
OAIPMHtype oai = new OAIPMHtype();
HeaderType header = new HeaderType();
System.out.println(" ## fields (getRecord): ");
for (int i = 0; i < this.fields.length; i++) {
System.out.println("\t" + this.fields[i]);
}
this.jsonObj =
new JSONObject(OAIPMHUtilities.getRcordByIDFromElasticSearch(OAI_ESClient.getEsIndex(),
idInElasticSearchIndex, this.fields, Strings.EMPTY_ARRAY).getSource());
......@@ -206,47 +201,6 @@ public class RecordDelivererDATACITE extends RecordDelivererAbstract {
return oaijaxb;
}
/**
* @param idInElasticSearchIndex
* @return
* @throws ParseException
* @throws DatatypeConfigurationException
* @throws IOException
*/
@Deprecated
public GetRecordType getRecordTESTITEST(String idInElasticSearchIndex)
throws ParseException, DatatypeConfigurationException, IOException {
HeaderType header = new HeaderType();
System.out.println(" ## fields (getRecord): ");
for (int i = 0; i < this.fields.length; i++) {
System.out.println("\t" + this.fields[i]);
}
this.jsonObj =
new JSONObject(OAIPMHUtilities.getRcordByIDFromElasticSearch(OAI_ESClient.getEsIndex(),
idInElasticSearchIndex, this.fields, Strings.EMPTY_ARRAY).getSource());
// Setting the header for the oaipmh response
header.setDatestamp(OAIPMHUtilities
.datestampAsString(OAIPMHUtilities.fieldLoader(this.jsonObj, this.dateOfObjectCreation)));
// The id for the response has to be starts with "textgrid:" or "hdl:". The id in elasticsearch
// is missing. In consequence is optional in oaipmh request to write textgrid:1233.0 or
// hdl:blubb-bla or just 1233.0 or blubb-bla. For the response the prefix has to be added.
if (!idInElasticSearchIndex.startsWith(this.repositoryObjectURIPrefix)) {
header.setIdentifier(this.repositoryObjectURIPrefix + idInElasticSearchIndex);
} else {
header.setIdentifier(idInElasticSearchIndex);
}
// It is necessary to add the GetRecordType to the OAIPMH object.
GetRecordType grt = OAIPMHUtilities.getRecordType(this.setOpenAireRecord(), header);
return grt;
}
/**
* Adding the openaire record fields to the openaire record object
*
......
......@@ -48,8 +48,7 @@ public class RecordListDelivererDATACITE extends RecordListDelivererAbstract {
try {
openAireRecord = new RecordDelivererDATACITE(true, false);
// GetRecordType grt = openAireRecord.getRecordById(uri.replace("textgrid:", ""));
GetRecordType grt = openAireRecord.getRecordTESTITEST(uri.replace("textgrid:", ""));
GetRecordType grt = openAireRecord.getRecordById(uri.replace("textgrid:", ""));
openAireRecordList.getRecord().add(grt.getRecord());
} catch (ParseException | DatatypeConfigurationException | IOException e) {
// TODO Auto-generated catch block
......
......@@ -103,7 +103,6 @@
<constructor-arg index="0" value="${textgrid}" />
<constructor-arg index="1" value="${dariah}" />
<!-- Properties from abstract class -->
<property name="fields" value="${fields}" />
<property name="workFields" value="${workFields}" />
......@@ -141,7 +140,6 @@
<constructor-arg index="0" value="${textgrid}" />
<constructor-arg index="1" value="${dariah}" />
<!-- Properties from abstract class -->
<property name="fields" value="${fields}" />
<property name="workFields" value="${workFields}" />
......@@ -195,7 +193,6 @@
<constructor-arg index="0" value="${textgrid}" />
<constructor-arg index="1" value="${dariah}" />
<!-- Properties from abstract class -->
<property name="fields" value="${fields}" />
<property name="workFields" value="${workFields}" />
......@@ -269,7 +266,6 @@
<constructor-arg index="0" value="${textgrid}" />
<constructor-arg index="1" value="${dariah}" />
<!-- Properties from abstract class -->
<property name="fields" value="${fields}" />
<property name="workFields" value="${workFields}" />
......@@ -287,7 +283,6 @@
<property name="searchResponseSize"
value="${searchResponseSize}" />
<!-- Properties from DC implementation class -->
<property name="contributors" value="${contributorList}" />
<property name="coverages" value="${coverageList}" />
<property name="creators" value="${creatorList}" />
......@@ -324,7 +319,6 @@
<constructor-arg index="0" value="${textgrid}" />
<constructor-arg index="1" value="${dariah}" />
<!-- Properties from abstract class -->
<property name="fields" value="${fields}" />
<property name="workFields" value="${workFields}" />
......@@ -341,6 +335,24 @@
<property name="formatToFilter" value="${formatToFilter}" />
<property name="searchResponseSize"
value="${searchResponseSize}" />
<property name="contributors" value="${contributorList}" />
<property name="coverages" value="${coverageList}" />
<property name="creators" value="${creatorList}" />
<property name="dates" value="${dateList}" />
<property name="descriptions" value="${descriptionList}" />
<property name="formats" value="${formatList}" />
<property name="identifiers" value="${identifierList}" />
<property name="languages" value="${languageList}" />
<property name="publishers" value="${publisherList}" />
<property name="relations" value="${relationList}" />
<property name="relationsForWork"
value="${relationsForWorkList}" />
<property name="rights" value="${rightsList}" />
<property name="sources" value="${sourceList}" />
<property name="subjects" value="${subjectList}" />
<property name="titles" value="${titleList}" />
<property name="types" value="${typeList}" />
</bean>
<!-- Beans for verb=ListIdentifiers -->
......
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