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

net.fortytwo.ripple.config.SPARQLRepositorySailFactory Maven / Gradle / Ivy

There is a newer version: 1.5
Show newest version
package net.fortytwo.ripple.config;

import net.fortytwo.ripple.Ripple;
import net.fortytwo.ripple.RippleException;
import net.fortytwo.ripple.URIMap;
import org.openrdf.sail.Sail;
import org.openrdf.sail.SailException;

/**
 * @author Joshua Shinavier (http://fortytwo.net)
 */
public class SPARQLRepositorySailFactory implements SailFactory {
    @Override
    public Class getSailClass() {
        return SPARQLRepositorySail.class;
    }

    @Override
    public Sail createSail(URIMap uriMap, SailConfiguration config) throws RippleException {
        String endpoint = Ripple.getConfiguration().getString(Ripple.SPARQL_ENDPOINTURL);
        try {
            return new SPARQLRepositorySail(endpoint);
        } catch (SailException e) {
            throw new RippleException(e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy