Search in sources :

Example 1 with HierarchicalGeographicDefinition

use of org.jabref.logic.importer.fileformat.mods.HierarchicalGeographicDefinition in project jabref by JabRef.

the class ModsImporter method parseTopic.

private void parseTopic(Map<String, String> fields, List<JAXBElement<?>> topicOrGeographicOrTemporal, List<String> keywords) {
    for (JAXBElement<?> jaxbElement : topicOrGeographicOrTemporal) {
        Object value = jaxbElement.getValue();
        String elementName = jaxbElement.getName().getLocalPart();
        if (value instanceof HierarchicalGeographicDefinition) {
            HierarchicalGeographicDefinition hierarchichalGeographic = (HierarchicalGeographicDefinition) value;
            parseGeographicInformation(fields, hierarchichalGeographic);
        } else if ((value instanceof StringPlusLanguagePlusAuthority) && "topic".equals(elementName)) {
            StringPlusLanguagePlusAuthority topic = (StringPlusLanguagePlusAuthority) value;
            keywords.add(topic.getValue().trim());
        }
    }
}
Also used : HierarchicalGeographicDefinition(org.jabref.logic.importer.fileformat.mods.HierarchicalGeographicDefinition) StringPlusLanguagePlusAuthority(org.jabref.logic.importer.fileformat.mods.StringPlusLanguagePlusAuthority)

Aggregations

HierarchicalGeographicDefinition (org.jabref.logic.importer.fileformat.mods.HierarchicalGeographicDefinition)1 StringPlusLanguagePlusAuthority (org.jabref.logic.importer.fileformat.mods.StringPlusLanguagePlusAuthority)1