Package com.hp.hpl.jena.graph

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


    @Override
    public void write(Model model, OutputStream out, String base)
    {
        if ( base != null && base.equals("") )
            base = null ;
        Graph graph = model.getGraph() ;
        writer().write(out, graph, RiotLib.prefixMap(graph), base, context) ;
    }
View Full Code Here


            // Go through each graph.
            Iterator<Node> iter = Iter.iterator(dataset.listGraphNodes()) ;
            for ( ; iter.hasNext() ; )
            {
                Node n = iter.next();
                Graph g = dataset.getGraph(n) ;
                sync(g) ;
            }
        }
    }
View Full Code Here

    // Ask directly.
    private QueryIterator execEvaluatedConcrete(Binding binding, Node containerNode, Node predicate, Node member,
                                                ExecutionContext execCxt)
    {
        QueryIterator input = QueryIterSingleton.create(binding, execCxt) ;
        Graph graph = execCxt.getActiveGraph() ;
        QueryIterator qIter = new QueryIterTriplePattern(input, new Triple(containerNode, predicate, member), execCxt) ;
        return qIter ;
    }
View Full Code Here

    }

    // Ask by finding all the rdf:_N + rdf:type 
    private QueryIterator execEvaluatedCalc(Binding binding, Node containerNode, Node predicate, Node member, ExecutionContext execCxt)
    {   
        Graph graph = execCxt.getActiveGraph() ;
        if ( ! containerNode.isVariable() )
        {
            // Container a ground term.
            if ( ! GraphContainerUtils.isContainer(execCxt.getActiveGraph(), containerNode, typeNode) )
                return IterLib.noResults(execCxt) ;
View Full Code Here

       
        s = Var.lookup(binding, s) ;
        o = Var.lookup(binding, o) ;
        Iterator<Node> iter = null ;
        Node endNode = null ;
        Graph graph = execCxt.getActiveGraph() ;
       
        if ( Var.isVar(s) && Var.isVar(o) )
        {
            if ( s.equals(o) )
                return ungroundedPathSameVar(binding, graph, Var.alloc(s), path, execCxt) ;
View Full Code Here

        putGraph(dataset.getDefaultGraph(), data) ;
    }

    @Override
    public void httpPut(Node graphName, Graph data) {
        Graph ng = dataset.getGraph(graphName) ;
        if ( ng == null )
            dataset.addGraph(graphName, ng) ;
        else
            putGraph(ng, data) ;
    }
View Full Code Here

        clearGraph(dataset.getDefaultGraph()) ;
    }

    @Override
    public void httpDelete(Node graphName) {
        Graph ng = dataset.getGraph(graphName) ;
        if ( ng == null )
            return ;
        dataset.removeGraph(graphName) ;
        // clearGraph(ng) ;
    }
View Full Code Here

        mergeGraph(dataset.getDefaultGraph(), data) ;
    }

    @Override
    public void httpPost(Node graphName, Graph data) {
        Graph ng = dataset.getGraph(graphName) ;
        if ( ng == null ) {
            dataset.addGraph(graphName, data) ;
            return ;
        }
        mergeGraph(ng, data) ;
View Full Code Here

            Item item = SSE.parse(in) ;
            read(item, baseURI, ct, output, context) ;
        }

        private void read(Item item, String baseURI, ContentType ct, StreamRDF output, Context context) {
            Graph graph = BuilderGraph.buildGraph(item) ;
            Iterator<Triple> iter = graph.find(null, null, null) ;
            for ( ; iter.hasNext() ; )
                output.triple(iter.next()) ;
        }
View Full Code Here

        }
       
        @Override
        public QueryIterator execute(OpBGP opBGP, QueryIterator input)
        {
            Graph g = execCxt.getActiveGraph() ;
           
            if ( g instanceof GraphTDB )
            {
                BasicPattern bgp = opBGP.getPattern() ;
                Explain.explain("Execute", bgp, execCxt.getContext()) ;
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.