assertEquals(4, propertyRecord.size());
logger.info(propertyRecord);
}
public void testImportMarcXml() throws IOException, CultureGraphException {
MarcImporter marcImporter = new MarcImporter();
HashMap<String, String> mappings = new HashMap<String, String>();
marcImporter.setMappings(mappings);
mappings.put("001", "_id");
mappings.put("010 $a", "xbib://identifierAuthorityLOC");
//TODO: bei 016 ist auch die Quelle $2 eine wichtige Information
mappings.put("016", "xbib://identifierAuthority");
mappings.put("035 $a", "xbib://identifierAuthorityEKI");
//TODO: combination of fields are relevant; code="0">(DE-588a) + code="4">aut< for PND-author
mappings.put("100", "xbib:creatorDNBGND");
mappings.put("245 $a", "dc:title");
mappings.put("502 $o", "xbib://identifierUniversityScript");
marcImporter.setPrimaryIdTemplate("urn:nbn:de:eki:cg$ID");
HashMapPropertyRecordDao dao = new HashMapPropertyRecordDao();
marcImporter.setPropertyRecordDao(dao);
marcImporter.importMarcXmlFromFile(new File(
"test/input/A2010titmrc_1.xml"));
logger.info(dao);
assertEquals(162, dao.size());
PropertyRecord firstRecord = dao.get("urn:nbn:de:eki:cg010014055");