Revision 58071
Added by Alessia Bardi about 4 years ago
OafToHbaseXsltFunctions.java | ||
---|---|---|
126 | 126 |
|
127 | 127 |
addStructuredProps(metadata, mDesc.findFieldByName("subject"), values.get("subject"), "keyword", "dnet:subject_classification_typologies"); |
128 | 128 |
addStructuredProps(metadata, mDesc.findFieldByName("title"), values.get("title"), "main title", "dnet:dataCite_title"); |
129 |
for (final String fieldname : Lists.newArrayList("description", "source", "contributor", "refereed")) {
|
|
129 |
for (final String fieldname : Lists.newArrayList("description", "source", "contributor")) { |
|
130 | 130 |
if (values.get(fieldname) != null) { |
131 | 131 |
for (final String s : values.get(fieldname).listValues()) { |
132 | 132 |
addField(metadata, mDesc.findFieldByName(fieldname), s); |
... | ... | |
158 | 158 |
} |
159 | 159 |
} |
160 | 160 |
|
161 |
// #4468: processingchargeamount - implementatio to clarify: result vs instance. Single value vs repeatable |
|
162 |
// if (values.get("processingchargeamount") != null) { |
|
163 |
// ElementList processingchargeamount = values.get("processingchargeamount"); |
|
164 |
// for(Element pc : processingchargeamount) { |
|
165 |
// addField(metadata, mDesc.findFieldByName("processingchargeamount"), pc.getText()); |
|
166 |
// addField(metadata, mDesc.findFieldByName("processingchargecurrency"), pc.getAttributeValue("processingchargecurrency")); |
|
167 |
// } |
|
168 |
// } |
|
169 | 161 |
return metadata; |
170 | 162 |
} |
171 | 163 |
|
... | ... | |
208 | 200 |
addField(instance, Instance.getDescriptor().findFieldByName("url"), |
209 | 201 |
Lists.newArrayList(Iterables.filter(values.get("identifier").listValues(), urlFilter))); |
210 | 202 |
} |
203 |
if (values.get("refereed") != null) { |
|
204 |
addField(instance, Instance.getDescriptor().findFieldByName("refereed"), values.get("refereed").listValues()); |
|
205 |
} |
|
211 | 206 |
|
207 |
// #4468: processingchargeamount - implementatio to clarify: result vs instance. Single value vs repeatable |
|
208 |
// if (values.get("processingchargeamount") != null) { |
|
209 |
// ElementList processingchargeamount = values.get("processingchargeamount"); |
|
210 |
// for(Element pc : processingchargeamount) { |
|
211 |
// addField(instance, Instance.getDescriptor().findFieldByName("processingchargeamount"), pc.getText()); |
|
212 |
// addField(instance, Instance.getDescriptor().findFieldByName("processingchargecurrency"), pc.getAttributeValue("processingchargecurrency")); |
|
213 |
// } |
|
214 |
// } |
|
215 |
|
|
212 | 216 |
result.addInstance(instance); |
213 | 217 |
|
214 | 218 |
final List<Element> extrefs = values.get("reference"); |
Also available in: Unified diff
#4008: refereed field as property of the result instance and supported both from OAF and ODF.