commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [05/22] commons-rdf git commit: Module names, directory names, and artifact names should match.
Date Mon, 30 Oct 2017 14:57:05 GMT
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
deleted file mode 100644
index c508e6b..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
+++ /dev/null
@@ -1,67 +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.commons.rdf.jsonldjava;
-
-import org.apache.commons.rdf.api.BlankNode;
-
-import com.github.jsonldjava.core.RDFDataset.Node;
-
-public interface JsonLdBlankNode extends JsonLdTerm, BlankNode {
-}
-
-final class JsonLdBlankNodeImpl extends JsonLdTermImpl implements JsonLdBlankNode {
-    private final String blankNodePrefix;
-
-    JsonLdBlankNodeImpl(final Node node, final String blankNodePrefix) {
-        super(node);
-        this.blankNodePrefix = blankNodePrefix;
-        if (!node.isBlankNode()) {
-            throw new IllegalArgumentException("Node is not a BlankNode:" + node);
-        }
-    }
-
-    @Override
-    public String ntriplesString() {
-        // TODO: Escape if this is not valid ntriples string (e.g. contains :)
-        return node.getValue();
-    }
-
-    @Override
-    public String uniqueReference() {
-        return blankNodePrefix + node.getValue();
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (!(obj instanceof BlankNode)) {
-            return false;
-        }
-        final BlankNode other = (BlankNode) obj;
-        return uniqueReference().equals(other.uniqueReference());
-    }
-
-    @Override
-    public int hashCode() {
-        return uniqueReference().hashCode();
-    }
-    
-    @Override
-    public String toString() {
-        return ntriplesString() + " [" + uniqueReference() + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java
deleted file mode 100644
index 8788860..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java
+++ /dev/null
@@ -1,111 +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.commons.rdf.jsonldjava;
-
-import java.util.List;
-import java.util.Optional;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import org.apache.commons.rdf.api.BlankNodeOrIRI;
-import org.apache.commons.rdf.api.Dataset;
-import org.apache.commons.rdf.api.Graph;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.Quad;
-import org.apache.commons.rdf.api.RDFTerm;
-
-import com.github.jsonldjava.core.RDFDataset;
-
-public interface JsonLdDataset extends JsonLdGraphLike<org.apache.commons.rdf.api.Quad>, Dataset {
-}
-
-class JsonLdDatasetImpl extends AbstractJsonLdGraphLike<org.apache.commons.rdf.api.Quad> implements JsonLdDataset {
-
-    JsonLdDatasetImpl(final RDFDataset rdfDataSet) {
-        super(rdfDataSet);
-    }
-
-    JsonLdDatasetImpl(final RDFDataset rdfDataset, final String bnodePrefix) {
-        super(rdfDataset, bnodePrefix);
-    }
-
-    JsonLdDatasetImpl(final String bnodePrefix) {
-        super(bnodePrefix);
-    }
-
-    @Override
-    public void add(final BlankNodeOrIRI graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        super.add(graphName, subject, predicate, object);
-    }
-
-    @Override
-    public boolean contains(final Optional<BlankNodeOrIRI> graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        return super.contains(graphName, subject, predicate, object);
-    }
-
-    @Override
-    public Graph getGraph() {
-        return new JsonLdGraphImpl(rdfDataSet, Optional.empty(), bnodePrefix);
-    }
-
-    @Override
-    public Optional<Graph> getGraph(final BlankNodeOrIRI graphName) {
-        if (graphName == null) {
-            return Optional.of(getGraph());
-        }
-        
-        return Optional.of(new JsonLdGraphImpl(rdfDataSet, Optional.of(graphName), bnodePrefix));
-    }
-
-    @Override
-    public Stream<BlankNodeOrIRI> getGraphNames() {
-        return rdfDataSet.graphNames().parallelStream().filter(Predicate.isEqual("@default").negate())
-                .map(s -> s.startsWith("_:") ? new RDFDataset.BlankNode(s) : new RDFDataset.IRI(s))
-                .map(n -> (BlankNodeOrIRI) factory.asRDFTerm(n));
-    }
-
-    @Override
-    public void remove(final Optional<BlankNodeOrIRI> graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        super.remove(graphName, subject, predicate, object);
-    }
-
-    @Override
-    public void remove(final Quad q) {
-        remove(q.getGraphName(), q.getSubject(), q.getPredicate(), q.getObject());
-    }
-
-    @Override
-    public Stream<? extends Quad> stream(final Optional<BlankNodeOrIRI> graphName, final BlankNodeOrIRI subject, final IRI predicate,
-            final RDFTerm object) {
-        return filteredGraphs(graphName).flatMap(List::stream).filter(quadFilter(subject, predicate, object))
-                .map(factory::asQuad);
-    }
-
-    @Override
-    public long size() {
-        return rdfDataSet.graphNames().stream().map(rdfDataSet::getQuads)
-                .collect(Collectors.summingLong(List::size));
-    }
-
-    @Override
-    Quad asTripleOrQuad(final com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad) {
-        return factory.asQuad(jsonldQuad);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
deleted file mode 100644
index d4addfb..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
+++ /dev/null
@@ -1,112 +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.commons.rdf.jsonldjava;
-
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.stream.Stream;
-
-import org.apache.commons.rdf.api.BlankNodeOrIRI;
-import org.apache.commons.rdf.api.Graph;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.RDFTerm;
-import org.apache.commons.rdf.api.Triple;
-
-import com.github.jsonldjava.core.RDFDataset;
-
-/**
- * A {@link Graph} view of a JsonLd {@link RDFDataset}.
- * 
- */
-public interface JsonLdGraph extends JsonLdGraphLike<Triple>, Graph {
-}
-
-class JsonLdGraphImpl extends AbstractJsonLdGraphLike<Triple> implements JsonLdGraph {
-
-    private final Optional<BlankNodeOrIRI> graphName;
-
-    JsonLdGraphImpl(final RDFDataset rdfDataSet) {
-        super(rdfDataSet);
-        this.graphName = Optional.empty();
-    }
-
-    JsonLdGraphImpl(final RDFDataset rdfDataSet, final Optional<BlankNodeOrIRI> graphName, final String bnodePrefix) {
-        super(rdfDataSet, bnodePrefix);
-        this.graphName = Objects.requireNonNull(graphName);
-    }
-
-    JsonLdGraphImpl(final String bnodePrefix) {
-        super(bnodePrefix);
-        this.graphName = Optional.empty();
-    }
-
-    @Override
-    public void clear() {
-        filteredGraphs(graphName).forEach(l -> l.clear());
-    }
-
-    @Override
-    public void add(final Triple t) {
-        // Ensure it's added in the correct graph
-        super.add(graphName.orElse(null), t.getSubject(), t.getPredicate(), t.getObject());
-    }
-
-    @Override
-    public void add(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        super.add(graphName.orElse(null), subject, predicate, object);
-    }
-
-    @Override
-    public boolean contains(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        return super.contains(graphName, subject, predicate, object);
-    }
-
-    @Override
-    public boolean contains(final Triple t) {
-        return contains(graphName, t.getSubject(), t.getPredicate(), t.getObject());
-    }
-
-    @Override
-    public void remove(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        super.remove(graphName, subject, predicate, object);
-    }
-
-    @Override
-    public void remove(final Triple t) {
-        // Only remove from the particular graph
-        remove(graphName, t.getSubject(), t.getPredicate(), t.getObject());
-    }
-
-    @Override
-    public long size() {
-        final String g = graphName.map(factory::asJsonLdString).orElse("@default");
-        return Optional.ofNullable(rdfDataSet.getQuads(g)).map(List::size).orElse(0);
-    }
-
-    @Override
-    public Stream<JsonLdTriple> stream(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        return filteredGraphs(graphName).flatMap(List::stream).filter(quadFilter(subject, predicate, object))
-                .map(factory::asTriple);
-    }
-
-    @Override
-    JsonLdTriple asTripleOrQuad(final com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad) {
-        return factory.asTriple(jsonldQuad);
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.java
deleted file mode 100644
index e5fc75e..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.java
+++ /dev/null
@@ -1,236 +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.commons.rdf.jsonldjava;
-
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.UUID;
-import java.util.function.Predicate;
-import java.util.stream.Stream;
-
-import org.apache.commons.rdf.api.BlankNodeOrIRI;
-import org.apache.commons.rdf.api.GraphLike;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.Literal;
-import org.apache.commons.rdf.api.RDFTerm;
-// NOTE: To avod confusion, don't importing either of the Quad
-import org.apache.commons.rdf.api.Triple;
-import org.apache.commons.rdf.api.TripleLike;
-
-import com.github.jsonldjava.core.RDFDataset;
-import com.github.jsonldjava.core.RDFDataset.Node;
-
-/**
- * Common abstract {@link GraphLike}.
- * <p>
- * Specialised by {@link JsonLdGraph}, {@link JsonLdUnionGraph} and
- * {@link JsonLdDataset}.
- *
- * @param <T>
- *            specialisation of {@link TripleLike}, e.g. {@link Triple} or
- *            {@link org.apache.commons.rdf.api.Quad}
- */
-public interface JsonLdGraphLike<T extends TripleLike> extends GraphLike<T> {
-    /**
-     * Return the underlying JSONLD-Java {@link RDFDataset}.
-     * <p>
-     * Changes in the JSONLD-Java dataset is reflected in this class and vice
-     * versa.
-     * 
-     * @return The underlying JSONLD-JAva RDFDataset
-     */
-    public RDFDataset getRdfDataSet();
-}
-
-abstract class AbstractJsonLdGraphLike<T extends TripleLike> implements JsonLdGraphLike<T> {
-
-    /**
-     * Used by {@link #bnodePrefix()} to get a unique UUID per JVM run
-     */
-    private static UUID SALT = UUID.randomUUID();
-
-    /**
-     * Prefix to use in blank node identifiers
-     */
-    final String bnodePrefix;
-
-    final JsonLdRDF factory;
-
-    /**
-     * The underlying JSON-LD {@link RDFDataset}.
-     * <p>
-     * Note: This is NOT final as it is reset to <code>null</code> by
-     * {@link #close()} (to free memory).
-     */
-    RDFDataset rdfDataSet;
-
-    AbstractJsonLdGraphLike(final RDFDataset rdfDataSet) {
-        this(rdfDataSet, "urn:uuid:" + SALT + "#" + "g" + System.identityHashCode(rdfDataSet));
-    }
-
-    AbstractJsonLdGraphLike(final RDFDataset rdfDataSet, final String bnodePrefix) {
-        this.rdfDataSet = Objects.requireNonNull(rdfDataSet);
-        this.bnodePrefix = Objects.requireNonNull(bnodePrefix);
-        this.factory = new JsonLdRDF(bnodePrefix);
-    }
-
-    AbstractJsonLdGraphLike(final String bnodePrefix) {
-        this(new RDFDataset(), bnodePrefix);
-    }
-
-    @Override
-    public void add(final T t) {
-        // add triples to default graph by default
-        BlankNodeOrIRI graphName = null;
-        if (t instanceof org.apache.commons.rdf.api.Quad) {
-            final org.apache.commons.rdf.api.Quad q = (org.apache.commons.rdf.api.Quad) t;
-            graphName = q.getGraphName().orElse(null);
-        }
-        // FIXME: JSON-LD's rdfDataSet.addQuad method does not support
-        // generalized RDF, so we have to do a naive cast here
-        add(graphName, (BlankNodeOrIRI) t.getSubject(), (IRI) t.getPredicate(), t.getObject());
-    }
-
-    void add(final BlankNodeOrIRI graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        final String g = factory.asJsonLdString(graphName);
-        final String s = factory.asJsonLdString(subject);
-        final String p = factory.asJsonLdString(predicate);
-        if (object instanceof BlankNodeOrIRI) {
-            final String o = factory.asJsonLdString((BlankNodeOrIRI) object);
-            rdfDataSet.addQuad(s, p, o, g);
-        } else if (object instanceof Literal) {
-            final Literal literal = (Literal) object;
-            final String language = literal.getLanguageTag().orElse(null);
-            final String datatype = literal.getDatatype().getIRIString();
-            rdfDataSet.addQuad(s, p, literal.getLexicalForm(), datatype, language, g);
-        }
-    }
-
-    public void close() {
-        // Drop the memory reference, but don't clear it
-        rdfDataSet = null;
-    }
-
-    @Override
-    public void clear() {
-        filteredGraphs(null).forEach(s -> s.clear());
-        // In theory we could use
-        // rdfDataSet.clear();
-        // but then we would need to also do
-        // rdfDataSet.put("@default", new ArrayList());
-        // .. both of which seems to be touching too much on JsonLd-Java's
-        // internal structure
-    }
-
-    @Override
-    public boolean contains(final T tripleOrQuad) {
-        return stream().anyMatch(Predicate.isEqual(tripleOrQuad));
-    }
-
-    @Override
-    public RDFDataset getRdfDataSet() {
-        return rdfDataSet;
-    }
-
-    @Override
-    public Stream<? extends T> stream() {
-        return rdfDataSet.graphNames().parallelStream().map(rdfDataSet::getQuads)
-                .flatMap(List<RDFDataset.Quad>::parallelStream).map(this::asTripleOrQuad);
-    }
-
-    /**
-     * Convert JsonLd Quad to a Commons RDF {@link Triple} or
-     * {@link org.apache.commons.rdf.api.Quad}
-     * 
-     * 
-     * @see JsonLdRDF#asTriple(Quad)
-     * @see JsonLdRDF#asQuad(Quad)
-     * @param jsonldQuad
-     *            jsonld quad to convert
-     * @return converted {@link TripleLike}
-     */
-    abstract T asTripleOrQuad(RDFDataset.Quad jsonldQuad);
-
-    // This will be made public in JsonLdDataset
-    // and is used by the other methods.
-    boolean contains(final Optional<BlankNodeOrIRI> graphName, final BlankNodeOrIRI s, final IRI p, final RDFTerm o) {
-        return filteredGraphs(graphName).flatMap(List::stream).anyMatch(quadFilter(s, p, o));
-    }
-
-    Stream<List<RDFDataset.Quad>> filteredGraphs(final Optional<BlankNodeOrIRI> graphName) {
-        return rdfDataSet.graphNames().parallelStream()
-                // if graphName == null (wildcard), select all graphs,
-                // otherwise check its jsonld string
-                // (including @default for default graph)
-                .filter(g -> graphName == null || g.equals(graphName.map(factory::asJsonLdString).orElse("@default")))
-                // remove the quads which match our filter (which could have
-                // nulls as wildcards)
-                .map(rdfDataSet::getQuads);
-    }
-
-    String graphNameAsJsonLdString(final T tripleOrQuad) {
-        if (tripleOrQuad instanceof org.apache.commons.rdf.api.Quad) {
-            final org.apache.commons.rdf.api.Quad quad = (org.apache.commons.rdf.api.Quad) tripleOrQuad;
-            return quad.getGraphName().map(factory::asJsonLdString).orElse("@default");
-        }
-        return "@default";
-    }
-
-    Predicate<RDFDataset.Quad> quadFilter(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        final Optional<Node> subjectNode = Optional.ofNullable(subject).map(factory::asJsonLdNode);
-        final Optional<Node> predicateNode = Optional.ofNullable(predicate).map(factory::asJsonLdNode);
-        final Optional<Node> objectNode = Optional.ofNullable(object).map(factory::asJsonLdNode);
-
-        return q -> {
-            if (subjectNode.isPresent() && subjectNode.get().compareTo(q.getSubject()) != 0) {
-                return false;
-            }
-            if (predicateNode.isPresent() && predicateNode.get().compareTo(q.getPredicate()) != 0) {
-                return false;
-            }
-            if (objectNode.isPresent()) {
-                if (object instanceof Literal && q.getObject().isLiteral()) { 
-                    // Special handling for COMMONSRDF-56, COMMONSRDF-51:
-                    // Less efficient wrapper to a Commons RDF Literal so 
-                    // we can use our RDF 1.1-compliant .equals()
-                    RDFTerm otherObj = factory.asRDFTerm(q.getObject());
-                    if (! (object.equals(otherObj))) {
-                        return false;
-                    }
-                } else {
-                    // JSONLD-Java's .compareTo can handle IRI, BlankNode and type-mismatch
-                    if (objectNode.get().compareTo(q.getObject()) != 0) {
-                        return false;
-                    }
-                }
-            }
-            // All patterns checked, must be good!
-            return true;
-        };
-    }
-
-    // NOTE: This is made public in JsonLdDataset and is used by the other
-    // remove methods.
-    void remove(final Optional<BlankNodeOrIRI> graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        // remove the quads which match our filter (which could have nulls as
-        // wildcards)
-        filteredGraphs(graphName).forEach(t -> t.removeIf(quadFilter(subject, predicate, object)));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java
deleted file mode 100644
index 134fd94..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdIRI.java
+++ /dev/null
@@ -1,64 +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.commons.rdf.jsonldjava;
-
-import org.apache.commons.rdf.api.IRI;
-
-import com.github.jsonldjava.core.RDFDataset;
-import com.github.jsonldjava.core.RDFDataset.Node;
-
-public interface JsonLdIRI extends JsonLdTerm, IRI {
-}
-
-final class JsonLdIRIImpl extends JsonLdTermImpl implements JsonLdIRI {
-
-    JsonLdIRIImpl(final Node node) {
-        super(node);
-        if (!node.isIRI()) {
-            throw new IllegalArgumentException("Node is not an IRI:" + node);
-        }
-    }
-
-    JsonLdIRIImpl(final String iri) {
-        super(new RDFDataset.IRI(iri));
-    }
-
-    @Override
-    public String ntriplesString() {
-        return "<" + node.getValue() + ">";
-    }
-
-    @Override
-    public String getIRIString() {
-        return node.getValue();
-    }
-
-    @Override
-    public int hashCode() {
-        return node.getValue().hashCode();
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (!(obj instanceof IRI)) {
-            return false;
-        }
-        final IRI other = (IRI) obj;
-        return node.getValue().equals(other.getIRIString());
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java
deleted file mode 100644
index 7b0aa45..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.java
+++ /dev/null
@@ -1,101 +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.commons.rdf.jsonldjava;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.Optional;
-
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.Literal;
-import org.apache.commons.rdf.simple.Types;
-
-import com.github.jsonldjava.core.RDFDataset.Node;
-
-public interface JsonLdLiteral extends JsonLdTerm, Literal {
-}
-
-class JsonLdLiteralImpl extends JsonLdTermImpl implements JsonLdLiteral {
-
-    JsonLdLiteralImpl(final Node node) {
-        super(node);
-        if (!node.isLiteral()) {
-            throw new IllegalArgumentException("Node is not a Literal:" + node);
-        }
-    }
-
-    private static String lowerCase(String langTag) { 
-        return langTag.toLowerCase(Locale.ROOT);
-    }
-    
-    @Override
-    public String ntriplesString() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append('"');
-        // Escape special characters
-        sb.append(getLexicalForm().replace("\\", "\\\\"). // escaped to \\
-                replace("\"", "\\\""). // escaped to \"
-                replace("\r", "\\r"). // escaped to \r
-                replace("\n", "\\n")); // escaped to \n
-        sb.append('"');
-
-        if (getLanguageTag().isPresent()) {
-            sb.append("@");
-            sb.append(getLanguageTag().get());
-        } else if (!getDatatype().equals(Types.XSD_STRING)) {
-            sb.append("^^");
-            sb.append(getDatatype().ntriplesString());
-        }
-        return sb.toString();
-    }
-
-    @Override
-    public String getLexicalForm() {
-        return node.getValue();
-    }
-
-    @Override
-    public IRI getDatatype() {
-        return new JsonLdIRIImpl(node.getDatatype());
-    }
-
-    @Override
-    public Optional<String> getLanguageTag() {
-        return Optional.ofNullable(node.getLanguage());
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(node.getValue(), node.getDatatype(), 
-                getLanguageTag().map(JsonLdLiteralImpl::lowerCase));
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        // COMMONSRDF-56: Do **not** use 
-        // asJsonLdNode().compareTo(other.asJsonLdNode())
-        if (obj instanceof Literal) {
-            final Literal other = (Literal) obj;
-            return getLexicalForm().equals(other.getLexicalForm()) 
-                    && getDatatype().equals(other.getDatatype())
-                    && getLanguageTag().map(JsonLdLiteralImpl::lowerCase)
-                        .equals(other.getLanguageTag().map(JsonLdLiteralImpl::lowerCase));
-        }
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
deleted file mode 100644
index bf37c6c..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuad.java
+++ /dev/null
@@ -1,55 +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.commons.rdf.jsonldjava;
-
-import java.util.Objects;
-
-import org.apache.commons.rdf.api.BlankNodeOrIRI;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.RDFTerm;
-// Note: To avoid confusion - don't import either Quad
-
-public interface JsonLdQuad extends org.apache.commons.rdf.api.Quad, JsonLdTripleLike {
-
-}
-
-final class JsonLdQuadImpl extends JsonLdQuadLikeImpl<BlankNodeOrIRI, IRI, RDFTerm, BlankNodeOrIRI>
-        implements JsonLdQuad {
-
-    JsonLdQuadImpl(final com.github.jsonldjava.core.RDFDataset.Quad quad, final String blankNodePrefix) {
-        super(quad, blankNodePrefix);
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (obj == this) {
-            return true;
-        }
-        if (!(obj instanceof org.apache.commons.rdf.api.Quad)) {
-            return false;
-        }
-        final org.apache.commons.rdf.api.Quad other = (org.apache.commons.rdf.api.Quad) obj;
-        return getGraphName().equals(other.getGraphName()) && getSubject().equals(other.getSubject())
-                && getPredicate().equals(other.getPredicate()) && getObject().equals(other.getObject());
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(getGraphName(), getSubject(), getPredicate(), getObject());
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
deleted file mode 100644
index 19add4e..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
+++ /dev/null
@@ -1,80 +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.commons.rdf.jsonldjava;
-
-import java.util.Optional;
-
-import org.apache.commons.rdf.api.QuadLike;
-import org.apache.commons.rdf.api.RDFTerm;
-
-import com.github.jsonldjava.core.RDFDataset.Quad;
-
-public interface JsonLdQuadLike<G extends RDFTerm> extends QuadLike<G>, JsonLdTripleLike {
-
-}
-
-class JsonLdQuadLikeImpl<S extends RDFTerm, P extends RDFTerm, O extends RDFTerm, G extends RDFTerm>
-        implements JsonLdQuadLike<G> {
-
-    // Note: We always pass the blankNodePrefix and don't rely on the internal
-    // blankNodePrefix in this static factory
-    private static JsonLdRDF rdfTermFactory = new JsonLdRDF();
-
-    private final Quad quad;
-    private final String blankNodePrefix;
-
-    JsonLdQuadLikeImpl(final Quad jsonldQuad, final String blankNodePrefix) {
-        this.quad = jsonldQuad;
-        this.blankNodePrefix = blankNodePrefix;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public Optional<G> getGraphName() {
-        final G g = (G) rdfTermFactory.asRDFTerm(quad.getGraph(), blankNodePrefix);
-        return Optional.ofNullable(g);
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public S getSubject() {
-        return (S) rdfTermFactory.asRDFTerm(quad.getSubject(), blankNodePrefix);
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public P getPredicate() {
-        return (P) rdfTermFactory.asRDFTerm(quad.getPredicate(), blankNodePrefix);
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public O getObject() {
-        return (O) rdfTermFactory.asRDFTerm(quad.getObject(), blankNodePrefix);
-    }
-
-    @Override
-    public Quad asJsonLdQuad() {
-        return quad;
-    }
-    
-    @Override
-    public String toString() {
-        return quad.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDF.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDF.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDF.java
deleted file mode 100644
index 816cf2f..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdRDF.java
+++ /dev/null
@@ -1,319 +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.commons.rdf.jsonldjava;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Objects;
-import java.util.UUID;
-
-import org.apache.commons.rdf.api.BlankNode;
-import org.apache.commons.rdf.api.BlankNodeOrIRI;
-import org.apache.commons.rdf.api.Dataset;
-import org.apache.commons.rdf.api.Graph;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.Literal;
-import org.apache.commons.rdf.api.RDFTerm;
-import org.apache.commons.rdf.api.RDF;
-import org.apache.commons.rdf.api.Triple;
-import org.apache.commons.rdf.simple.Types;
-
-import com.github.jsonldjava.core.RDFDataset;
-import com.github.jsonldjava.core.RDFDataset.Node;
-
-/**
- * JSON-LD Java RDF implementation.
- */
-public final class JsonLdRDF implements RDF {
-
-    final String bnodePrefix;
-
-    public JsonLdRDF() {
-        // An "outside Graph" bnodePrefix
-        this("urn:uuid:" + UUID.randomUUID() + "#b");
-    }
-
-    JsonLdRDF(final String bnodePrefix) {
-        this.bnodePrefix = Objects.requireNonNull(bnodePrefix);
-    }
-
-    /**
-     * Adapt a JsonLd {@link RDFDataset} as a Commons RDF {@link Dataset}.
-     * <p>
-     * Changes to the Commons RDF {@link Dataset} are reflected in the JsonLd
-     * {@link RDFDataset} and vice versa.
-     * 
-     * @see #asGraph(RDFDataset)
-     * @param rdfDataSet
-     *            JsonLd {@link RDFDataset} to adapt
-     * @return Adapted {@link Dataset}
-     */
-    public JsonLdDataset asDataset(final RDFDataset rdfDataSet) {
-        return new JsonLdDatasetImpl(rdfDataSet);
-    }
-
-    /**
-     * Adapt a JsonLd {@link RDFDataset} as a Commons RDF {@link Graph}.
-     * <p>
-     * Only triples in the <em>default graph</em> are included. To retrieve any
-     * other graph, {@link #asDataset(RDFDataset)} together with
-     * {@link Dataset#getGraph(BlankNodeOrIRI)}.
-     * <p>
-     * Changes to the Commons RDF {@link Graph} are reflected in the JsonLd
-     * {@link RDFDataset} and vice versa.
-     * 
-     * @see #asDataset(RDFDataset)
-     * @see #asUnionGraph(RDFDataset)
-     * @param rdfDataSet
-     *            JsonLd {@link RDFDataset} to adapt
-     * @return Adapted {@link Graph} covering the <em>default graph</em>
-     */
-    public JsonLdGraph asGraph(final RDFDataset rdfDataSet) {
-        return new JsonLdGraphImpl(rdfDataSet);
-    }
-
-    public Node asJsonLdNode(final RDFTerm term) {
-        if (term instanceof JsonLdBlankNode) {
-            final JsonLdBlankNode jsonLdBlankNode = (JsonLdBlankNode) term;
-            if (jsonLdBlankNode.uniqueReference().startsWith(bnodePrefix)) {
-                // Only return blank nodes 'as is' if they have the same prefix
-                return jsonLdBlankNode.asJsonLdNode();
-            }
-        } else if (term instanceof JsonLdTerm) {
-            // non-Bnodes can always be return as-is
-            return ((JsonLdTerm) term).asJsonLdNode();
-        }
-        if (term instanceof IRI) {
-            return new RDFDataset.IRI(((IRI) term).getIRIString());
-        }
-        if (term instanceof BlankNode) {
-            final String ref = ((BlankNode) term).uniqueReference();
-            if (ref.startsWith(bnodePrefix)) {
-                // one of our own (but no longer a JsonLdBlankNode),
-                // we can recover the label after our unique prefix
-                return new RDFDataset.BlankNode(ref.replace(bnodePrefix, ""));
-            }
-            // The "foreign" unique reference might not be a valid bnode string,
-            // we'll convert to a UUID
-            final UUID uuid = UUID.nameUUIDFromBytes(ref.getBytes(StandardCharsets.UTF_8));
-            return new RDFDataset.BlankNode("_:" + uuid);
-        }
-        if (term instanceof Literal) {
-            final Literal literal = (Literal) term;
-            return new RDFDataset.Literal(literal.getLexicalForm(), literal.getDatatype().getIRIString(),
-                    literal.getLanguageTag().orElse(null));
-        }
-        throw new IllegalArgumentException("RDFTerm not instanceof IRI, BlankNode or Literal: " + term);
-    }
-
-    /**
-     * Adapt a Commons RDF {@link org.apache.commons.rdf.api.Quad} as a JsonLd
-     * {@link com.github.jsonldjava.core.RDFDataset.Quad}.
-     * 
-     * @param quad
-     *            Commons RDF {@link org.apache.commons.rdf.api.Quad} to adapt
-     * @return Adapted JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad}
-     */
-    public RDFDataset.Quad asJsonLdQuad(final org.apache.commons.rdf.api.Quad quad) {
-        final BlankNodeOrIRI g = quad.getGraphName().orElse(null);
-        return createJsonLdQuad(g, quad.getSubject(), quad.getPredicate(), quad.getObject());
-    }
-
-    /**
-     * Adapt a Commons RDF {@link Triple} as a JsonLd
-     * {@link com.github.jsonldjava.core.RDFDataset.Quad}.
-     * 
-     * @param triple
-     *            Commons RDF {@link Triple} to adapt
-     * @return Adapted JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad}
-     */
-    public RDFDataset.Quad asJsonLdQuad(final Triple triple) {
-        return createJsonLdQuad(null, triple.getSubject(), triple.getPredicate(), triple.getObject());
-    }
-
-    /**
-     * Adapt a JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad} as a
-     * Commons RDF {@link org.apache.commons.rdf.api.Quad}.
-     * <p>
-     * The underlying JsonLd quad can be retrieved with
-     * {@link JsonLdQuad#asJsonLdQuad()}.
-     * 
-     * @param quad
-     *            A JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad} to
-     *            adapt
-     * @return Adapted {@link JsonLdQuad}
-     */
-    public JsonLdQuad asQuad(final RDFDataset.Quad quad) {
-        return new JsonLdQuadImpl(quad, bnodePrefix);
-    }
-
-    /**
-     * Adapt a JsonLd {@link Node} as a Commons RDF {@link RDFTerm}.
-     * <p>
-     * The underlying node can be retrieved with
-     * {@link JsonLdTerm#asJsonLdNode()}.
-     * 
-     * @param node
-     *            A JsonLd {@link Node} to adapt
-     * @return Adapted {@link JsonLdTerm}
-     */
-    public JsonLdTerm asRDFTerm(final Node node) {
-        return asRDFTerm(node, bnodePrefix);
-    }
-
-    /**
-     * Adapt a JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad} as a
-     * Commons RDF {@link org.apache.commons.rdf.api.Triple}.
-     * <p>
-     * The underlying JsonLd quad can be retrieved with
-     * {@link JsonLdTriple#asJsonLdQuad()}.
-     * 
-     * @param quad
-     *            A JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad} to
-     *            adapt
-     * @return Adapted {@link JsonLdTriple}
-     */
-    public JsonLdTriple asTriple(final RDFDataset.Quad quad) {
-        return new JsonLdTripleImpl(quad, bnodePrefix);
-    }
-
-    /**
-     * Adapt a JsonLd {@link RDFDataset} as a Commons RDF {@link Graph}.
-     * <p>
-     * The graph can be seen as a <em>union graph</em> as it will contains all
-     * the triples across all the graphs of the underlying {@link RDFDataset}.
-     * <p>
-     * Note that some triple operations on a union graph can be inefficient as
-     * they need to remove any duplicate triples across the graphs.
-     * <p>
-     * Changes to the Commons RDF {@link Graph} are reflected in the JsonLd
-     * {@link RDFDataset} and vice versa. Triples removed from the graph are
-     * removed from <strong>all</strong> graphs, while triples added are added
-     * to the <em>default graph</em>.
-     * 
-     * @param rdfDataSet
-     *            JsonLd {@link RDFDataset} to adapt
-     * @return Adapted {@link Dataset}
-     */
-    public JsonLdUnionGraph asUnionGraph(final RDFDataset rdfDataSet) {
-        return new JsonLdUnionGraphImpl(rdfDataSet);
-    }
-
-    @Override
-    public JsonLdBlankNode createBlankNode() {
-        final String id = "_:" + UUID.randomUUID().toString();
-        return new JsonLdBlankNodeImpl(new RDFDataset.BlankNode(id), bnodePrefix);
-    }
-
-    @Override
-    public JsonLdBlankNode createBlankNode(final String name) {
-        final String id = "_:" + name;
-        // TODO: Check if name is valid JSON-LD BlankNode identifier
-        return new JsonLdBlankNodeImpl(new RDFDataset.BlankNode(id), bnodePrefix);
-    }
-
-    @Override
-    public JsonLdDataset createDataset() {
-        return new JsonLdDatasetImpl(bnodePrefix);
-    }
-
-    @Override
-    public JsonLdGraph createGraph() {
-        return new JsonLdGraphImpl(bnodePrefix);
-    }
-
-    @Override
-    public JsonLdIRI createIRI(final String iri) {
-        return new JsonLdIRIImpl(iri);
-    }
-
-    @Override
-    public JsonLdLiteral createLiteral(final String literal) {
-        return new JsonLdLiteralImpl(new RDFDataset.Literal(literal, null, null));
-    }
-
-    @Override
-    public JsonLdLiteral createLiteral(final String literal, final IRI dataType) {
-        return new JsonLdLiteralImpl(new RDFDataset.Literal(literal, dataType.getIRIString(), null));
-    }
-
-    @Override
-    public JsonLdLiteral createLiteral(final String literal, final String language) {
-        return new JsonLdLiteralImpl(new RDFDataset.Literal(literal, Types.RDF_LANGSTRING.getIRIString(), language));
-    }
-
-    @Override
-    public JsonLdQuad createQuad(final BlankNodeOrIRI graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object)
-            throws IllegalArgumentException, UnsupportedOperationException {
-        return new JsonLdQuadImpl(createJsonLdQuad(graphName, subject, predicate, object), bnodePrefix);
-    }
-
-    @Override
-    public JsonLdTriple createTriple(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        return new JsonLdTripleImpl(createJsonLdQuad(null, subject, predicate, object), bnodePrefix);
-    }
-
-    String asJsonLdString(final BlankNodeOrIRI blankNodeOrIRI) {
-        if (blankNodeOrIRI == null) {
-            return null;
-        }
-        if (blankNodeOrIRI instanceof IRI) {
-            return ((IRI) blankNodeOrIRI).getIRIString();
-        } else if (blankNodeOrIRI instanceof BlankNode) {
-            final BlankNode blankNode = (BlankNode) blankNodeOrIRI;
-            final String ref = blankNode.uniqueReference();
-            if (ref.startsWith(bnodePrefix)) {
-                // One of ours (but possibly not a JsonLdBlankNode) -
-                // we can use the suffix directly
-                return ref.replace(bnodePrefix, "");
-            } else {
-                // Map to unique bnode identifier, e.g.
-                // _:0dbd92ee-ab1a-45e7-bba2-7ade54f87ec5
-                final UUID uuid = UUID.nameUUIDFromBytes(ref.getBytes(StandardCharsets.UTF_8));
-                return "_:" + uuid;
-            }
-        } else {
-            throw new IllegalArgumentException("Expected a BlankNode or IRI, not: " + blankNodeOrIRI);
-        }
-    }
-
-    JsonLdTerm asRDFTerm(final Node node, final String blankNodePrefix) {
-        if (node == null) {
-            return null; // e.g. default graph
-        }
-        if (node.isIRI()) {
-            return new JsonLdIRIImpl(node);
-        } else if (node.isBlankNode()) {
-            return new JsonLdBlankNodeImpl(node, blankNodePrefix);
-        } else if (node.isLiteral()) {
-            // TODO: Our own JsonLdLiteral
-            if (node.getLanguage() != null) {
-                return createLiteral(node.getValue(), node.getLanguage());
-            } else {
-                return createLiteral(node.getValue(), createIRI(node.getDatatype()));
-            }
-        } else {
-            throw new IllegalArgumentException("Node is neither IRI, BlankNode nor Literal: " + node);
-        }
-    }
-
-    RDFDataset.Quad createJsonLdQuad(final BlankNodeOrIRI graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        return new RDFDataset.Quad(asJsonLdNode(subject), asJsonLdNode(predicate), asJsonLdNode(object),
-                asJsonLdString(graphName));
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
deleted file mode 100644
index 01f3ae0..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTerm.java
+++ /dev/null
@@ -1,51 +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.commons.rdf.jsonldjava;
-
-import org.apache.commons.rdf.api.RDFTerm;
-
-import com.github.jsonldjava.core.RDFDataset.Node;
-
-public interface JsonLdTerm extends RDFTerm {
-
-    /**
-     * Return the underlying JsonLd {@link Node}.
-     * 
-     * @return JsonLd {@link Node}
-     */
-    Node asJsonLdNode();
-}
-
-abstract class JsonLdTermImpl implements JsonLdTerm {
-    final Node node;
-
-    JsonLdTermImpl(final Node node) {
-        this.node = node;
-    }
-
-    @Override
-    public Node asJsonLdNode() {
-        return node;
-    }
-    
-    @Override
-    public String toString() {
-        return ntriplesString();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
deleted file mode 100644
index 4211c8f..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTriple.java
+++ /dev/null
@@ -1,53 +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.commons.rdf.jsonldjava;
-
-import java.util.Objects;
-
-import org.apache.commons.rdf.api.BlankNodeOrIRI;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.RDFTerm;
-import org.apache.commons.rdf.api.Triple;
-
-import com.github.jsonldjava.core.RDFDataset.Quad;
-
-public interface JsonLdTriple extends Triple, JsonLdTripleLike {
-
-}
-
-final class JsonLdTripleImpl extends JsonLdQuadLikeImpl<BlankNodeOrIRI, IRI, RDFTerm, RDFTerm> implements JsonLdTriple {
-
-    JsonLdTripleImpl(final Quad quad, final String blankNodePrefix) {
-        super(quad, blankNodePrefix);
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (!(obj instanceof Triple)) {
-            return false;
-        }
-        final Triple other = (Triple) obj;
-        return getSubject().equals(other.getSubject()) && getPredicate().equals(other.getPredicate())
-                && getObject().equals(other.getObject());
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(getSubject(), getPredicate(), getObject());
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTripleLike.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTripleLike.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTripleLike.java
deleted file mode 100644
index 521beb1..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdTripleLike.java
+++ /dev/null
@@ -1,32 +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.commons.rdf.jsonldjava;
-
-import org.apache.commons.rdf.api.TripleLike;
-
-public interface JsonLdTripleLike extends TripleLike {
-
-    /**
-     * Return the underlying JsonLD
-     * {@link com.github.jsonldjava.core.RDFDataset.Quad}
-     * 
-     * @return The JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}
-     */
-    public com.github.jsonldjava.core.RDFDataset.Quad asJsonLdQuad();
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdUnionGraph.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdUnionGraph.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdUnionGraph.java
deleted file mode 100644
index 7a4319a..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdUnionGraph.java
+++ /dev/null
@@ -1,113 +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.commons.rdf.jsonldjava;
-
-import java.util.List;
-import java.util.stream.Stream;
-
-import org.apache.commons.rdf.api.BlankNodeOrIRI;
-import org.apache.commons.rdf.api.Graph;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.RDFTerm;
-import org.apache.commons.rdf.api.Triple;
-
-import com.github.jsonldjava.core.RDFDataset;
-
-/**
- * A <strong>union graph</strong> representation of a JsonLd {@link RDFDataset}.
- * <p>
- * A union graph contains all the triples of the dataset, irregardless of their
- * graph names.
- * <p>
- * {@link #add(Triple)} and {@link #add(BlankNodeOrIRI, IRI, RDFTerm)} will add
- * the triple to the default graph (e.g. <code>@default</code> in JSON-LD),
- * while the remaining methods (including {@link #remove(Triple)} or
- * {@link #remove(BlankNodeOrIRI, IRI, RDFTerm)}) relate to triples from
- * <strong>all</strong> graphs.
- * <p>
- * <strong>Note:</strong> Some operations like {@link #stream()} and
- * {@link #size()} are inefficient as they skip any duplicate triples from
- * multiple graphs.
- */
-public interface JsonLdUnionGraph extends JsonLdGraphLike<org.apache.commons.rdf.api.Triple>, Graph {
-}
-
-class JsonLdUnionGraphImpl extends AbstractJsonLdGraphLike<org.apache.commons.rdf.api.Triple>
-        implements JsonLdUnionGraph {
-
-    JsonLdUnionGraphImpl(final String bnodePrefix) {
-        super(bnodePrefix);
-    }
-
-    JsonLdUnionGraphImpl(final RDFDataset rdfDataSet) {
-        super(rdfDataSet);
-    }
-
-    JsonLdUnionGraphImpl(final RDFDataset rdfDataSet, final String bnodePrefix) {
-        super(rdfDataSet, bnodePrefix);
-    }
-
-    @Override
-    public void add(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        super.add(null, subject, predicate, object);
-    }
-
-    @Override
-    public boolean contains(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        return super.contains(null, subject, predicate, object);
-    }
-
-    @Override
-    public void remove(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        super.remove(null, subject, predicate, object);
-    }
-
-    @Override
-    public void remove(final Triple t) {
-        // Remove from ALL graphs, not just default graph
-        super.remove(null, t.getSubject(), t.getPredicate(), t.getObject());
-    }
-
-    @Override
-    public Stream<JsonLdTriple> stream(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        return filteredGraphs(null).flatMap(List::stream).filter(quadFilter(subject, predicate, object))
-                .map(factory::asTriple)
-                // Make sure we don't have duplicate triples
-                // NOTE: This can be quite inefficient
-                .distinct();
-    }
-
-    @Override
-    public Stream<? extends Triple> stream() {
-        // NOTE: inefficient as we have to remove duplicate triples
-        // in different graphs :-(
-        return super.stream().distinct();
-    }
-
-    @Override
-    JsonLdTriple asTripleOrQuad(final com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad) {
-        return factory.asTriple(jsonldQuad);
-    }
-
-    @Override
-    public long size() {
-        // Note: Our specialized stream() already removes duplicates using
-        // .distinct()
-        return stream().count();
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/experimental/JsonLdParser.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/experimental/JsonLdParser.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/experimental/JsonLdParser.java
deleted file mode 100644
index 430df02..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/experimental/JsonLdParser.java
+++ /dev/null
@@ -1,160 +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.commons.rdf.jsonldjava.experimental;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.nio.file.Files;
-import java.util.function.Predicate;
-
-import org.apache.commons.rdf.api.Dataset;
-import org.apache.commons.rdf.api.Graph;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.RDFSyntax;
-import org.apache.commons.rdf.jsonldjava.JsonLdDataset;
-import org.apache.commons.rdf.jsonldjava.JsonLdGraph;
-import org.apache.commons.rdf.jsonldjava.JsonLdRDF;
-import org.apache.commons.rdf.simple.experimental.AbstractRDFParser;
-
-import com.github.jsonldjava.core.JsonLdError;
-import com.github.jsonldjava.core.JsonLdOptions;
-import com.github.jsonldjava.core.JsonLdProcessor;
-import com.github.jsonldjava.core.RDFDataset;
-import com.github.jsonldjava.utils.JsonUtils;
-
-public class JsonLdParser extends AbstractRDFParser<JsonLdParser> {
-
-    @Override
-    protected JsonLdRDF createRDFTermFactory() {
-        return new JsonLdRDF();
-    }
-
-    @Override
-    public JsonLdParser contentType(final RDFSyntax rdfSyntax) throws IllegalArgumentException {
-        if (rdfSyntax != null && rdfSyntax != RDFSyntax.JSONLD) {
-            throw new IllegalArgumentException("Unsupported contentType: " + rdfSyntax);
-        }
-        return super.contentType(rdfSyntax);
-    }
-
-    @Override
-    public JsonLdParser contentType(final String contentType) throws IllegalArgumentException {
-        final JsonLdParser c = super.contentType(contentType);
-        if (c.getContentType().filter(Predicate.isEqual(RDFSyntax.JSONLD).negate()).isPresent()) {
-            throw new IllegalArgumentException("Unsupported contentType: " + contentType);
-        }
-        return c;
-    }
-
-    private static URL asURL(final IRI iri) throws IllegalStateException {
-        try {
-            return new URI(iri.getIRIString()).toURL();
-        } catch (MalformedURLException | URISyntaxException e) {
-            throw new IllegalStateException("Invalid URL: " + iri.getIRIString());
-        }
-    }
-
-    @Override
-    protected void checkSource() throws IOException {
-        super.checkSource();
-        // Might throw IllegalStateException if invalid
-        getSourceIri().map(JsonLdParser::asURL);
-    }
-
-    @Override
-    protected void parseSynchronusly() throws IOException {
-        final Object json = readSource();
-        final JsonLdOptions options = new JsonLdOptions();
-        getBase().map(IRI::getIRIString).ifPresent(options::setBase);
-        // TODO: base from readSource() (after redirection and Content-Location
-        // header)
-        // should be forwarded
-
-        // TODO: Modify JsonLdProcessor to accept the target RDFDataset
-        RDFDataset rdfDataset;
-        try {
-            rdfDataset = (RDFDataset) JsonLdProcessor.toRDF(json, options);
-        } catch (final JsonLdError e) {
-            throw new IOException("Could not parse Json-LD", e);
-        }
-        if (getTargetGraph().isPresent()) {
-            final Graph intoGraph = getTargetGraph().get();
-            if (intoGraph instanceof JsonLdGraph && !intoGraph.contains(null, null, null)) {
-                // Empty graph, we can just move over the map content directly:
-                final JsonLdGraph jsonLdGraph = (JsonLdGraph) intoGraph;
-                jsonLdGraph.getRdfDataSet().putAll(rdfDataset);
-                return;
-                // otherwise we have to merge as normal
-            }
-            // TODO: Modify JsonLdProcessor to have an actual triple callback
-            final Graph parsedGraph = getJsonLdFactory().asGraph(rdfDataset);
-            // sequential() as we don't know if destination is thread safe :-/
-            parsedGraph.stream().sequential().forEach(intoGraph::add);
-        } else if (getTargetDataset().isPresent()) {
-            final Dataset intoDataset = getTargetDataset().get();
-            if (intoDataset instanceof JsonLdDataset && !intoDataset.contains(null, null, null, null)) {
-                final JsonLdDataset jsonLdDataset = (JsonLdDataset) intoDataset;
-                // Empty - we can just do a brave replace!
-                jsonLdDataset.getRdfDataSet().putAll(rdfDataset);
-                return;
-                // otherwise we have to merge.. but also avoid duplicate
-                // triples,
-                // map blank nodes etc, so we'll fall back to normal Dataset
-                // appending.
-            }
-            final Dataset fromDataset = getJsonLdFactory().asDataset(rdfDataset);
-            // .sequential() as we don't know if destination is thread-safe :-/
-            fromDataset.stream().sequential().forEach(intoDataset::add);
-        } else {
-            final Dataset fromDataset = getJsonLdFactory().asDataset(rdfDataset);
-            // No need for .sequential() here
-            fromDataset.stream().forEach(getTarget());
-        }
-    }
-
-    private JsonLdRDF getJsonLdFactory() {
-        if (getRdfTermFactory().isPresent() && getRdfTermFactory().get() instanceof JsonLdRDF) {
-            return (JsonLdRDF) getRdfTermFactory().get();
-        }
-        return createRDFTermFactory();
-    }
-
-    private Object readSource() throws IOException {
-        // Due to checked IOException we can't easily
-        // do this with .map and .orElseGet()
-
-        if (getSourceInputStream().isPresent()) {
-            return JsonUtils.fromInputStream(getSourceInputStream().get());
-        }
-        if (getSourceIri().isPresent()) {
-            // TODO: propagate @base from content
-            return JsonUtils.fromURL(asURL(getSourceIri().get()), JsonUtils.getDefaultHttpClient());
-        }
-        if (getSourceFile().isPresent()) {
-            try (InputStream inputStream = Files.newInputStream(getSourceFile().get())) {
-                return JsonUtils.fromInputStream(inputStream);
-            }
-        }
-        throw new IllegalStateException("No known source found");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/experimental/package-info.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/experimental/package-info.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/experimental/package-info.java
deleted file mode 100644
index e0a587e..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/experimental/package-info.java
+++ /dev/null
@@ -1,31 +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.
- */
-/**
- * Experimental Commons RDF JSONLD-Java implementations.
- * <p>
- * Classes in this package should be considered <strong>at risk</strong>; they
- * might change or be removed in the next minor update of Commons RDF.
- * <p>
- * When a class has stabilized, it will move to the
- * {@link org.apache.commons.rdf.jsonldjava} package.
- * <ul>
- * <li>{@link JsonLdParser} - an JSONLD-Java-backed implementations of
- * {@link org.apache.commons.rdf.experimental.RDFParser}.</li>
- * </ul>
- */
-package org.apache.commons.rdf.jsonldjava.experimental;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/package-info.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/package-info.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/package-info.java
deleted file mode 100644
index 7eb323b..0000000
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/package-info.java
+++ /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.
- */
-/**
- * Integration with jsonld-java
- * 
- * @see org.apache.commons.rdf.jsonldjava.JsonLdRDF
- * @see org.apache.commons.rdf.jsonldjava.JsonLdGraph
- * @see org.apache.commons.rdf.jsonldjava.JsonLdUnionGraph
- * @see org.apache.commons.rdf.jsonldjava.JsonLdDataset
- * 
- */
-package org.apache.commons.rdf.jsonldjava;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDF
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDF b/jsonld-java/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDF
deleted file mode 100644
index 2c97ca5..0000000
--- a/jsonld-java/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDF
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.commons.rdf.jsonldjava.JsonLdRDF

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/main/resources/test.jsonld
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/resources/test.jsonld b/jsonld-java/src/main/resources/test.jsonld
deleted file mode 100644
index f5227d7..0000000
--- a/jsonld-java/src/main/resources/test.jsonld
+++ /dev/null
@@ -1,26 +0,0 @@
-{ "http://purl.org/dc/elements/1.1/rights": "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. ",
-  "@context": {    
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "pred1": "http://example.com/pred1",
-    "pred2": { "@id": "http://example.com/pred2",
-               "@type": "@id" },
-    "pred3": { "@id": "http://example.com/pred3",
-               "@type": "xsd:integer" },
-    "pred4": { "@id": "http://example.com/pred4",
-               "@type": "@id" },               
-    "Type": "http://example.com/Type"    
-  } , 
-  "@id": "http://example.com/test",
-  "@type": "Type",
-  "pred1": "Hello",
-  "pred2": "http://example.com/other",
-  "pred3": 1337,
-  "pred4": { "@id": "http://example.com/graph",
-             "@graph": [
-                 { "@id": "http://example.com/test",
-                   "pred1": "Other value",
-                   "pred2": "http://example.com/graph"
-                 }               
-             ]
-           }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/site/resources/profile.jacoco
----------------------------------------------------------------------
diff --git a/jsonld-java/src/site/resources/profile.jacoco b/jsonld-java/src/site/resources/profile.jacoco
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNodeTest.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNodeTest.java b/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNodeTest.java
deleted file mode 100644
index f0baa64..0000000
--- a/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNodeTest.java
+++ /dev/null
@@ -1,41 +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.commons.rdf.jsonldjava;
-
-import java.util.UUID;
-
-import org.apache.commons.rdf.api.AbstractBlankNodeTest;
-import org.apache.commons.rdf.api.BlankNode;
-
-import com.github.jsonldjava.core.RDFDataset;
-
-public class JsonLdBlankNodeTest extends AbstractBlankNodeTest {
-
-    String fixedPrefix = "urn:uuid:d028ca89-8b2f-4e18-90a0-8959f955038d#";
-
-    @Override
-    protected BlankNode getBlankNode() {
-        return getBlankNode(UUID.randomUUID().toString());
-    }
-
-    @Override
-    protected BlankNode getBlankNode(final String identifier) {
-        return new JsonLdBlankNodeImpl(new RDFDataset.BlankNode("_:" + identifier), fixedPrefix);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdComparisonTest.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdComparisonTest.java b/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdComparisonTest.java
deleted file mode 100644
index f3981be..0000000
--- a/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdComparisonTest.java
+++ /dev/null
@@ -1,141 +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.commons.rdf.jsonldjava;
-
-import static org.junit.Assert.*;
-
-import java.util.Optional;
-
-import org.apache.commons.rdf.simple.Types;
-import org.junit.Test;
-
-/**
- * COMMONSRDF-56: Test Literal comparisons with JSONLD-Java
- */
-public class JsonLdComparisonTest {
-    
-    JsonLdRDF rdf = new JsonLdRDF();
-    
-    @Test
-    public void literalEqual() throws Exception {
-        JsonLdLiteral lit1 = rdf.createLiteral("Hello");
-        JsonLdLiteral lit2 = rdf.createLiteral("Hello");
-        JsonLdLiteral lit3 = rdf.createLiteral("Hello", Types.XSD_STRING);
-        assertEquals(lit1, lit2);
-        assertEquals(lit1, lit3);
-    }
-
-    @Test
-    public void literalNotEqual() throws Exception {
-        JsonLdLiteral lit1 = rdf.createLiteral("Hello");
-        JsonLdLiteral lit2 = rdf.createLiteral("Hello there");
-        assertNotEquals(lit1, lit2);
-    }
-
-    @Test
-    public void literalEqualLang() throws Exception {
-        JsonLdLiteral lit1 = rdf.createLiteral("Allo Allo", "fr");
-        JsonLdLiteral lit2 = rdf.createLiteral("Allo Allo", "fr");
-        assertEquals(lit1, lit2);
-    }
-    
-    @Test
-    public void literalNotEqualLang() throws Exception {
-        JsonLdLiteral lit1 = rdf.createLiteral("Hello", "en");
-        JsonLdLiteral lit2 = rdf.createLiteral("Hello", "en-us");
-        assertNotEquals(lit1, lit2);
-    }
-
-    @Test
-    public void literalEqualType() throws Exception {
-        JsonLdLiteral lit1 = rdf.createLiteral("1", Types.XSD_INTEGER);
-        JsonLdLiteral lit2 = rdf.createLiteral("1", Types.XSD_INTEGER);
-        assertEquals(lit1, lit2);
-    }
-
-    
-    @Test
-    public void literalNotEqualType() throws Exception {
-        JsonLdLiteral lit1 = rdf.createLiteral("1", Types.XSD_INTEGER);
-        JsonLdLiteral lit2 = rdf.createLiteral("2", Types.XSD_INTEGER);
-        JsonLdLiteral lit3 = rdf.createLiteral("1", Types.XSD_STRING);
-
-        assertNotEquals(lit1, lit2);
-        assertNotEquals(lit1, lit3);
-    }
-
-
-    @Test
-    public void grahContains() throws Exception {
-        JsonLdGraph graph = rdf.createGraph();
-        JsonLdIRI s = rdf.createIRI("http://example.com/s");
-        JsonLdIRI p = rdf.createIRI("http://example.com/p");
-        JsonLdLiteral lit1 = rdf.createLiteral("Hello");
-        
-        graph.add(s, p, lit1);
-        assertTrue(graph.contains(s, p, rdf.createLiteral("Hello")));
-        assertTrue(graph.contains(s, p, rdf.createLiteral("Hello", Types.XSD_STRING)));
-        assertFalse(graph.contains(s, p, rdf.createLiteral("Hello", Types.XSD_NORMALIZEDSTRING)));
-        assertFalse(graph.contains(s, p, rdf.createLiteral("Hello", "en")));
-        assertFalse(graph.contains(s, p, rdf.createLiteral("Other")));
-    }
-    
-    @Test
-    public void datasetContains() throws Exception {
-        JsonLdDataset dataset = rdf.createDataset();
-        JsonLdIRI s = rdf.createIRI("http://example.com/s");
-        JsonLdIRI p = rdf.createIRI("http://example.com/p");
-        JsonLdLiteral lit1 = rdf.createLiteral("Hello");
-        
-        dataset.add(null, s, p, lit1);
-        assertTrue(dataset.contains(Optional.empty(), s, p, rdf.createLiteral("Hello")));
-        assertTrue(dataset.contains(Optional.empty(), s, p, rdf.createLiteral("Hello", Types.XSD_STRING)));
-        assertFalse(dataset.contains(Optional.empty(), s, p, rdf.createLiteral("Hello", Types.XSD_NORMALIZEDSTRING)));
-        assertFalse(dataset.contains(Optional.empty(), s, p, rdf.createLiteral("Hello", "en")));
-        assertFalse(dataset.contains(Optional.empty(), s, p, rdf.createLiteral("Other")));
-    }
-    
-    @Test
-    public void datasetRemove() throws Exception {
-        JsonLdDataset dataset = rdf.createDataset();
-        JsonLdIRI s = rdf.createIRI("http://example.com/s");
-        JsonLdIRI p = rdf.createIRI("http://example.com/p");
-        JsonLdLiteral lit1 = rdf.createLiteral("Hello");
-        
-        dataset.add(null, s, p, lit1);
-        assertTrue(dataset.contains(Optional.empty(), s, p, lit1));
-        dataset.remove(null, null, null, rdf.createLiteral("Other")); // should NOT match
-        assertTrue(dataset.contains(Optional.empty(), s, p, lit1));
-        dataset.remove(null, null, null, rdf.createLiteral("Hello", Types.XSD_STRING)); // SHOULD  match
-        assertFalse(dataset.contains(Optional.empty(), s, p, lit1));
-    }
-
-    @Test
-    public void datasetStream() throws Exception {
-        JsonLdDataset dataset = rdf.createDataset();
-        JsonLdIRI s = rdf.createIRI("http://example.com/s");
-        JsonLdIRI p = rdf.createIRI("http://example.com/p");
-        JsonLdLiteral lit1 = rdf.createLiteral("Hello");
-        JsonLdLiteral lit2 = rdf.createLiteral("Other");
-        
-        dataset.add(null, s, p, lit1);
-        assertTrue(dataset.stream(Optional.empty(), s, p, lit1).findAny().isPresent());        
-        assertFalse(dataset.stream(Optional.empty(), s, p, lit2).findAny().isPresent());        
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdDatasetTest.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdDatasetTest.java b/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdDatasetTest.java
deleted file mode 100644
index d5e6309..0000000
--- a/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdDatasetTest.java
+++ /dev/null
@@ -1,30 +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.commons.rdf.jsonldjava;
-
-import org.apache.commons.rdf.api.AbstractDatasetTest;
-import org.apache.commons.rdf.api.RDF;
-
-public class JsonLdDatasetTest extends AbstractDatasetTest {
-
-    @Override
-    public RDF createFactory() {
-        return new JsonLdRDF();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdGraphTest.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdGraphTest.java b/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdGraphTest.java
deleted file mode 100644
index e63e43d..0000000
--- a/jsonld-java/src/test/java/org/apache/commons/rdf/jsonldjava/JsonLdGraphTest.java
+++ /dev/null
@@ -1,30 +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.commons.rdf.jsonldjava;
-
-import org.apache.commons.rdf.api.AbstractGraphTest;
-import org.apache.commons.rdf.api.RDF;
-
-public class JsonLdGraphTest extends AbstractGraphTest {
-
-    @Override
-    public RDF createFactory() {
-        return new JsonLdRDF();
-    }
-
-}


Mime
View raw message