Package net.fortytwo.ripple.config

Source Code of net.fortytwo.ripple.config.SPARQLRepositorySail

package net.fortytwo.ripple.config;

import net.fortytwo.sesametools.reposail.RepositorySail;
import org.openrdf.repository.Repository;
import org.openrdf.repository.RepositoryException;
import org.openrdf.repository.sparql.SPARQLRepository;
import org.openrdf.sail.SailException;

/**
* @author Joshua Shinavier (http://fortytwo.net)
*/
public class SPARQLRepositorySail extends RepositorySail {
    public SPARQLRepositorySail(final String endpoint) throws SailException {
        super(createRepo(endpoint));
    }

    private static Repository createRepo(final String endpoint) throws SailException {
        Repository repo = new SPARQLRepository(endpoint);
        try {
            repo.initialize();
        } catch (RepositoryException e) {
            throw new SailException(e);
        }
        return repo;
    }
}
TOP

Related Classes of net.fortytwo.ripple.config.SPARQLRepositorySail

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.