Revision 49882
Added by Sandro La Bruzzo over 6 years ago
XsltRowTransformerFactoryTest.java | ||
---|---|---|
31 | 31 |
import eu.dnetlib.data.proto.DliProtos; |
32 | 32 |
import eu.dnetlib.data.proto.KindProtos.Kind; |
33 | 33 |
import eu.dnetlib.data.proto.TypeProtos.Type; |
34 |
import eu.dnetlib.data.proto.WdsDatasetProtos; |
|
34 | 35 |
import eu.dnetlib.miscutils.functional.xml.XMLIndenter; |
35 | 36 |
import eu.dnetlib.pace.clustering.BlacklistAwareClusteringCombiner; |
36 | 37 |
import eu.dnetlib.pace.config.DedupConfig; |
... | ... | |
187 | 188 |
} |
188 | 189 |
|
189 | 190 |
@Test |
190 |
public void testParseWDSDaaaatacite() throws Exception {
|
|
191 |
public void testParseWDSDatacite() throws Exception { |
|
191 | 192 |
|
192 |
//doTest(loadFromTransformationProfile("dmfwds2hbase.xml"), load("recordWds.xml")); |
|
193 |
final List<Row> rows = Lists.newArrayList(); |
|
194 |
rows.addAll(asRows(loadFromTransformationProfile("dmfwds2hbase.xml"), load("inputWDSDMF.xml"))); |
|
195 |
|
|
196 |
rows.forEach(row -> |
|
197 |
row.getColumns().forEach( |
|
198 |
result -> { |
|
199 |
if (result != null) { |
|
200 |
|
|
201 |
|
|
202 |
final DNGFDecoder decoder = |
|
203 |
DNGFDecoder.decode(result.getValue(), WdsDatasetProtos.WdsDataset.geolocation, WdsDatasetProtos.WdsDataset.otherRels); |
|
204 |
System.out.println(row.getKey()); |
|
205 |
Put put = HBaseTableDAO.asPutByCollectedFrom(decoder.getDNGF()); |
|
206 |
System.out.println("put.getTimeStamp() = " + put.getTimeStamp()); |
|
207 |
|
|
208 |
System.out.println("decoder.getDNGF().toString() = " + decoder.getDNGF().toString()); |
|
209 |
} |
|
210 |
} |
|
211 |
)); |
|
193 | 212 |
} |
194 | 213 |
|
195 | 214 |
|
Also available in: Unified diff
Implemented mapping from DMF to proto for WDS