Package net.fortytwo.ripple

Examples of net.fortytwo.ripple.RippleException


                // This makes candidates from multiple completors available at once.
                Completer multiCompletor = new AggregateCompleter(completors);

                reader.addCompleter(multiCompletor);
            } catch (Throwable t) {
                throw new RippleException(t);
            }
        } catch (RippleException e) {
            e.logError();
            logger.severe("failed to update completors");
        }
View Full Code Here


            int lim = is.available();
            for (int i = 0; i < lim; i++) {
                is.read();
            }
        } catch (IOException e) {
            throw new RippleException(e);
        }
    }
View Full Code Here

        // Report parser errors to user, but don't log them.
        else if (e instanceof RecognitionException) {
            alert("Parser error: " + e.toString());
        } else {
            alert("Strange error (see log for details): " + e.toString());
            (new RippleException(e)).logError(true);
        }
    }
View Full Code Here

                        .push(Operator.OP)
                        .push(ControlLibrary.getTimesApplyValue())
                        .push(min.getValue(mc));
                break;
            default:
                throw new RippleException("unhandled operator type: " + type);
        }

        sink.put(l);
    }
View Full Code Here

                            statement.getSubject(),
                            statement.getPredicate(),
                            statement.getObject(),
                            statement.getContext());
                } catch (SailException e) {
                    throw new RippleException(e);
                }
            }
        };

        final Sink<Statement> subtractStatementSink = new Sink<Statement>() {
            public void put(final Statement statement) throws RippleException {
                try {
                    sailConnection.removeStatements(
                            statement.getSubject(),
                            statement.getPredicate(),
                            statement.getObject(),
                            statement.getContext());
                } catch (SailException e) {
                    throw new RippleException(e);

                }
            }
        };

        final Sink<Namespace> addNamespaceSink = new Sink<Namespace>() {
            public void put(final Namespace namespace) throws RippleException {
                try {
                    sailConnection.setNamespace(namespace.getPrefix(), namespace.getName());
                } catch (SailException e) {
                    throw new RippleException(e);
                }
            }
        };

        final Sink<Namespace> subtractNamespaceSink = new Sink<Namespace>() {
            public void put(final Namespace namespace) throws RippleException {
                String name = null;
                try {
                    name = sailConnection.getNamespace(namespace.getPrefix());

                    if (null != name && name.equals(namespace.getName())) {
                        sailConnection.removeNamespace(namespace.getPrefix());
                    }
                } catch (SailException e) {
                    throw new RippleException(e);
                }
            }
        };

        final Sink<String> addCommentSink = new NullSink<String>();
View Full Code Here

    public String getDefaultNamespace() throws RippleException {
        String uri = getNamespaceUri("");

        if (null == uri) {
            throw new RippleException("no default namespace is defined.  Use '@prefix : <...>.'\n");
        }

        return uri;
    }
View Full Code Here

                }
            } finally {
                is.close();
            }
        } catch (IOException e) {
            throw new RippleException(e);
        }
    }
View Full Code Here

                if (!line.startsWith("#") && !line.equals("")) {
                    lines.add(line);
                }
            }
        } catch (java.io.IOException e) {
            throw new RippleException(e);
        }

        return lines;
    }
View Full Code Here

                query = (null == context)
                        ? new StatementPatternQuery(null, predicate, sourceVal)
                        : new StatementPatternQuery(null, predicate, sourceVal, context);
                break;
            default:
                throw new RippleException("unsupported query type: " + type);
        }

        Sink<RippleValue> resultSink = new ValueSink(arg, solutions);

        //System.out.println("asynch: " + Ripple.asynchronousQueries());
View Full Code Here

                break;
            case PO_S:
                inverseType = StatementPatternQuery.Pattern.SP_O;
                break;
            default:
                throw new RippleException("unsupported query type: " + type);
        }

        return new RDFPredicateMapping(inverseType, this.predicate, this.context);
    }
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.