Package com.hp.hpl.jena.update

Examples of com.hp.hpl.jena.update.UpdateException


                Graph g2 = graph(graphStore, dest) ;
                GraphUtil.addInto(g2, g) ;
            } else {
                // Quads
                if ( dest != null )
                    throw new UpdateException("Attempt to load quads into a graph") ;
                DatasetGraph dsg = DatasetGraphFactory.createMem() ;
                StreamRDF stream = StreamRDFLib.dataset(dsg) ;
                RDFDataMgr.parse(stream, s, source) ;
                Iterator<Quad>  iter = dsg.find() ;
                for ( ; iter.hasNext() ; )
                {
                    Quad q = iter.next() ;
                    graphStore.add(q) ;
                }
            }
        } catch (RuntimeException ex)
        {
            if ( ! update.getSilent() )
            {
                if ( ex instanceof UpdateException )
                    throw (UpdateException)ex ; 
                throw new UpdateException("Failed to LOAD '"+source+"'", ex) ;
            }
        }
    }
View Full Code Here


        return null ;
    }

    protected static void error(String msg)
    {
        throw new UpdateException(msg) ;
    }
View Full Code Here

        {
            if ( update instanceof UpdateWithUsing )
            {
                UpdateWithUsing upu = (UpdateWithUsing)update ;
                if ( upu.getUsing().size() != 0 || upu.getUsingNamed().size() != 0 || upu.getWithIRI() != null )
                    throw new UpdateException("SPARQL Update: Protocol using-graph-uri or using-named-graph-uri present where update request has USING, USING NAMED or WITH") ;
                for ( Node node : usingList.getUsing() )
                    upu.addUsing(node) ;
                for ( Node node : usingList.getUsingNamed() )
                    upu.addUsingNamed(node) ;
            }
View Full Code Here

                Graph g2 = graph(graphStore, dest) ;
                GraphUtil.addInto(g2, g) ;
            } else {
                // Quads
                if ( dest != null )
                    throw new UpdateException("Attempt to load quads into a graph") ;
                DatasetGraph dsg = DatasetGraphFactory.createMem() ;
                StreamRDF stream = StreamRDFLib.dataset(dsg) ;
                RDFDataMgr.parse(stream, s, source) ;
                Iterator<Quad>  iter = dsg.find() ;
                for ( ; iter.hasNext() ; )
                {
                    Quad q = iter.next() ;
                    graphStore.add(q) ;
                }
            }
        } catch (RuntimeException ex)
        {
            if ( ! update.getSilent() )
            {
                if ( ex instanceof UpdateException )
                    throw (UpdateException)ex ; 
                throw new UpdateException("Failed to LOAD '"+source+"'", ex) ;
            }
        }
    }
View Full Code Here

        return null ;
    }

    protected static void error(String msg)
    {
        throw new UpdateException(msg) ;
    }
View Full Code Here

                Graph g2 = graph(graphStore, dest) ;
                GraphUtil.addInto(g2, g) ;
            } else {
                // Quads
                if ( dest != null )
                    throw new UpdateException("Attempt to load quads into a graph") ;
                DatasetGraph dsg = DatasetGraphFactory.createMem() ;
                StreamRDF stream = StreamRDFLib.dataset(dsg) ;
                RDFDataMgr.parse(stream, s, source) ;
                Iterator<Quad>  iter = dsg.find() ;
                for ( ; iter.hasNext() ; )
                {
                    Quad q = iter.next() ;
                    graphStore.add(q) ;
                }
            }
        } catch (RuntimeException ex)
        {
            if ( ! update.getSilent() )
            {
                if ( ex instanceof UpdateException )
                    throw (UpdateException)ex ; 
                throw new UpdateException("Failed to LOAD '"+source+"'", ex) ;
            }
        }
    }
View Full Code Here

        return null ;
    }

    protected static void error(String msg)
    {
        throw new UpdateException(msg) ;
    }
View Full Code Here

        return null ;
    }

    protected static void error(String msg)
    {
        throw new UpdateException(msg) ;
    }
View Full Code Here

        for ( Iterator<Node> iter = graphStore.listGraphNodes() ; iter.hasNext() ; )
        {
            Node gn = iter.next() ;
            Graph g = graphStore.getGraph(gn) ;
            if ( g == null )
                throw new UpdateException("No such graph: "+gn) ;
            action.exec(g) ;
        }
    }
View Full Code Here

        Graph g = null ;
        if ( graphName != null )
        {
            g = graphStore.getGraph(graphName) ;
            if ( g == null )
                throw new UpdateException("No such graph: "+graphName) ;
        }
        else
            g = graphStore.getDefaultGraph() ;
        action.exec(g) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.update.UpdateException

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.