All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wikidata.query.rdf.tool.MapperUtils Maven / Gradle / Ivy

Go to download

Tools to sync Wikibase to RDF stores. Also contains overall integration tests that rely on everything else.

The newest version!
package org.wikidata.query.rdf.tool;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

/**
 * Object mapping service class.
 */
public final class MapperUtils {
    // Initializing statically as instructed in https://github.com/FasterXML/jackson-modules-java8/tree/master/datetime
    private static final ObjectMapper mapper;
    static {
        mapper = new ObjectMapper();
        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        mapper.registerModule(new JavaTimeModule());
    }

    public static ObjectMapper getObjectMapper() {
        return mapper;
    }

    private MapperUtils() {}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy