Revision 47517
Added by Alessia Bardi almost 7 years ago
IndexFieldParserTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.data.mdstore.modular.mongodb; |
2 | 2 |
|
3 |
import eu.dnetlib.data.mdstore.modular.MDFormatDescription; |
|
4 |
import eu.dnetlib.data.mdstore.modular.mongodb.utils.IndexFieldRecordParser; |
|
5 |
import org.apache.commons.io.IOUtils; |
|
6 |
import org.junit.Test; |
|
7 |
|
|
8 | 3 |
import java.io.IOException; |
9 | 4 |
import java.io.InputStream; |
10 | 5 |
import java.util.ArrayList; |
11 | 6 |
import java.util.List; |
12 | 7 |
import java.util.Map; |
13 | 8 |
|
9 |
import eu.dnetlib.data.mdstore.MDStoreServiceException; |
|
10 |
import eu.dnetlib.data.mdstore.modular.MDFormatDescription; |
|
11 |
import eu.dnetlib.data.mdstore.modular.mongodb.utils.IndexFieldRecordParser; |
|
12 |
import eu.dnetlib.data.mdstore.modular.mongodb.utils.IndexFieldRecordParserException; |
|
13 |
import org.apache.commons.io.IOUtils; |
|
14 |
import org.junit.Test; |
|
15 |
|
|
14 | 16 |
/** |
15 | 17 |
* Created by sandro on 11/29/16. |
16 | 18 |
*/ |
... | ... | |
18 | 20 |
|
19 | 21 |
|
20 | 22 |
@Test |
21 |
public void parserTest() throws IOException { |
|
23 |
public void parserTest() throws IOException, MDStoreServiceException, IndexFieldRecordParserException {
|
|
22 | 24 |
InputStream inputStream = this.getClass().getResourceAsStream("/eu/dnetlib/data/mdstore/modular/mongodb/inputRecord.xml"); |
23 | 25 |
|
24 | 26 |
final String inputRecord = IOUtils.toString(inputStream); |
Also available in: Unified diff
Stroing in mdstore fails if the VTD Parser cannot properly apply the xpaths on records to index