Package net.fortytwo.ripple

Examples of net.fortytwo.ripple.RippleException


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


            solutions.put(
                    stack.push(result));
        } catch (java.util.regex.PatternSyntaxException e) {
            // Hard fail (for now).
            throw new RippleException(e);
        }
    }
View Full Code Here

        try {
            HttpResponse response = client.execute(method);
            body = response.getEntity().getContent();
        } catch (Throwable t) {
            throw new RippleException(t);
        }

        try {
            BufferedReader br = new BufferedReader(
                    new InputStreamReader(body));
            StringBuffer sb = new StringBuffer();
            String nextLine = "";
            boolean first = true;
            while ((nextLine = br.readLine()) != null) {
                if (first) {
                    first = false;
                } else {
                    sb.append('\n');
                }

                sb.append(nextLine);
            }
            result = sb.toString();

            body.close();
        } catch (java.io.IOException e) {
            throw new RippleException(e);
        }

        try {
            method.abort();
        } catch (Throwable t) {
            throw new RippleException(t);
        }

        solutions.put(stack.push(mc.valueOf(result, XMLSchema.STRING)));
    }
View Full Code Here

                                final ModelConnection mc) throws RippleException {
        Object result;
        try {
            result = scriptEngine.eval(script);
        } catch (ScriptException e) {
            throw new RippleException(e);
        }

        return null == result
                ? null
                : nativize(result, mc);
View Full Code Here

        try {
            return st.startsWith("[")
                    ? JSONValue.toRippleValue(new JSONArray(st), mc)
                    : JSONValue.toRippleValue(new JSONObject(st), mc);
        } catch (JSONException e) {
            throw new RippleException(e);
        }
    }
View Full Code Here

            return clone;
        }

        // This shouldn't happen.
        catch (CloneNotSupportedException e) {
            new RippleException(e).logError();
            return this;
        }
    }
View Full Code Here

        try {
            prim = (PrimitiveStackMapping) c.newInstance();
            prim.setRdfEquivalent(mc.valueOf(URI.create(prim.getIdentifiers()[0])), mc);
        } catch (InstantiationException e) {
            throw new RippleException(e);
        } catch (IllegalAccessException e) {
            throw new RippleException(e);
        }

        // Add the primitive's stated URI to the map.
        context.addPrimaryValue(prim.toRDF(mc).sesameValue(), prim);
View Full Code Here

            String value = prop.substring(eq + 1);

            try {
                addEntry(key, value);
            } catch (ParseException e) {
                throw new RippleException(e);
            }
        }
    }
View Full Code Here

        if (null == memo) {
            // Attempt to retrieve the memo from the persistent store.
            try {
                memo = retrieveMemo(graphUri, sc);
            } catch (SailException e) {
                throw new RippleException(e);
            }

            if (null == memo) {
                // There is no such memo.  Cache the "miss" value to avoid future retrieval attempts.
                memos.put(graphUri, miss);
View Full Code Here

            sc.removeStatements(s, LinkedDataCache.CACHE_MEMO, null, LinkedDataCache.CACHE_GRAPH);
            sc.addStatement(s, LinkedDataCache.CACHE_MEMO, memoLit, LinkedDataCache.CACHE_GRAPH);

            memos.put(graphUri, memo);
        } catch (SailException e) {
            throw new RippleException(e);
        }
    }
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.