eu.mondo.driver.mongo.util.StatementModule.java Source code

Java tutorial

Introduction

Here is the source code for eu.mondo.driver.mongo.util.StatementModule.java

Source

/*******************************************************************************
 * Copyright (c) 2010-2014, Daniel Stein, Istvan Rath and Daniel Varro
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Daniel Stein - implementation for Mongo
 *******************************************************************************/

package eu.mondo.driver.mongo.util;

import org.openrdf.model.Statement;

import com.fasterxml.jackson.databind.module.SimpleModule;

/**
 * 
 * @author Dniel Stein
 *
 */
public class StatementModule extends SimpleModule {

    private static final long serialVersionUID = 1L;

    public StatementModule() {
        addDeserializer(MStatement.class, new MStatementDeserializer());
        addSerializer(MStatement.class, new MStatementSerializer());

        //        addDeserializer(Statement.class, new StatementDeserializer());
        addSerializer(Statement.class, new StatementSerializer());
    }

}