package no.deichman.services.entity.z3950;

import com.google.common.collect.ImmutableMap;

import java.util.Map;

/**
 * Responsibility: map literary form codes to rdf.
 */
public final class LiteraryForm {
    private LiteraryForm() {
    }

    private static final Map<String, String> FORMAT_MAP = ImmutableMap.<String, String>builder()
            .put("r", "novel")
            .put("n", "shortStory")
            .put("d", "poem")
            .put("s", "drama")
            .put("t", "comicBook")
            .put("a", "anthology")
            .put("l", "textBook")
            .put("p", "pointingBook")
            .put("b", "pictureBook")
            .build();

    public static String translate(String formatCode) {
        return FORMAT_MAP.get(formatCode);
    }
}

@@ -427,17 +427,19 @@
 d%22, %22poe
-m
+try
 %22)%0A     

fix MARC mapping poem -> poetry