Package org.apache.jena.web

Examples of org.apache.jena.web.DatasetGraphAccessor


   
    @Override
    public void store(String uri, Model model)
    {
        Node graphNode = NodeFactory.createURI(uri);
        DatasetGraphAccessor accessor = this.getAccessor();
        Dataset ds = DatasetFactory.create(model);
        DatasetGraph dsg = ds.asDatasetGraph();
        Graph g = dsg.getDefaultGraph();
        accessor.httpPut(graphNode, g);
    }
View Full Code Here


    }
   
    public Model load(String uri)
    {
        Node graphNode = NodeFactory.createURI(uri);
        DatasetGraphAccessor accessor = this.getAccessor();
        Graph g = accessor.httpGet(graphNode);
        if (g == null || g.isEmpty())
        {
            return null;
        }
        GraphStore gs = GraphStoreFactory.create(g);
View Full Code Here

        return m;
    }
   
    protected DatasetGraphAccessor getAccessor()
    {
        DatasetGraphAccessor accessor;
        if (this.GRAPHSTORE_LOGIN != null)
        {
            HttpAuthenticator httpAuthenticator = new SimpleAuthenticator(
                    GRAPHSTORE_LOGIN, GRAPHSTORE_PASSWORD.toCharArray());
            accessor = new DatasetGraphAccessorHTTP(GRAPHSTORE_ENDPOINT,
View Full Code Here

TOP

Related Classes of org.apache.jena.web.DatasetGraphAccessor

Copyright © 2018 www.massapicom. 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.