-
Notifications
You must be signed in to change notification settings - Fork 7
How to find particular XML records
Pascal Christoph edited this page Jun 8, 2021
·
3 revisions
- place the XML file to "src/test/resources/alma/almaMarcXmlTestFiles.xml.tar.bz2"
- adapt the AlmaTest in AlmaMarc21XmlToLobidJsonTest.java to something like this:
private static final String PATTERN_TO_IDENTIFY_XML_RECORDS = "tag=\"647\"";
It's even possible to fish for more than one field with an OR pattern "|
" like:
private static final String PATTERN_TO_IDENTIFY_XML_RECORDS = "tag=\"654\"|tag=\"656\"|tag=\"657\"|tag=\"662\"|tag=\"69X\"";
- build and execute the AlmaTest:
mvn clean install -DskipTests=true; mvn failsafe:integration-test -Dit.test=AlmaMarc21XmlToLobidJsonTest
- look in
src/test/resources/alma/
to see the single filtered XML records - if you have fished enough, break the AlmaTest by pressing
ctrl + c
, or wait till the end
(see https://github.com/hbz/lobid-resources/issues/1222 for details)