Examples of UpdateException


Examples of barrysoft.twinkle.UpdateException

    SyndFeed feed;
   
    try {
      feed = sfi.build(new XmlReader(feedUrl));
    } catch (IllegalArgumentException e) {
      throw new UpdateException("Unknown type of update feed", e);
    } catch (FeedException e) {
      throw new UpdateException("Error while parsing update feed", e);
    } catch (IOException e) {
      throw new UpdateException("Can't fetch update feed", e);
    }
   
    return feed;
  }
View Full Code Here

Examples of barrysoft.twinkle.UpdateException

      op.setDescription(entry.getDescription().getValue());
   
    try {
      op.setReleaseNotesLink(new URL(spk.getReleaseNotesLink()));
    } catch (MalformedURLException e) {
      throw new UpdateException("Can't parse release note URL", e);
    }
   
    convertSparkleEnclosures(entry, op);
   
    return op;
View Full Code Here

Examples of barrysoft.twinkle.UpdateException

    SparkleEnclosure senclosure = spk.getEnclosures().get(0);
   
    try {
      targetOperation.setDownloadUrl(new URL(enclosure.getUrl()));
    } catch (MalformedURLException e1) {
      throw new UpdateException("Can't parse download url", e1);
    }
   
    targetOperation.setDownloadSize(enclosure.getLength());
    targetOperation.setDsaSignature(senclosure.getDsaSignature());
    targetOperation.setMd5Sum(senclosure.getMd5Sum());
View Full Code Here

Examples of com.github.jmkgreen.morphia.query.UpdateException

        throwOnError(wc, wr);

        //check for updated count if we have a gle
        CommandResult gle = wr.getCachedLastError();
        if (gle != null && res.getUpdatedCount() == 0)
            throw new UpdateException("Not updated: " + gle);

        postSaveOperations(entity, dbObj, involvedObjects);
        return key;
    }
View Full Code Here

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

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

        return null ;
    }

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

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

        {
            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

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

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

        return null ;
    }

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

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
TOP
Copyright © 2018 www.massapi.com. 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.