Package com.hp.hpl.jena.sparql.core

Examples of com.hp.hpl.jena.sparql.core.DatasetGraph


    @Override
    public Plan create(Query query, DatasetGraph dsg, Binding inputBinding, Context context) {
        if ( !dsg instanceof DatasetGraphWrapper ) )
            return null ;   
        DatasetGraph dsg2 = ((DatasetGraphWrapper)dsg).getWrapped() ;
        return QueryEngineRegistry.findFactory(query, dsg2, context).create(query, dsg2, inputBinding, context) ;
    }
View Full Code Here


    @Override
    public boolean accept(Op op, DatasetGraph dsg, Context context) {
        if ( !dsg instanceof DatasetGraphWrapper ) )
            return false ;   
        DatasetGraph dsg2 = ((DatasetGraphWrapper)dsg).getWrapped() ;
        return QueryEngineRegistry.findFactory(op, dsg2, context).accept(op, dsg2, context) ;
    }
View Full Code Here

    @Override
    public Plan create(Op op, DatasetGraph dsg, Binding inputBinding, Context context) {
        if ( !dsg instanceof DatasetGraphWrapper ) )
            return null ;   
        DatasetGraph dsg2 = ((DatasetGraphWrapper)dsg).getWrapped() ;
        return QueryEngineRegistry.findFactory(op, dsg2, context).create(op, dsg2, inputBinding, context) ;
    }
View Full Code Here

    }
   
    private DatasetGraph toDSG(DatasetGraph dataset, Node graphNode)
    {
        Graph graph = ( graphNode == null ) ? dataset.getDefaultGraph() : dataset.getGraph(graphNode) ;
        DatasetGraph dsGraph = DatasetGraphFactory.create(graph) ;
        return dsGraph ;
    }
View Full Code Here

    }

    /** Sync a TDB-backed Dataset. Do nothing if not TDB-backed. */
    public static void sync(Dataset dataset)
    {
        DatasetGraph ds = dataset.asDatasetGraph() ;
        sync(ds) ;
    }
View Full Code Here

    }

    /** Return the location of a dataset if it is backed by TDB, else null */
    public static boolean isBackedByTDB(Dataset dataset)
    {
        DatasetGraph dsg = dataset.asDatasetGraph() ;
        return isBackedByTDB(dsg) ;
    }
View Full Code Here

       

    /** Return the location of a dataset if it is backed by TDB, else null */
    public static Location location(Dataset dataset)
    {
        DatasetGraph dsg = dataset.asDatasetGraph() ;
        return location(dsg) ;
    }
View Full Code Here

    }

    @Override
    protected void exec()
    {
        DatasetGraph dsg = super.getDatasetGraphTDB() ;
        RDFDataMgr.write(System.out, dsg, Lang.NQUADS) ;
    }
View Full Code Here

        if ( ! exactlyOneProperty(root, pLocation) )
            throw new AssemblerException(root, "No location given") ;

        String dir = getStringValue(root, pLocation) ;
        Location loc = new Location(dir) ;
        DatasetGraph dsg = TDBFactory.createDatasetGraph(loc) ;
       
        if ( root.hasProperty(pUnionDefaultGraph) )
        {
            Node b = root.getProperty(pUnionDefaultGraph).getObject().asNode() ;
            NodeValue nv = NodeValue.makeNode(b) ;
            if ( nv.isBoolean() )
                dsg.getContext().set(TDB.symUnionDefaultGraph, nv.getBoolean()) ;
            else
                Log.warn(DatasetAssemblerTDB.class,
                         "Failed to recognize value for union graph setting (ignored): "+b) ;
        }
       
View Full Code Here

    private static class BuilderBase implements DatasetGraphMakerTDB
    {
        @Override
        public DatasetGraphTDB createDatasetGraph(Location location)
        {
            DatasetGraph dsg = TDBFactory.createDatasetGraph(location) ;
            return TDBInternal.getBaseDatasetGraphTDB(dsg) ;
        }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.core.DatasetGraph

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.