Untitled
unknown
java
10 months ago
1.9 kB
5
Indexable
void processFields(Work work, EuActDto euActDto) {
// Celex ID
if (work.getIdCelex() != null) {
String celexValue = work.getIdCelex().getValue();
euActDto.setCelex(celexValue);
log.debug("Set celex to '{}'", celexValue);
} else {
log.warn("ID_CELEX field is missing or invalid.");
}
// ELI
if (work.getEli() != null) {
String eliValue = work.getEli().getValue();
euActDto.setEli(eliValue);
log.debug("Set ELI to '{}'", eliValue);
} else {
log.warn("RESOURCE_LEGAL_ELI field is missing or invalid.");
}
// OJ Number
if (work.getResourceLegalNumberNatural() != null) {
String ojNumber = work.getResourceLegalNumberNatural().getValue();
euActDto.setOjNumber(ojNumber);
log.debug("Set ojNumber to '{}'", ojNumber);
} else {
log.warn("RESOURCE_LEGAL_NUMBER_NATURAL field is missing or invalid.");
}
// Act Type
if (work.getWorkHasResourceType() != null) {
String actType = work.getWorkHasResourceType().getPrefLabel();
euActDto.setActType(actType);
log.debug("Set actType to '{}'", actType);
} else {
log.warn("WORK_HAS_RESOURCE-TYPE field is missing or invalid.");
}
// OJ Series
if (work.getOfficialJournalSeries() != null) {
String ojSeries = work.getOfficialJournalSeries().getPrefLabel();
euActDto.setOjSeries(ojSeries);
log.debug("Set ojSeries to '{}'", ojSeries);
} else {
log.warn("OFFICIAL_JOURNAL_ACT_PART_OF_COLLECTION_DOCUMENT field is missing or invalid.");
}
// Year
if (work.getYear() != null) {
String ojYear = work.getYear().getValue();
euActDto.setOjYear(ojYear);
log.debug("Set ojYear to '{}'", ojYear);
} else {
log.warn("YEAR field is missing or invalid.");
}
}Editor is loading...
Leave a Comment