Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DARIAH-DE OAI-PMH Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DARIAH-DE
DARIAH-DE OAI-PMH Services
Commits
44308a54
Commit
44308a54
authored
5 years ago
by
mbrodhu
Browse files
Options
Downloads
Patches
Plain Diff
resolving dc attach error in dariah RecordListDeliverer
parent
24ac0883
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java
+9
-59
9 additions, 59 deletions
.../java/info/textgrid/middleware/RecordListDelivererDC.java
with
9 additions
and
59 deletions
oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java
+
9
−
59
View file @
44308a54
...
...
@@ -3,11 +3,11 @@ package info.textgrid.middleware;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Hashtable
;
import
java.util.List
;
import
java.util.Map
;
import
javax.xml.datatype.DatatypeConfigurationException
;
import
org.apache.commons.logging.LogFactory
;
import
org.elasticsearch.action.get.GetRequestBuilder
;
import
org.elasticsearch.action.get.GetResponse
;
...
...
@@ -17,11 +17,10 @@ import org.elasticsearch.common.unit.TimeValue;
import
org.elasticsearch.index.query.QueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.SearchHit
;
import
info.textgrid.middleware.oaipmh.HeaderType
;
import
info.textgrid.middleware.oaipmh.ListRecordsType
;
import
info.textgrid.middleware.oaipmh.MetadataType
;
import
info.textgrid.middleware.oaipmh.OaiDcType
;
import
info.textgrid.middleware.oaipmh.ObjectFactory
;
import
info.textgrid.middleware.oaipmh.RecordType
;
import
info.textgrid.middleware.oaipmh.ResumptionTokenType
;
...
...
@@ -60,22 +59,6 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
// DC-Field Lists
// **
/*private List<String> contributors = new ArrayList<String>();
private List<String> coverages = new ArrayList<String>();
private List<String> creators = new ArrayList<String>();
private List<String> dates = new ArrayList<String>();
private List<String> descriptions = new ArrayList<String>();
private List<String> formats = new ArrayList<String>();
private List<String> identifiers = new ArrayList<String>();
private List<String> languages = new ArrayList<String>();
private List<String> publishers = new ArrayList<String>();
private List<String> relations = new ArrayList<String>();
private List<String> rights = new ArrayList<String>();
private List<String> sources = new ArrayList<String>();
private List<String> subjects = new ArrayList<String>();
private List<String> titles = new ArrayList<String>();
private List<String> types = new ArrayList<String>();*/
private
String
[]
contributorList
;
private
String
[]
coverageList
;
private
String
[]
creatorList
;
...
...
@@ -232,15 +215,13 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
buildRecord
(
recordList
,
set
,
hit
.
getFields
().
get
(
this
.
identifierField
).
getValue
().
toString
(),
dublinCoreBuilder
);
//listClearer();
}
if
(
this
.
dariah
==
true
)
{
putContentIntoDCFieldLists2
(
hit
,
dublinCoreBuilder
=
putContentIntoDCFieldLists2
(
hit
,
furtherDCElements
(
hit
.
getId
(),
OAI_ESClient
.
getOaiESClient
()));
buildRecord
(
recordList
,
set
,
hit
.
getFields
().
get
(
this
.
identifierField
).
getValue
().
toString
(),
dublinCoreBuilder
);
//listClearer();
}
}
}
...
...
@@ -283,30 +264,13 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
result
.
setType
(
DublinCoreFieldLoader
.
setType
(
responseWorkValues
,
this
.
typeList
));
return
result
;
/*this.coverages = DublinCoreFieldLoader.setCoverage(responseWorkValues, this.coverageList);
this.creators = DublinCoreFieldLoader.setCreator(responseWorkValues, this.creatorList);
this.dates = DublinCoreFieldLoader.setDate(responseWorkValues, this.dateList);
this.descriptions =
DublinCoreFieldLoader.setDescription(responseWorkValues, this.descriptionList);
this.formats = DublinCoreFieldLoader.setFormat(hit, this.formatList);
this.identifiers = DublinCoreFieldLoader.setIdentifier(hit, this.identifierList);
this.languages = DublinCoreFieldLoader.setLanguage(hit, this.languageList);
this.publishers = DublinCoreFieldLoader.setPublisher(hit, this.publisherList);
this.relations = DublinCoreFieldLoader.setRelation(hit, this.relationList);
this.relations =
DublinCoreFieldLoader.setRelationForWork(responseWorkValues, this.relationForWorkList);
this.rights = DublinCoreFieldLoader.setRights(hit, this.rightList);
this.sources = DublinCoreFieldLoader.setSources(hit, this.sourceList);
this.subjects = DublinCoreFieldLoader.setSubject(hit, this.subjectList);
this.titles = DublinCoreFieldLoader.setTitle(hit, this.titleList);
this.types = DublinCoreFieldLoader.setType(responseWorkValues, this.typeList);*/
}
/**
* @param hit
* @param responseWorkValues
*/
public
void
putContentIntoDCFieldLists2
(
SearchHit
hit
,
GetResponse
responseWorkValues
)
{
public
DublinCoreBuilder
putContentIntoDCFieldLists2
(
SearchHit
hit
,
GetResponse
responseWorkValues
)
{
DublinCoreBuilder
result
=
new
DublinCoreBuilder
();
...
...
@@ -325,22 +289,8 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
result
.
setSubject
(
DublinCoreFieldLoader
.
setSources
(
hit
,
this
.
subjectList
));
result
.
setTitle
(
DublinCoreFieldLoader
.
setTitle
(
hit
,
this
.
titleList
));
result
.
setType
(
DublinCoreFieldLoader
.
setType
(
hit
,
this
.
typeList
));
/*this.contributors = DublinCoreFieldLoader.setContributor(hit, this.contributorList);
this.coverages = DublinCoreFieldLoader.setCoverage(hit, this.coverageList);
this.creators = DublinCoreFieldLoader.setCreator(hit, this.creatorList);
this.dates = DublinCoreFieldLoader.setDate(hit, this.dateList);
this.descriptions = DublinCoreFieldLoader.setDescription(hit, this.descriptionList);
this.formats = DublinCoreFieldLoader.setFormat(hit, this.formatList);
this.identifiers = DublinCoreFieldLoader.setIdentifier(hit, this.identifierList);
this.languages = DublinCoreFieldLoader.setLanguage(hit, this.languageList);
this.publishers = DublinCoreFieldLoader.setPublisher(hit, this.publisherList);
this.relations = DublinCoreFieldLoader.setRelation(hit, this.relationList);
this.rights = DublinCoreFieldLoader.setRights(hit, this.rightList);
this.sources = DublinCoreFieldLoader.setSources(hit, this.sourceList);
this.subjects = DublinCoreFieldLoader.setSources(hit, this.subjectList);
this.titles = DublinCoreFieldLoader.setTitle(hit, this.titleList);
this.types = DublinCoreFieldLoader.setType(hit, this.typeList);*/
return
result
;
}
/**
...
...
@@ -351,8 +301,8 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
*/
public
RecordType
buildRecord
(
ListRecordsType
recordList
,
String
set
,
String
headerIdentifier
,
DublinCoreBuilder
dublinCoreBuilder
)
{
ObjectFactory
of
=
new
ObjectFactory
();
OaiDcType
odt
=
new
OaiDcType
();
/*
ObjectFactory of = new ObjectFactory();
OaiDcType odt = new OaiDcType();
*/
//DublinCoreBuilder dublinCoreBuilder = new DublinCoreBuilder();
MetadataType
metadata
=
new
MetadataType
();
RecordType
record
=
new
RecordType
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment