Package net.fortytwo.ripple

Examples of net.fortytwo.ripple.RippleException


        parser.setRDFHandler(new SesameInputAdapter(sink));

        try {
            parser.parse(is, baseUri);
        } catch (IOException e) {
            throw new RippleException(e);
        } catch (RDFParseException e) {
            throw new RippleException(e);
        } catch (RDFHandlerException e) {
            throw new RippleException(e);
        }

        return format;
    }
View Full Code Here


        stSink = new Sink<Statement>() {
            public void put(final Statement st) throws RippleException {
                try {
                    handler.handleStatement(st);
                } catch (RDFHandlerException e) {
                    throw new RippleException(e);
                }
            }
        };

        nsSink = new Sink<Namespace>() {
            public void put(final Namespace ns) throws RippleException {
                try {
                    handler.handleNamespace(ns.getPrefix(), ns.getName());
                } catch (RDFHandlerException e) {
                    throw new RippleException(e);
                }
            }
        };

        cmtSink = new Sink<String>() {
            public void put(final String comment) throws RippleException {
                try {
                    handler.handleComment(comment);
                } catch (RDFHandlerException e) {
                    throw new RippleException(e);
                }
            }
        };
    }
View Full Code Here

            final Resource subj, final URI pred, final Value obj, final Resource... contexts) {
        try {
            return new QueryEvaluationIteration(
                    sailConnection.getStatements(subj, pred, obj, includeInferred, contexts));
        } catch (SailException e) {
            new RippleException(e).logError();
            return new EmptyCloseableIteration<Statement, QueryEvaluationException>();
        }
    }
View Full Code Here

                                    final String baseUri) {
        try {
            parser.setRDFHandler(handler);
            parser.parse(is, baseUri);
        } catch (IOException e) {
            new RippleException(e).logError(false);
            return CacheEntry.Status.Failure;
        } catch (RDFParseException e) {
            new RippleException(e).logError(false);
            return CacheEntry.Status.ParseError;
        } catch (RDFHandlerException e) {
            new RippleException(e).logError(false);
            return CacheEntry.Status.Failure;
        }

        return CacheEntry.Status.Success;
    }
View Full Code Here

                    }
                }

                return CacheEntry.Status.Success;
            } else {
                new RippleException("could not find a reader for image").logError(false);
                return CacheEntry.Status.RdfizerError;
            }
        } catch (IOException e) {
            new RippleException(e).logError(true);
            return CacheEntry.Status.RdfizerError;
        }
    }
View Full Code Here

            line = line.trim();

            if (!line.startsWith("#") && !line.equals("")) {
                String[] args = line.split("\t");
                if (args.length != 3)
                    throw new RippleException("wrong number of aguments on line " + lineno);
                namespaceTest(args[0], args[1], args[2], mc);
            }
        }

        is.close();
View Full Code Here

                synchronized (this) {
                    // FIXME: the first wait depends on a race condition
                    try {
                        wait(WAIT_INTERVAL);
                    } catch (InterruptedException e) {
                        throw new RippleException(e);
                    }
                }
            } while (Thread.State.RUNNABLE == interpreterThread.getState());

            if (expectSuccess) {
View Full Code Here

                sail = f.createSail(uriMap, this);
            }
        }

        if (null == sail) {
            throw new RippleException("unrecognized Sail type: " + sailType);
        }
        //System.out.println("creating Sail of type: " + sailType);

        String sailLog = Ripple.getConfiguration().getString(Ripple.SAIL_LOG, null);
        if (null != sailLog) {
            try {
                sail = new RecorderSail(sail, new FileOutputStream(sailLog));
                // note: base Sail is already initialized
            } catch (FileNotFoundException e) {
                throw new RippleException(e);
            }
        }

        boolean readOnly = Ripple.getConfiguration().getBoolean(Ripple.READ_ONLY, false);
        if (readOnly) {
View Full Code Here

                ? new NativeStore(dir)
                : new NativeStore(dir, indexes.trim());
        try {
            sail.initialize();
        } catch (SailException e) {
            throw new RippleException(e);
        }

        return sail;
    }
View Full Code Here

        }

        try {
            sail.initialize();
        } catch (SailException e) {
            throw new RippleException(e);
        }

        return sail;
    }
View Full Code Here

TOP

Related Classes of net.fortytwo.ripple.RippleException

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.