marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wik...@apache.org
Subject [040/100] [abbrv] [partial] Reverting the erroneous merge by Sebastian according to the instructions in INFRA-6876
Date Fri, 13 Jun 2014 08:58:00 GMT
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/JSONLDUtils.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/JSONLDUtils.java b/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/JSONLDUtils.java
deleted file mode 100644
index 8e67644..0000000
--- a/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/JSONLDUtils.java
+++ /dev/null
@@ -1,855 +0,0 @@
-package de.dfki.km.json.jsonld;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class JSONLDUtils {
-
-    public static class NameGenerator {
-        private String prefix;
-        private int count;
-
-        public NameGenerator(String prefix) {
-            this.prefix = prefix;
-            this.count = -1;
-        }
-
-        public String next() {
-            count += 1;
-            return current();
-        }
-
-        public String current() {
-            return "_:" + prefix + count;
-        }
-
-        public boolean inNamespace(String iri) {
-            return iri.startsWith("_:" + prefix);
-        }
-    }
-
-    public static Map<String, String> getKeywords(Object ctx) {
-        Map<String, String> rval = new HashMap<String, String>();
-        rval.put("@id", "@id");
-        rval.put("@language", "@language");
-        rval.put("@value", "@value");
-        rval.put("@type", "@type");
-
-        if (ctx != null && ctx instanceof Map) {
-            Map<String, String> keywords = new HashMap<String, String>();
-            for (String key : ((Map<String, Object>) ctx).keySet()) {
-                Object value = ((Map<String, String>) ctx).get(key);
-                if (value instanceof String && rval.containsKey(value)) {
-                    keywords.put((String) value, key);
-                }
-            }
-
-            rval.putAll(keywords);
-        }
-        return rval;
-    }
-
-    public static String getTermIri(Object ctx, String term) {
-        String rval = null;
-
-        if (((Map<String, Object>) ctx).containsKey(term)) {
-            Object t = ((Map<String, Object>) ctx).get(term);
-            if (t instanceof String) {
-                rval = (String) t;
-            } else if (t instanceof Map && ((Map<String, Object>) t).containsKey("@id")) {
-                rval = (String) ((Map<String, Object>) t).get("@id");
-            }
-        }
-
-        return rval;
-    }
-
-    public static Map<String, Object> mergeContexts(Object ctxOne, Object ctxTwo) {
-
-        Map<String, Object> ctx1;
-        Map<String, Object> ctx2;
-
-        if (ctxOne instanceof List) {
-            ctx1 = mergeContexts(new HashMap<String, Object>(), ctxOne);
-        } else {
-            ctx1 = (Map<String, Object>) ctxOne;
-        }
-
-        Map<String, Object> merged = (Map<String, Object>) clone(ctx1);
-
-        if (ctxTwo instanceof List) {
-            for (Object i : (List<Object>) ctxTwo) {
-                merged = mergeContexts(merged, i);
-            }
-        } else {
-            ctx2 = (Map<String, Object>) ctxTwo;
-
-            for (String key : ctx2.keySet()) {
-                if (!key.startsWith("@")) {
-                    for (String mkey : merged.keySet()) {
-                        if (merged.get(mkey).equals(ctx2.get(key))) {
-                            // FIXME: update related @coerce rules
-                            merged.remove(mkey);
-                            break;
-                        }
-                    }
-                }
-            }
-
-            // merge contexts
-            for (String key : ctx2.keySet()) {
-                merged.put(key, ctx2.get(key));
-            }
-        }
-        return merged;
-    }
-
-    @Deprecated
-    // TODO: it may make sense to keep this function, as usedCtx can be null
-    public static String compactIRI(Map<String, Object> ctx, String iri) {
-        return compactIRI(ctx, iri, null);
-    }
-
-    public static String compactIRI(Map<String, Object> ctx, String iri, Map<String, Object> usedCtx) {
-        String rval = null;
-
-        for (String key : ctx.keySet()) {
-            if (!key.startsWith("@")) {
-                if (iri.equals(getTermIri(ctx, key))) {
-                    // compact to a term
-                    rval = key;
-                    if (usedCtx != null) {
-                        usedCtx.put(key, clone(ctx.get(key)));
-                    }
-                    break;
-                }
-            }
-        }
-
-        // term not found, if term is keyword, use alias
-        if (rval == null) {
-            Map<String, String> keywords = getKeywords(ctx);
-            if (keywords.containsKey(iri)) {
-                rval = keywords.get(iri);
-                if (!rval.equals(iri) && usedCtx != null) {
-                    usedCtx.put(rval, iri);
-                }
-            }
-        }
-
-        if (rval == null) {
-            // rval still not found, check the context for a CURIE prefix
-            for (String key : ctx.keySet()) {
-                if (!key.startsWith("@")) {
-                    String ctxIRI = getTermIri(ctx, key);
-
-                    if (ctxIRI != null) {
-                        if (iri.startsWith(ctxIRI) && iri.length() > ctxIRI.length()) {
-                            rval = key + ":" + iri.substring(ctxIRI.length());
-                            if (usedCtx != null) {
-                                usedCtx.put(key, clone(ctx.get(key)));
-                            }
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-
-        if (rval == null) {
-            // could not compact IRI
-            rval = iri;
-        }
-
-        return rval;
-    }
-
-    @Deprecated
-    // TODO: dep'd for backwards compatibility, but perhaps it's a valid
-    // function as usedCtx can be null
-    public static String getCoercionType(Map<String, Object> ctx, String property) {
-        return getCoercionType(ctx, property, new HashMap<String, Object>());
-    }
-
-    public static String getCoercionType(Map<String, Object> ctx, String property, Map<String, Object> usedCtx) {
-        String rval = null;
-
-        // get expanded property
-        String p = expandTerm(ctx, property, null);
-
-        // built-in type coercion JSON-LD-isms
-        if ("@id".equals(p) || "@type".equals(p)) {
-            rval = "@id";
-        } else {
-            p = compactIRI(ctx, p, null);// , null);
-
-            if (ctx.containsKey(p) && ctx.get(p) instanceof Map && ((Map<String, String>) ctx.get(p)).containsKey("@type")) {
-                String type = ((Map<String, String>) ctx.get(p)).get("@type");
-                rval = expandTerm(ctx, type, usedCtx);
-                if (usedCtx != null) {
-                    usedCtx.put(p, clone(ctx.get(p)));
-                }
-            }
-
-        }
-
-        return rval;
-    }
-
-    @Deprecated
-    // TODO: remove depreciated
-    public static String expandTerm(Map<String, Object> ctx, String term) {
-        return expandTerm(ctx, term, null);
-    }
-
-    public static String expandTerm(Map<String, Object> ctx, String term, Map<String, Object> usedCtx) {
-        Map<String, String> keywords = getKeywords(ctx);
-        String rval = term;
-
-        // 1. If the property has a colon, it has a prefix or an absolute IRI:
-        int idx = term.indexOf(":");
-        if (idx != -1) {
-            String prefix = term.substring(0, idx);
-
-            // 1.1 See if the prefix is in the context:
-            if (ctx.containsKey(prefix)) {
-                String iri = getTermIri(ctx, prefix);
-                rval = iri + term.substring(idx + 1);
-                if (usedCtx != null) {
-                    usedCtx.put(prefix, clone(ctx.get(prefix)));
-                }
-            }
-        } else if (ctx.containsKey(term)) {
-            // 2. If the property is in the context, then it's a term.
-            rval = getTermIri(ctx, term); // TODO: assuming string
-            if (usedCtx != null) {
-                usedCtx.put(term, clone(ctx.get(term)));
-            }
-        } else {
-            // 3. The property is a keyword.
-            for (String k : keywords.keySet()) {
-                String v = keywords.get(k);
-                if (v.equals(term)) {
-                    rval = k;
-                    break;
-                }
-            }
-
-        }
-
-        if (!term.equals(rval)) {
-        	//recurse
-        	return expandTerm(ctx, rval, usedCtx);
-        } else {
-        	return rval;
-        }
-    }
-
-    public static boolean isReference(Object value) {
-        return (value != null && value instanceof Map && ((Map<String, Object>) value).containsKey("@id") && ((Map<String, Object>) value).size() == 1);
-    }
-
-    public static boolean isSubject(Object value) {
-        boolean rval = false;
-        if (value != null && value instanceof Map && !((Map<String, Object>) value).containsKey("@value")) {
-            rval = ((Map<String, Object>) value).size() > 1 || !((Map<String, Object>) value).containsKey("@id");
-        }
-        return rval;
-    }
-
-    public static boolean isBlankNode(Object v) {
-        return isSubject(v) && (!((Map<String, Object>) v).containsKey("@id") || isNamedBlankNode(v));
-    }
-
-    public static boolean isNamedBlankNode(Object v) {
-        return v instanceof Map && ((Map<String, Object>) v).containsKey("@id") && isBlankNodeIri(((Map<String, Object>) v).get("@id"));
-    }
-
-    public static boolean isBlankNodeIri(Object input) {
-        return input instanceof String && ((String) input).startsWith("_:");
-    }
-
-    public static Object clone(Object value) {// throws
-                                              // CloneNotSupportedException {
-        Object rval = null;
-        if (value instanceof Cloneable) {
-            try {
-                rval = value.getClass().getMethod("clone").invoke(value);
-            } catch (Exception e) {
-                rval = e;
-            }
-        }
-        if (rval == null || rval instanceof Exception) {
-            // the object wasn't cloneable, or an error occured
-            if (value instanceof String || value instanceof Number || value instanceof Boolean) {
-                // strings numbers and booleans are immutable
-                rval = value;
-            } else {
-                // TODO: making this throw runtime exception so it doesn't have
-                // to be caught
-                // because simply it should never fail in the case of JSON-LD
-                // and means that
-                // the input JSON-LD is invalid
-                throw new RuntimeException(new CloneNotSupportedException((rval instanceof Exception ? ((Exception) rval).getMessage() : "")));
-            }
-        }
-        return rval;
-    }
-
-    public static int compare(Object v1, Object v2) {
-        int rval = 0;
-        
-        // TODO: not sure if we should allow this, but as long as the tests pass it "should" be ok.
-        if (v1 == null && v2 == null) {
-        	return 0;
-        }
-
-        if (v1 instanceof List && v2 instanceof List) {
-            if (((List) v1).size() != ((List) v2).size()) {
-                rval = 1;
-            } else {
-                // TODO: should the order of things in the list matter?
-                for (int i = 0; i < ((List<Object>) v1).size() && rval == 0; i++) {
-                    rval = compare(((List<Object>) v1).get(i), ((List<Object>) v2).get(i));
-                }
-            }
-        } else if (v1 instanceof Number && v2 instanceof Number) {
-            // TODO: this is VERY sketchy
-            double n1 = ((Number) v1).doubleValue();
-            double n2 = ((Number) v2).doubleValue();
-
-            rval = (n1 < n2 ? -1 : (n1 > n2 ? 1 : 0));
-        } else if (v1 instanceof String && v2 instanceof String) {
-            rval = ((String) v1).compareTo((String) v2);
-            if (rval > 1)
-                rval = 1;
-            else if (rval < -1)
-                rval = -1;
-        } else if (v1 instanceof Map && v2 instanceof Map) {
-            throw new RuntimeException("I don't know how I should handle this case yet!");
-            /*
-             * TODO: not sure what to do here exactly...
-             * 
-             * python can compare objects using the < and > operators. js pretends it can (i.e. it doesn't throw an error) but always returns false. thus the js
-             * code and the py code are inconsistant.
-             * 
-             * // TODO: this assumes the order of keys doesn't matter if (((Map) v1).size() != ((Map) v2).size() ) { rval = 1; } else { if (((Map) v1).size() !=
-             * ((Map) v2).size()) { rval = 1; } else { for (Object k1: ((Map) v1).keySet()) { rval = ((Map) v2).containsKey(k1) ? compare(((Map) v1).get(k1),
-             * ((Map) v2).get(k1)) : 1; if (rval != 0) { break; } } } } } else if (v1 instanceof Boolean && v2 instanceof Boolean) { //rval = (v1 == v2 ? 0 :
-             * 1);
-             */
-        } else {
-            // TODO: this is probably something I don't want to allow either
-            throw new RuntimeException("compare unspecified for these objects");
-            // rval = (v1.equals(v2) ? 0 : 1);
-        }
-        return rval;
-    }
-
-    public static int compareBlankNodeObjects(Map<String, Object> a, Map<String, Object> b) {
-        int rval = 0;
-
-        // the keys tend to come up unsorted, so try the following lines if this
-        // causes trouble
-        // List<String> akeys = new ArrayList<String>();
-        // akeys.addAll(a.keySet());
-        // Collections.sort(akeys);
-
-        for (String p : a.keySet()) {
-
-            if (!p.equals("@id")) { // TODO: this should ignore "ignoreKeyword" keywords as well
-                int lenA = (a.get(p) instanceof List ? ((List<Object>) a.get(p)).size() : 1);
-                int lenB = (b.get(p) instanceof List ? ((List<Object>) b.get(p)).size() : 1);
-                rval = compare(lenA, lenB);
-
-                if (rval == 0) {
-                    List<Object> objsA;
-                    List<Object> objsB;
-
-                    if (a.get(p) instanceof List) {
-                        objsA = (List<Object>) clone((List<Object>) a.get(p));
-                        objsB = (List<Object>) clone((List<Object>) b.get(p));
-                    } else {
-                        objsA = new ArrayList<Object>();
-                        objsA.add(a.get(p));
-                        objsB = new ArrayList<Object>();
-                        objsB.add(b.get(p));
-                    }
-
-                    for (int i = 0; i < objsA.size(); i++) {
-                        Object e = objsA.get(i);
-                        if (isNamedBlankNode(e)) {
-                            objsA.remove(i);
-                            --i;
-                        }
-                    }
-                    for (int i = 0; i < objsB.size(); i++) {
-                        Object e = objsB.get(i);
-                        if (isNamedBlankNode(e)) {
-                            objsB.remove(i);
-                            --i;
-                        }
-                    }
-
-                    rval = compare(objsA.size(), objsB.size());
-
-                    if (rval == 0) {
-                        Collections.sort(objsA, new Comparator<Object>() {
-                            public int compare(Object o1, Object o2) {
-                                return compareObjects(o1, o2);
-                            }
-                        });
-                        Collections.sort(objsB, new Comparator<Object>() {
-                            public int compare(Object o1, Object o2) {
-                                return compareObjects(o1, o2);
-                            }
-                        });
-                        for (int i = 0; i < objsA.size() && rval == 0; ++i) {
-                            rval = compareObjects(objsA.get(i), objsB.get(i));
-                            if (rval != 0) {
-                                break;
-                            }
-                        }
-                    }
-                }
-                if (rval != 0) {
-                    break;
-                }
-            }
-        }
-
-        return rval;
-    }
-
-    public static int compareObjects(Object o1, Object o2) {
-        int rval = 0;
-        if (o1 instanceof String) {
-            if (o2 instanceof String) {
-                rval = compare(o1, o2);
-            } else {
-                rval = -1;
-            }
-        } else if (o2 instanceof String) {
-            rval = 1;
-        } else if (o1 instanceof Map) {
-            rval = compareObjectKeys(o1, o2, "@value");
-            if (rval == 0) {
-                if (((Map) o1).containsKey("@value")) {
-                    rval = compareObjectKeys(o1, o2, "@type");
-                    if (rval == 0) {
-                        rval = compareObjectKeys(o1, o2, "@language");
-                    }
-                } else {
-                    rval = compare(((Map<String, Object>) o1).get("@id"), ((Map<String, Object>) o2).get("@id"));
-                }
-            }
-
-        }
-        return rval;
-    }
-
-    private static int compareObjectKeys(Object o1, Object o2, String key) {
-        int rval = 0;
-        if (((Map<String, Object>) o1).containsKey(key)) {
-            if (((Map<String, Object>) o2).containsKey(key)) {
-                rval = compare(((Map<String, Object>) o1).get(key), ((Map<String, Object>) o2).get(key));
-            } else {
-                rval = -1;
-            }
-        } else if (((Map<String, Object>) o2).containsKey(key)) {
-            rval = 1;
-        }
-        return rval;
-    }
-
-    public static void rotate(List<Object> a) {
-        if (a.size() > 0) {
-            Object tmp = a.remove(0);
-            a.add(tmp);
-        }
-    }
-
-    public static int compareSerializations(String s1, String s2) {
-        int rval = 0;
-        if (s1.length() == s2.length()) {
-            rval = compare(s1, s2);
-        } else if (s1.length() > s2.length()) {
-            rval = compare(s1.substring(0, s2.length()), s2);
-        } else {
-            rval = compare(s1, s2.substring(0, s1.length()));
-        }
-
-        return rval;
-    }
-
-    public static String serializeProperties(Map<String, Object> b) {
-        String rval = "";
-
-        Boolean first = true;
-        for (String p : b.keySet()) {
-            if (!"@id".equals(p)) {
-                if (first) {
-                    first = false;
-                } else {
-                    rval += "|";
-                }
-
-                rval += "<" + p + ">";
-
-                List<Object> objs = null;
-                if (b.get(p) instanceof List) {
-                    objs = (List<Object>) b.get(p);
-                } else {
-                    objs = new ArrayList<Object>();
-                    objs.add(b.get(p));
-                }
-
-                for (Object o : objs) {
-                    if (o instanceof Map) {
-                        if (((Map) o).containsKey("@id")) { // iri
-                            if (isBlankNodeIri(((Map<String, Object>) o).get("@id"))) {
-                                rval += "_:";
-                            } else {
-                                rval += "<" + ((Map<String, Object>) o).get("@id") + ">";
-                            }
-                        } else { // literal
-                            rval += "\"" + ((Map<String, Object>) o).get("@value") + "\"";
-                            if (((Map<String, Object>) o).containsKey("@type")) {
-                                rval += "^^<" + ((Map<String, Object>) o).get("@type") + ">";
-                            } else if (((Map<String, Object>) o).containsKey("@language")) {
-                                rval += "@" + ((Map<String, Object>) o).get("@language");
-                            }
-                        }
-                    } else {
-                        rval += "\"" + o + "\"";
-                    }
-                }
-            }
-        }
-
-        return rval;
-    }
-
-    public static void setProperty(Map<String, Object> s, String p, Object o) {
-        if (s.containsKey(p)) {
-            if (s.get(p) instanceof List) {
-                ((List<Object>) s.get(p)).add(o);
-            } else {
-                List<Object> tmp = new ArrayList<Object>();
-                tmp.add(s.get(p));
-                tmp.add(o);
-                s.put(p, tmp);
-            }
-        } else {
-            s.put(p, o);
-        }
-    }
-
-    /**
-     * Recursively frames the given input according to the given frame.
-     * 
-     * @param subjects
-     *            a map of subjects in the graph.
-     * @param input
-     *            the input to frame.
-     * @param frame
-     *            the frame to use.
-     * @param embeds
-     *            a map of previously embedded subjects, used to prevent cycles.
-     * @param autoembed
-     *            true if auto-embed is on, false if not.
-     * @param parent
-     *            the parent object (for subframing).
-     * @param parentKey
-     *            the parent key (for subframing).
-     * @param options
-     *            the framing options.
-     * @return the framed input.
-     */
-    public static Object frame(Map subjects, List input, Object frame, HashMap embeds, boolean autoembed, Object parent, String parentKey, Map options) {
-        Object rval = null;
-
-        int limit = -1;
-        List frames = null;
-
-        if (frame instanceof List) {
-            rval = new ArrayList();
-            frames = (List) frame;
-            if (frames.isEmpty()) {
-                frames.add(new HashMap());
-            }
-        } else {
-            frames = new ArrayList();
-            frames.add(frame);
-            limit = 1;
-        }
-
-        boolean omitOn = false;
-        if (options != null) {
-            if (options.containsKey("defaults")) {
-                Map defopts = (Map) options.get("defaults");
-                if (defopts.containsKey("omitDefaultOn")) {
-                    omitOn = (Boolean) defopts.get("omitDefaultOn");
-                }
-            }
-        }
-
-        List<List> values = new ArrayList<List>();
-        for (Object f : frames) {
-            if (!(f instanceof List || f instanceof Map)) {
-                throw new RuntimeException("Invalid JSON - LD frame. Frame type is not a map or array.");
-            }
-            List vali = new ArrayList();
-            for (Object n : input) {
-                if (n instanceof Map && ((Map) n).containsKey("@id") && subjects.containsKey(((Map) n).get("@id"))) {
-                    n = subjects.get(((Map) n).get("@id"));
-                }
-
-                if (JSONLDUtils.isType(n, (Map) f) || JSONLDUtils.isDuckType(n, (Map) f)) {
-                    vali.add(n);
-                    limit -= 1;
-                    if (limit == 0) {
-                        break;
-                    }
-                }
-            }
-            values.add(vali);
-            if (limit == 0) {
-                break;
-            }
-        }
-
-        for (int i = 0; i < frames.size(); i++) {
-            Object f = frames.get(i);
-            List v = values.get(i);
-
-            for (Object value : v) {
-                if (JSONLDUtils.isSubject(value)) {
-                    value = subframe(subjects, (Map) value, (Map) f, embeds, autoembed, parent, parentKey, options);
-                }
-
-                if (rval == null) {
-                    rval = value;
-                } else {
-                    if (!((JSONLDUtils.isReference(value) && embeds.containsKey(((Map) value).get("@id"))) && parent == null)) {
-                        ((List) rval).add(value);
-                    }
-                }
-            }
-        }
-
-        return rval;
-    }
-
-    /**
-     * Subframes a value.
-     * 
-     * @param subjects
-     *            a map of subjects in the graph.
-     * @param value
-     *            the value to subframe.
-     * @param frame
-     *            the frame to use.
-     * @param embeds
-     *            a map of previously embedded subjects, used to prevent cycles.
-     * @param autoembed
-     *            true if auto-embed is on, false if not.
-     * @param parent
-     *            the parent object.
-     * @param parentKey
-     *            the parent key.
-     * @param options
-     *            the framing options.
-     * @return the framed input.
-     */
-    private static Object subframe(Map subjects, Map value, Map frame, HashMap embeds, boolean autoembed, Object parent, String parentKey, Map options) {
-        String iri = (String) value.get("@id");
-        Map embed = (Map) embeds.get(iri);
-
-        boolean embedOn = (((frame.containsKey("@embed") && (Boolean) frame.get("@embed")) || (!frame.containsKey("@embed") && (Boolean) ((Map) options
-                .get("defaults")).get("embedOn"))) && (embed == null || ((Boolean) embed.get("autoembed") && !autoembed)));
-
-        if (!embedOn) {
-            Map tmp = new HashMap();
-            tmp.put("@id", value.get("@id"));
-            return tmp;
-        } else {
-            if (embed == null) {
-                embed = new HashMap();
-                embeds.put(iri, embed);
-            } else if (embed.get("parent") != null) {
-                Object objs = ((Map) embed.get("parent")).get(embed.get("key"));
-                if (objs instanceof List) {
-                    for (int i = 0; i < ((List) objs).size(); i++) {
-                        Object oi = ((List) objs).get(i);
-                        if (oi instanceof Map && ((Map) oi).containsKey("@id") && ((Map) oi).get("@id").equals(iri)) {
-                            Map tmp = new HashMap();
-                            tmp.put("@id", value.get("id"));
-                            ((List) objs).set(i, tmp);
-                            break;
-                        }
-                    }
-                } else {
-                    Map tmp = new HashMap();
-                    tmp.put("@id", value.get("@id"));
-                    ((Map) embed.get("parent")).put(embed.get("key"), tmp);
-                }
-
-                removeDependentEmbeds(iri, embeds);
-            }
-
-            embed.put("autoembed", autoembed);
-            embed.put("parent", parent);
-            embed.put("key", parentKey);
-
-            boolean explicitOn = (frame.containsKey("@explicit") ? (Boolean) frame.get("@explicit") : (Boolean) ((Map) options.get("defaults"))
-                    .get("explicitOn"));
-
-            if (explicitOn) {
-                for (String key : new HashSet<String>((Set<String>) value.keySet())) {
-                    if (!"@id".equals(key) && !frame.containsKey(key)) {
-                        value.remove(key);
-                    }
-                }
-            }
-
-            for (String key : (Set<String>) value.keySet()) {
-                Object v = value.get(key);
-                if (!key.startsWith("@")) {
-                    Object f = frame.get(key);
-                    boolean _autoembed = (f == null);
-                    if (_autoembed) {
-                        f = value.get(key) instanceof List ? new ArrayList() : new HashMap();
-                    }
-                    List input = null;
-                    if (value.get(key) instanceof List) {
-                        input = (List) value.get(key);
-                    } else {
-                        List tmp = new ArrayList();
-                        tmp.add(value.get(key));
-                        input = tmp;
-                    }
-                    for (int n = 0; n < input.size(); n++) {
-                        Object in = input.get(n);
-                        if (in instanceof Map && ((Map) in).containsKey("@id") && subjects.containsKey(((Map) in).get("@id"))) {
-                            input.set(n, subjects.get(((Map) in).get("@id")));
-                        }
-                    }
-                    value.put(key, frame(subjects, input, f, embeds, _autoembed, value, key, options));
-                }
-            }
-
-            for (String key : (Set<String>) frame.keySet()) {
-                Object f = frame.get(key);
-                if (!key.startsWith("@") && (!value.containsKey(key) || value.get(key) == null)) {
-                    if (f instanceof List) {
-                        value.put(key, new ArrayList());
-                    } else {
-                        // TODO: jsonld.js and pyld.js have a block here that will never be reached
-                        // because they can only run if the previous if was true
-
-                        boolean omitOn = ((Map) f).containsKey("@omitDefault") ? (Boolean) ((Map) f).get("@omitDefault") : (Boolean) ((Map) options
-                                .get("defaults")).get("omitDefaultOn");
-
-                        if (!omitOn) {
-                            if (((Map) f).containsKey("@default")) {
-                                value.put(key, ((Map) f).get("@default"));
-                            } else {
-                                value.put(key, null);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return value;
-    }
-
-    private static void removeDependentEmbeds(String iri, Map embeds) {
-        Set<String> iris = new HashSet(embeds.keySet());
-        for (String i : iris) {
-            if (embeds.containsKey(i) && ((Map) embeds.get(i)).get("parent") != null && iri.equals(((Map) ((Map) embeds.get(i)).get("parent")).get("@id"))) {
-                embeds.remove(i);
-                removeDependentEmbeds(i, embeds);
-            }
-        }
-    }
-
-    /**
-     * Returns True if the given src matches the given frame via duck-typing.
-     * 
-     * @param src
-     *            the input.
-     * @param frame
-     *            the frame to check against.
-     * @return True if the src matches the frame.
-     */
-    private static boolean isDuckType(Object src, Map frame) {
-        String rType = "@type";
-        if (!frame.containsKey(rType)) {
-            Set<String> props1 = frame.keySet();
-            Set<String> props = new HashSet<String>();
-            for (String p : props1) {
-                if (!p.startsWith("@")) {
-                    props.add(p);
-                }
-            }
-            if (props.isEmpty()) {
-                return true;
-            }
-            if (src instanceof Map && ((Map) src).containsKey("@id")) {
-                for (String i : props) {
-                    if (!((Map) src).containsKey(i)) {
-                        return false;
-                    }
-                }
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Returns True if the given source is a subject and has one of the given types in the given frame.
-     * 
-     * @param src
-     *            the input.
-     * @param frame
-     *            the frame with types to look for.
-     * @return True if the src has one of the given types.
-     */
-    private static boolean isType(Object src, Map frame) {
-        String rType = "@type";
-        if (frame.containsKey(rType) && src instanceof Map && ((Map) src).containsKey(rType)) {
-            List tmp = null;
-            if (((Map) src).get(rType) instanceof List) {
-                tmp = (List) ((Map) src).get(rType);
-            } else {
-                tmp = new ArrayList();
-                tmp.add(((Map) src).get(rType));
-            }
-            List types = null;
-            if (frame.get(rType) instanceof List) {
-                types = (List) frame.get(rType);
-            } else {
-                types = new ArrayList();
-                types.add(frame.get(rType));
-            }
-
-            for (Object typ : types) {
-                for (Object i : tmp) {
-                    if (i.equals(typ)) {
-                        return true;
-                    }
-                }
-            }
-        }
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/impl/SesameJSONLDSerializer.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/impl/SesameJSONLDSerializer.java b/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/impl/SesameJSONLDSerializer.java
deleted file mode 100644
index 7301de8..0000000
--- a/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/impl/SesameJSONLDSerializer.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package de.dfki.km.json.jsonld.impl;
-
-import java.util.Iterator;
-
-import org.openrdf.model.Graph;
-import org.openrdf.model.Literal;
-import org.openrdf.model.Resource;
-import org.openrdf.model.Statement;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SesameJSONLDSerializer extends de.dfki.km.json.jsonld.JSONLDSerializer {
-    private static final Logger LOG = LoggerFactory.getLogger(SesameJSONLDSerializer.class);
-
-    public void importGraph(Graph model, Resource... contexts) {
-        Iterator<Statement> statements = model.match(null, null, null, contexts);
-        while (statements.hasNext()) {
-            handleStatement(statements.next());
-        }
-    }
-
-    public void handleStatement(Statement nextStatement) {
-        Resource subject = nextStatement.getSubject();
-        URI predicate = nextStatement.getPredicate();
-        Value object = nextStatement.getObject();
-
-        if (object instanceof Literal) {
-            Literal literal = (Literal) object;
-            String value = literal.getLabel();
-            URI datatypeURI = literal.getDatatype();
-            String language = literal.getLanguage();
-            
-            String datatype;
-            
-            if (datatypeURI == null) {
-                datatype = null;
-            } else {
-                datatype = datatypeURI.stringValue();
-            }
-            
-            triple(subject.stringValue(), predicate.stringValue(), value, datatype, language);
-        } else {
-            triple(subject.stringValue(), predicate.stringValue(), object.stringValue());
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/impl/SesameTripleCallback.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/impl/SesameTripleCallback.java b/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/impl/SesameTripleCallback.java
deleted file mode 100644
index 4d1a3c7..0000000
--- a/commons/sesame-tools-rio-jsonld/src/ext/java/de/dfki/km/json/jsonld/impl/SesameTripleCallback.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package de.dfki.km.json.jsonld.impl;
-
-import org.openrdf.model.Graph;
-import org.openrdf.model.Statement;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.openrdf.model.ValueFactory;
-import org.openrdf.model.impl.GraphImpl;
-
-import de.dfki.km.json.jsonld.JSONLDTripleCallback;
-
-public class SesameTripleCallback implements JSONLDTripleCallback {
-
-    private ValueFactory vf;
-
-    private Graph storageGraph;
-
-    public SesameTripleCallback() {
-        this(new GraphImpl());
-    }
-
-    public SesameTripleCallback(Graph nextGraph) {
-        setStorageGraph(nextGraph);
-    }
-
-    @Override
-    public void triple(String s, String p, String o) {
-        if (s == null || p == null || o == null) {
-            // TODO: i don't know what to do here!!!!
-            return;
-        }
-
-        // This method is always called with three URIs as subject predicate and
-        // object
-        Statement result = vf.createStatement(vf.createURI(s), vf.createURI(p), vf.createURI(o));
-        storageGraph.add(result);
-    }
-
-    @Override
-    public void triple(String s, String p, String value, String datatype, String language) {
-
-        if (s == null || p == null || value == null) {
-            // TODO: i don't know what to do here!!!!
-            return;
-        }
-
-        URI subject = vf.createURI(s);
-
-        URI predicate = vf.createURI(p);
-
-        Value object;
-        if (language != null) {
-            object = vf.createLiteral(value, language);
-        } else if (datatype != null) {
-            object = vf.createLiteral(value, vf.createURI(datatype));
-        } else {
-            object = vf.createLiteral(value);
-        }
-
-        Statement result = vf.createStatement(subject, predicate, object);
-        storageGraph.add(result);
-    }
-
-    /**
-     * @return the storageGraph
-     */
-    public Graph getStorageGraph() {
-        return storageGraph;
-    }
-
-    /**
-     * @param storageGraph
-     *            the storageGraph to set
-     */
-    public void setStorageGraph(Graph storageGraph) {
-        this.storageGraph = storageGraph;
-
-        if (storageGraph != null) {
-            vf = storageGraph.getValueFactory();
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdParser.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdParser.java b/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdParser.java
deleted file mode 100644
index bf47ea3..0000000
--- a/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdParser.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.jsonld;
-
-import com.google.common.base.Preconditions;
-import de.dfki.km.json.jsonld.JSONLDProcessor;
-import de.dfki.km.json.jsonld.JSONLDTripleCallback;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.type.TypeReference;
-import org.openrdf.OpenRDFException;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.openrdf.model.ValueFactory;
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFHandlerException;
-import org.openrdf.rio.RDFParseException;
-import org.openrdf.rio.helpers.RDFParserBase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.Map;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class JsonLdParser extends RDFParserBase implements JSONLDTripleCallback {
-
-    private static Logger log = LoggerFactory.getLogger(JsonLdParser.class);
-
-    JSONLDProcessor processor;
-
-    /**
-     * Creates a new RDFParserBase that will use a {@link org.openrdf.model.impl.ValueFactoryImpl} to
-     * create RDF model objects.
-     */
-    public JsonLdParser() {
-        processor =  new JSONLDProcessor();
-    }
-
-    /**
-     * Creates a new RDFParserBase that will use the supplied ValueFactory to
-     * create RDF model objects.
-     *
-     * @param valueFactory A ValueFactory.
-     */
-    public JsonLdParser(ValueFactory valueFactory) {
-        super(valueFactory);
-        processor = new JSONLDProcessor();
-    }
-
-    /**
-     * Gets the RDF format that this parser can parse.
-     */
-    @Override
-    public RDFFormat getRDFFormat() {
-        return RDFFormat.JSONLD;
-    }
-
-    /**
-     * Parses the data from the supplied InputStream, using the supplied baseURI
-     * to resolve any relative URI references.
-     *
-     * @param in      The InputStream from which to read the data.
-     * @param baseURI The URI associated with the data in the InputStream.
-     * @throws java.io.IOException If an I/O error occurred while data was read from the InputStream.
-     * @throws org.openrdf.rio.RDFParseException
-     *                             If the parser has found an unrecoverable parse error.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *                             If the configured statement handler has encountered an
-     *                             unrecoverable error.
-     */
-    @Override
-    public void parse(InputStream in, String baseURI) throws IOException, RDFParseException, RDFHandlerException {
-        if(baseURI != null)
-            setBaseURI(baseURI);
-
-        ObjectMapper mapper = new ObjectMapper();
-        Map<String,Object> object = mapper.readValue(in,new TypeReference<Map<String,Object>>() {});
-
-        try {
-            processor.triples(object,this);
-        } catch(IllegalArgumentException ex) {
-            if(ex.getCause() instanceof RDFParseException)
-                throw (RDFParseException)ex.getCause();
-            else {
-                throw new IllegalArgumentException(ex);
-            }
-        }
-    }
-
-    /**
-     * Parses the data from the supplied Reader, using the supplied baseURI to
-     * resolve any relative URI references.
-     *
-     * @param reader  The Reader from which to read the data.
-     * @param baseURI The URI associated with the data in the InputStream.
-     * @throws java.io.IOException If an I/O error occurred while data was read from the InputStream.
-     * @throws org.openrdf.rio.RDFParseException
-     *                             If the parser has found an unrecoverable parse error.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *                             If the configured statement handler has encountered an
-     *                             unrecoverable error.
-     */
-    @Override
-    public void parse(Reader reader, String baseURI) throws IOException, RDFParseException, RDFHandlerException {
-        if(baseURI != null)
-            setBaseURI(baseURI);
-
-        ObjectMapper mapper = new ObjectMapper();
-        Map<String,Object> object = mapper.readValue(reader,new TypeReference<Map<String,Object>>() {});
-
-        try {
-            processor.triples(object,this);
-        } catch(IllegalArgumentException ex) {
-            if(ex.getCause() instanceof RDFParseException)
-                throw (RDFParseException)ex.getCause();
-            else {
-                throw new IllegalArgumentException(ex);
-            }
-        }
-    }
-
-
-    /**
-     * Construct a triple with three URIs.
-     *
-     * @param s The Subject URI
-     * @param p The Predicate URI
-     * @param o The Object URI
-     * @return The generated triple, or null to force triple generation to stop
-     */
-    @Override
-    public void triple(String s, String p, String o) {
-        // This method is always called with three URIs as subject predicate and
-        // object
-        try {
-            rdfHandler.handleStatement(createStatement(resolveURI(s), resolveURI(p), resolveURI(o)));
-        } catch (OpenRDFException e) {
-            log.error("RDF Parse Error while creating statement",e);
-            throw new IllegalArgumentException("RDF Parse Error while creating statement",e);
-        }
-    }
-
-    /**
-     * Constructs a triple with a Literal object, which may or may not contain a
-     * language and/or a datatype.
-     *
-     * @param s        The Subject URI
-     * @param p        The Predicate URI
-     * @param value    The literal value
-     * @param datatype The literal datatype
-     * @param language The literal language (NOTE: may be null if not specified!)
-     * @return The generated triple, or null to force triple generation to stop
-     */
-    @Override
-    public void triple(String s, String p, String value, String datatype, String language) {
-        Preconditions.checkNotNull(s);
-        Preconditions.checkNotNull(p);
-        Preconditions.checkNotNull(value);
-
-        try {
-            URI subject = createURI(s);
-
-            URI predicate = createURI(p);
-
-            Value object;
-            if (language != null) {
-                object = createLiteral(value, language, null);
-            } else if (datatype != null) {
-                object = createLiteral(value, null, createURI(datatype));
-            } else {
-                object = createLiteral(value, null, null);
-            }
-
-            rdfHandler.handleStatement(createStatement(subject, predicate, object));
-
-        } catch (OpenRDFException e) {
-            log.error("RDF Parse Error while creating statement",e);
-            throw new IllegalArgumentException("RDF Parse Error while creating statement",e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdParserFactory.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdParserFactory.java b/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdParserFactory.java
deleted file mode 100644
index 30f453f..0000000
--- a/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdParserFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.jsonld;
-
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFParser;
-import org.openrdf.rio.RDFParserFactory;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class JsonLdParserFactory implements RDFParserFactory {
-
-    /**
-     * Returns the RDF format for this factory.
-     */
-    @Override
-    public RDFFormat getRDFFormat() {
-        return RDFFormat.JSONLD;
-    }
-
-    /**
-     * Returns a RDFParser instance.
-     */
-    @Override
-    public RDFParser getParser() {
-        return new JsonLdParser();
-    }
-}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdWriter.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdWriter.java b/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdWriter.java
deleted file mode 100644
index c788c85..0000000
--- a/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdWriter.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.jsonld;
-
-import de.dfki.km.json.jsonld.impl.SesameJSONLDSerializer;
-import org.openrdf.model.Statement;
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFHandlerException;
-import org.openrdf.rio.RDFWriter;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.Writer;
-
-/**
- * Add file description here!
- * <p/>
- * User: sschaffe
- */
-public class JsonLdWriter implements RDFWriter {
-
-
-    private PrintWriter writer;
-
-    SesameJSONLDSerializer serializer;
-
-    public JsonLdWriter(OutputStream out) {
-        writer = new PrintWriter(new OutputStreamWriter(out));
-        serializer = new SesameJSONLDSerializer();
-    }
-
-
-    public JsonLdWriter(Writer writer) {
-        this.writer = new PrintWriter(writer);
-        serializer = new SesameJSONLDSerializer();
-    }
-
-
-    /**
-     * Gets the RDF format that this RDFWriter uses.
-     */
-    @Override
-    public RDFFormat getRDFFormat() {
-        return RDFFormat.JSONLD;
-    }
-
-    /**
-     * Signals the start of the RDF data. This method is called before any data
-     * is reported.
-     *
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void startRDF() throws RDFHandlerException {
-    }
-
-    /**
-     * Signals the end of the RDF data. This method is called when all data has
-     * been reported.
-     *
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void endRDF() throws RDFHandlerException {
-        writer.print(serializer.asString());
-        writer.flush();
-    }
-
-    /**
-     * Handles a namespace declaration/definition. A namespace declaration
-     * associates a (short) prefix string with the namespace's URI. The prefix
-     * for default namespaces, which do not have an associated prefix, are
-     * represented as empty strings.
-     *
-     * @param prefix The prefix for the namespace, or an empty string in case of a
-     *               default namespace.
-     * @param uri    The URI that the prefix maps to.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void handleNamespace(String prefix, String uri) throws RDFHandlerException {
-        serializer.setPrefix(uri,prefix);
-    }
-
-    /**
-     * Handles a statement.
-     *
-     * @param st The statement.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void handleStatement(Statement st) throws RDFHandlerException {
-        serializer.handleStatement(st);
-    }
-
-    /**
-     * Handles a comment.
-     *
-     * @param comment The comment.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void handleComment(String comment) throws RDFHandlerException {
-    }
-}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdWriterFactory.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdWriterFactory.java b/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdWriterFactory.java
deleted file mode 100644
index 959b2e3..0000000
--- a/commons/sesame-tools-rio-jsonld/src/main/java/org/apache/marmotta/commons/sesame/rio/jsonld/JsonLdWriterFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.jsonld;
-
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFWriter;
-import org.openrdf.rio.RDFWriterFactory;
-
-import java.io.OutputStream;
-import java.io.Writer;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class JsonLdWriterFactory implements RDFWriterFactory {
-
-    /**
-     * Returns the RDF format for this factory.
-     */
-    @Override
-    public RDFFormat getRDFFormat() {
-        return RDFFormat.JSONLD;
-    }
-
-    /**
-     * Returns an RDFWriter instance that will write to the supplied output
-     * stream.
-     *
-     * @param out The OutputStream to write the RDF to.
-     */
-    @Override
-    public RDFWriter getWriter(OutputStream out) {
-        return new JsonLdWriter(out);
-    }
-
-    /**
-     * Returns an RDFWriter instance that will write to the supplied writer.
-     *
-     * @param writer The Writer to write the RDF to.
-     */
-    @Override
-    public RDFWriter getWriter(Writer writer) {
-        return new JsonLdWriter(writer);
-    }
-}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/LICENSE b/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/LICENSE
deleted file mode 100644
index e21dc40..0000000
--- a/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/LICENSE
+++ /dev/null
@@ -1,205 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-This library bundles the JSON-LD java library, which is available under a
-"New BSD" license.  For details, see https://github.com/tristan/jsonld-java.

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/NOTICE b/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index f566193..0000000
--- a/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,9 +0,0 @@
-Apache Marmotta JSON-LD
-Copyright [2012-2013] The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-Additionally, it includes the following 3rd party modules:
-
-  jsonld-java licensed under the New BSD License

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/services/org.openrdf.rio.RDFParserFactory
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/services/org.openrdf.rio.RDFParserFactory b/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/services/org.openrdf.rio.RDFParserFactory
deleted file mode 100644
index 7864661..0000000
--- a/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/services/org.openrdf.rio.RDFParserFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.marmotta.commons.sesame.rio.jsonld.JsonLdParserFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/services/org.openrdf.rio.RDFWriterFactory
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/services/org.openrdf.rio.RDFWriterFactory b/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/services/org.openrdf.rio.RDFWriterFactory
deleted file mode 100644
index 72b825d..0000000
--- a/commons/sesame-tools-rio-jsonld/src/main/resources/META-INF/services/org.openrdf.rio.RDFWriterFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.marmotta.commons.sesame.rio.jsonld.JsonLdWriterFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/java/org/apache/marmotta/commons/sesame/rio/jsonld/TestJSONLdParser.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/java/org/apache/marmotta/commons/sesame/rio/jsonld/TestJSONLdParser.java b/commons/sesame-tools-rio-jsonld/src/test/java/org/apache/marmotta/commons/sesame/rio/jsonld/TestJSONLdParser.java
deleted file mode 100644
index 01c46b3..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/java/org/apache/marmotta/commons/sesame/rio/jsonld/TestJSONLdParser.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.jsonld;
-/*
- * Copyright (c) 2013 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-import org.apache.commons.io.IOUtils;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.openrdf.query.BooleanQuery;
-import org.openrdf.query.QueryLanguage;
-import org.openrdf.repository.Repository;
-import org.openrdf.repository.RepositoryConnection;
-import org.openrdf.repository.sail.SailRepository;
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.sail.memory.MemoryStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-
-import static java.util.Arrays.asList;
-import static org.hamcrest.CoreMatchers.everyItem;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeThat;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-@RunWith(Parameterized.class)
-public class TestJSONLdParser {
-
-    private static Logger log = LoggerFactory.getLogger(TestJSONLdParser.class);
-
-    private String fileName;
-
-    public TestJSONLdParser(String fileName) {
-        this.fileName = fileName;
-    }
-
-    // return the list of rdf-NNNN.jsonld files
-    @Parameterized.Parameters(name = "{0}")
-    public static Collection<Object[]> data() {
-        int[] skip = new int[] {1,2,8,9,10,11,12,14,15,16,17,18,21,22,25};
-        ArrayList<Object[]> list = new ArrayList<Object[]>();
-        for(int i=1; i<=26; i++) {
-            if(Arrays.binarySearch(skip,i) == -1) {
-                list.add(new Object[] {"rdf-"+String.format("%04d",i)});
-            }
-        }
-        return list;
-    }
-
-
-    @Test
-    public void runTest() throws Exception {
-        log.info("running test {} ...", fileName);
-
-        InputStream jsonLD = this.getClass().getResourceAsStream(fileName+".jsonld");
-        InputStream sparql = this.getClass().getResourceAsStream(fileName+".sparql");
-        assumeThat("Could not load testfiles", asList(jsonLD, sparql), everyItem(notNullValue(InputStream.class)));
-
-        Repository repository = new SailRepository(new MemoryStore());
-        repository.initialize();
-
-        RepositoryConnection connection = repository.getConnection();
-        try {
-            connection.add(jsonLD,"http://localhost/jsonld/", RDFFormat.JSONLD);
-            connection.commit();
-        } catch(Exception ex) {
-            fail("parsing "+fileName+" failed!");
-        }
-        assertTrue(connection.size() > 0);
-
-        int count = connection.getStatements(null, null, null, false).asList().size();
-        assertTrue(count > 0);
-
-        BooleanQuery sparqlQuery = (BooleanQuery)connection.prepareQuery(QueryLanguage.SPARQL, IOUtils.toString(sparql));
-        assertTrue("SPARQL query evaluation for "+fileName+" failed",sparqlQuery.evaluate());
-
-        connection.close();
-        repository.shutDown();
-    }
-}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/logback.xml b/commons/sesame-tools-rio-jsonld/src/test/resources/logback.xml
deleted file mode 100644
index 1bfecff..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/logback.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<configuration>
-    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
-        <encoder>
-            <pattern>%d{HH:mm:ss.SSS} %highlight(%level) %cyan(%logger{15}) - %m%n</pattern>
-        </encoder>
-    </appender>
-    <root level="${root-level:-INFO}">
-        <appender-ref ref="CONSOLE"/>
-    </root>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-context.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-context.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-context.jsonld
deleted file mode 100644
index 8eddd02..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-context.jsonld
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "@context": {
-    "dc": "http://purl.org/dc/elements/1.1/",
-    "ex": "http://example.org/vocab#",
-    "ex:authored": {
-      "@type": "@id"
-    },
-    "ex:contains": {
-      "@type": "@id"
-    },
-    "foaf": "http://xmlns.com/foaf/0.1/"
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-in.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-in.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-in.jsonld
deleted file mode 100644
index bb26e1a..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-in.jsonld
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "@id": [
-    {
-      "@id": "http://example.org/test#chapter",
-      "http://purl.org/dc/elements/1.1/description": "Fun",
-      "http://purl.org/dc/elements/1.1/title": "Chapter One"
-    },
-    {
-      "@id": "http://example.org/test#jane",
-      "http://example.org/vocab#authored": "http://example.org/test#chapter",
-      "http://xmlns.com/foaf/0.1/name": "Jane"
-    },
-    {
-      "@id": "http://example.org/test#john",
-      "http://xmlns.com/foaf/0.1/name": "John"
-    },
-    {
-      "@id": "http://example.org/test#library",
-      "http://example.org/vocab#contains": {
-        "@id": "http://example.org/test#book",
-        "http://example.org/vocab#contains": "http://example.org/test#chapter",
-        "http://purl.org/dc/elements/1.1/contributor": "Writer",
-        "http://purl.org/dc/elements/1.1/title": "My Book"
-      }
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-out.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-out.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-out.jsonld
deleted file mode 100644
index 678a298..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0001-out.jsonld
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  "@context": {
-    "dc": "http://purl.org/dc/elements/1.1/",
-    "ex": "http://example.org/vocab#",
-    "ex:authored": {
-      "@type": "@id"
-    },
-    "ex:contains": {
-      "@type": "@id"
-    },
-    "foaf": "http://xmlns.com/foaf/0.1/"
-  },
-  "@id": [
-    {
-      "@id": "http://example.org/test#chapter",
-      "dc:description": "Fun",
-      "dc:title": "Chapter One"
-    },
-    {
-      "@id": "http://example.org/test#jane",
-      "ex:authored": "http://example.org/test#chapter",
-      "foaf:name": "Jane"
-    },
-    {
-      "@id": "http://example.org/test#john",
-      "foaf:name": "John"
-    },
-    {
-      "@id": "http://example.org/test#library",
-      "ex:contains": {
-        "@id": "http://example.org/test#book",
-        "dc:contributor": "Writer",
-        "dc:title": "My Book",
-        "ex:contains": "http://example.org/test#chapter"
-      }
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-context.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-context.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-context.jsonld
deleted file mode 100644
index 4ad288e..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-context.jsonld
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  "@context": {
-    "dc": "http://purl.org/dc/terms/",
-    "ex": "http://example.org/test#"
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-in.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-in.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-in.jsonld
deleted file mode 100644
index 580e172..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-in.jsonld
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "@id": "http://example.org/test#thing",
-  "http://purl.org/dc/terms/title": "Title"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-out.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-out.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-out.jsonld
deleted file mode 100644
index 79117e9..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0002-out.jsonld
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "@context": {
-    "dc": "http://purl.org/dc/terms/",
-    "ex": "http://example.org/test#"
-  },
-  "@id": "ex:thing",
-  "dc:title": "Title"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-context.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-context.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-context.jsonld
deleted file mode 100644
index 58040b8..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-context.jsonld
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "@context": {
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#",
-      "ex:contains": {
-        "@type": "@id"
-      }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-in.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-in.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-in.jsonld
deleted file mode 100644
index 9b70fba..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-in.jsonld
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "@id": "http://example.org/test#book",
-  "http://example.org/vocab#contains": {
-    "@id": "http://example.org/test#chapter"
-  },
-  "http://purl.org/dc/elements/1.1/title": "Title"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-out.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-out.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-out.jsonld
deleted file mode 100644
index d0c0e7e..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0003-out.jsonld
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "@context": {
-    "dc": "http://purl.org/dc/elements/1.1/",
-    "ex": "http://example.org/vocab#",
-    "ex:contains": {
-      "@type": "@id"
-    }
-  },
-  "@id": "http://example.org/test#book",
-  "dc:title": "Title",
-  "ex:contains": "http://example.org/test#chapter"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0004-context.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0004-context.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0004-context.jsonld
deleted file mode 100644
index 81b7978..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0004-context.jsonld
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "@context": {
-    "ex": "http://example.org/test#",
-    "ex:int": {
-      "@type": "xsd:integer"
-    },
-    "xsd": "http://www.w3.org/2001/XMLSchema#"
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0004-in.jsonld
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0004-in.jsonld b/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0004-in.jsonld
deleted file mode 100644
index 6c3f88a..0000000
--- a/commons/sesame-tools-rio-jsonld/src/test/resources/org/apache/marmotta/commons/sesame/rio/jsonld/compact-0004-in.jsonld
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "@id": "http://example.org/test",
-  "http://example.org/test#int": {
-    "@value": "123",
-    "@type": "http://www.w3.org/2001/XMLSchema#integer"
-  }
-}
\ No newline at end of file


Mime
View raw message