Package com.hp.hpl.jena.graph

Examples of com.hp.hpl.jena.graph.Graph


                Explain.explain("Execute", opQuadPattern.getPattern(), execCxt.getContext()) ;
                BasicPattern bgp = opQuadPattern.getBasicPattern() ;
                return SolverLib.execute(ds, gn, bgp, input, filter, execCxt) ;
            }
            // Maybe a TDB named graph inside a non-TDB dataset.
            Graph g = execCxt.getActiveGraph() ;
            if ( g instanceof GraphTDB )
            {
                // Triples graph from TDB (which is the default graph of the dataset),
                // used a named graph in a composite dataset.
                BasicPattern bgp = opQuadPattern.getBasicPattern() ;
View Full Code Here


    // ---- DataSourceGraph
   
    @Override
    public void addGraph(Node graphName, Graph graph)
    {
        Graph g = getGraph(graphName) ;
        GraphUtil.addInto(g, graph) ;
    }
View Full Code Here

        sync(dataset.getDefaultGraph()) ;
        Iterator<Node> iter = dataset.listGraphNodes() ;
        iter = Iter.toList(iter).iterator() ; // Avoid iterator concurrency.
        for (; iter.hasNext();) {
            Node n = iter.next() ;
            Graph g = dataset.getGraph(n) ;
            sync(g) ;
        }
    }
View Full Code Here

     * firing when real data is added. Used to implement bindSchema processing
     * in the parent Reasoner.
     * @return return true if the rule set has also been loaded
     */
    protected boolean preloadDeductions(Graph preloadIn) {
        Graph d = fdeductions.getGraph();
        BasicForwardRuleInfGraph preload = (BasicForwardRuleInfGraph) preloadIn;
        // If the rule set is the same we can reuse those as well
        if (preload.rules == rules) {
            // Load raw deductions
            for (Iterator<Triple> i = preload.find(null, null, null); i.hasNext(); ) {
                d.add(i.next());
            }
            engine.setRuleStore(preload.engine.getRuleStore());
            return true;
        } else {
            return false;
View Full Code Here

     */  
    @Override
    public void performDelete(Triple t) {
        version++;
        if (fdata != null) {
            Graph data = fdata.getGraph();
            if (data != null) {
                data.delete(t);
            }
        }
        if (!this.isPrepared()) {
            fdeductions.getGraph().delete(t);
        }
View Full Code Here

     * wrapper can be reused if present thus enabling preservation of
     * listeners.
     */
    protected Graph createDeductionsGraph() {
        if (fdeductions != null) {
            Graph dg = fdeductions.getGraph();
            if (dg != null) {
                // Reuse the old graph in order to preserve any listeners
                safeDeductions.clear();
                return dg;
            }
        }
        Graph dg = Factory.createGraphMem( );
        safeDeductions = new SafeGraph( dg );
        return dg;
    }
View Full Code Here

           
            boolean syntheticGraph = ( Quad.isDefaultGraph(graphNode) || Quad.isUnionGraph(graphNode) ) ;
            if ( ! syntheticGraph && ! outerCxt.getDataset().containsGraph(graphNode) )
                return null ;

            Graph g = outerCxt.getDataset().getGraph(graphNode) ;
            // And the contains was true??!!!!!!
            if ( g == null )
                return null ;
                //throw new ARQInternalErrorException(".containsGraph was true but .getGraph is null") ;
           
View Full Code Here

    @Override
    public QueryIterator execute(BasicPattern pattern, QueryIterator input, ExecutionContext execCxt) {
        if ( input == null )
            Log.fatal(this, "Null input to " + Utils.classShortName(this.getClass())) ;

        Graph graph = execCxt.getActiveGraph() ;

        // Choose reorder transformation and execution strategy.

        ReorderTransformation reorder = reorderFixed ;
        StageGenerator executor = StageBuilder.executeInline ;
View Full Code Here

public abstract class DatasetGraphCollection extends DatasetGraphBaseFind
{
    @Override
    public void add(Quad quad)
    {
        Graph g = fetchGraph(quad.getGraph()) ;
        if ( g == null )
            throw new JenaException("No such graph: "+quad.getGraph()) ;
        g.add(quad.asTriple()) ;
    }
View Full Code Here

    }

    @Override
    public void delete(Quad quad)
    {
        Graph g = fetchGraph(quad.getGraph()) ;
        if ( g == null )
            throw new JenaException("No such graph: "+quad.getGraph()) ;
        g.delete(quad.asTriple()) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.graph.Graph

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.