Package com.hp.hpl.jena.graph

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


        out.ensureStartOfLine() ;
        for ( Iterator<Node> iter = ds.listGraphNodes() ; iter.hasNext() ; )
        {
            Node node = iter.next()
            out.ensureStartOfLine() ;
            Graph g = ds.getGraph(node) ;
            writeGraph(out, g, node, naming) ;
        }
        WriterLib.finish(out, Tags.tagDataset) ;
        out.ensureStartOfLine() ;
    }
View Full Code Here


    {
        PrefixMapping pmap = new PrefixMappingImpl() ;
        for ( Node gn : graphs )
        {
            if ( ! gn.isURI() ) continue ;
            Graph g = dataset.getGraph(gn) ;
            PrefixMapping pmapNamedGraph = g.getPrefixMapping() ;
            pmap.setNsPrefixes(pmapNamedGraph) ;
        }
        return pmap ;
    }
View Full Code Here

public class BuilderGraph
{
    public static Graph buildGraph(Item item)
    {
        Graph graph = GraphFactory.createDefaultGraph() ;
        buildGraph(graph, item) ;
        return graph ;
    }
View Full Code Here

        return graph ;
    }
   
    public static Graph buildGraph(ItemList itemList)
    {
        Graph graph = GraphFactory.createDefaultGraph() ;
        buildGraph(graph, itemList) ;
        return graph ;
    }
View Full Code Here

        if (item.isSymbol() )
            BuilderLib.broken(item, "Attempt to build dataset from a bare symbol") ;

        if ( item.isTagged(Tags.tagGraph) )
        {
            Graph g = BuilderGraph.buildGraph(item.getList()) ;
            return DatasetGraphFactory.create(g) ;
        }
       
        if ( ! item.isTagged(Tags.tagDataset) )
            BuilderLib.broken(item, "Wanted ("+Tags.tagDataset+"...)" );
View Full Code Here

            {
                name = graphContent.car().getNode();
                graphContent = graphContent.cdr() ;
            }
           
            Graph g ;
            if ( name == null )
            {
                g = dsg.getDefaultGraph() ;
                if ( g == null )
                {
View Full Code Here

     * is the dynamic dataset from the collection of graphs from the dataset
     * that go to make up the default graph (union) and named graphs. 
     */
    public static DatasetGraph dynamicDataset(Collection<Node> defaultGraphs, Collection<Node> namedGraphs, DatasetGraph dsg, boolean defaultUnionGraph)
    {
        Graph dft = new GraphUnionRead(dsg, defaultGraphs) ;
        DatasetGraph dsg2 = new DatasetGraphMap(dft) ;
       
        // The named graphs.
        for ( Node gn : namedGraphs )
        {
            Graph g = GraphOps.getGraph(dsg, gn) ;
            if ( g != null )
                dsg2.addGraph(gn, g) ;
        }
       
        if ( dsg.getContext() != null )
            dsg2.getContext().putAll(dsg.getContext()) ;

        if ( defaultUnionGraph && defaultGraphs.size() == 0 )
        {
            // Create a union graph - there were no defaultGraphs explicitly named.
            Graph unionGraph = new GraphUnionRead(dsg, namedGraphs) ;
            dsg2.setDefaultGraph(unionGraph) ;
        }

        // read-only, <urn:x-arq:DefaultGraph> and <urn:x-arq:UnionGraph> processing.
        dsg2 = new DynamicDatasetGraph(dsg2) ;
View Full Code Here

        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

     */
    @Deprecated
    public static Graph assembleGraph(String assemblerFile)
    {
        Model m = assembleModel(assemblerFile) ;
        Graph g = m.getGraph() ;
        return g ;
    }
View Full Code Here

   
    /** Get the default model of a Dataset */
    @Override
    public Model getModel()
    {
        Graph g = updater.httpGet() ;
        return ModelFactory.createModelForGraph(g) ;
    }
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.