You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2017/10/30 14:57:19 UTC

[19/22] commons-rdf git commit: Module names, directory names, and artifact names should match.

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
deleted file mode 100644
index bb4dc5b..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
+++ /dev/null
@@ -1,454 +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.api;
-
-import static org.junit.Assert.*;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.Optional;
-
-import org.junit.Assume;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Test RDF implementation (and thus its RDFTerm implementations)
- * <p>
- * To add to your implementation's tests, create a subclass with a name ending
- * in <code>Test</code> and provide {@link #createFactory()} which minimally
- * supports one of the operations, but ideally supports all operations.
- *
- * @see RDF
- */
-public abstract class AbstractRDFTest {
-
-    private RDF factory;
-
-    /**
-     *
-     * This method must be overridden by the implementing test to provide a
-     * factory for the test to create {@link Literal}, {@link IRI} etc.
-     *
-     * @return {@link RDF} instance to be tested.
-     */
-    protected abstract RDF createFactory();
-
-    @Before
-    public void setUp() {
-        factory = createFactory();
-    }
-
-    @Test
-    public void testCreateBlankNode() throws Exception {
-        final BlankNode bnode = factory.createBlankNode();
-
-        final BlankNode bnode2 = factory.createBlankNode();
-        assertNotEquals("Second blank node has not got a unique internal identifier", bnode.uniqueReference(),
-                bnode2.uniqueReference());
-    }
-
-    @Test
-    public void testCreateBlankNodeIdentifierEmpty() throws Exception {
-        try {
-            factory.createBlankNode("");
-        } catch (final IllegalArgumentException e) {
-            // Expected exception
-        }
-    }
-
-    @Test
-    public void testCreateBlankNodeIdentifier() throws Exception {
-        factory.createBlankNode("example1");
-    }
-
-    @Test
-    public void testCreateBlankNodeIdentifierTwice() throws Exception {
-        BlankNode bnode1, bnode2, bnode3;
-        bnode1 = factory.createBlankNode("example1");
-        bnode2 = factory.createBlankNode("example1");
-        bnode3 = factory.createBlankNode("differ");
-        // We don't know what the identifier is, but it MUST be the same
-        assertEquals(bnode1.uniqueReference(), bnode2.uniqueReference());
-        // We don't know what the ntriplesString is, but it MUST be the same
-        assertEquals(bnode1.ntriplesString(), bnode2.ntriplesString());
-        // and here it MUST differ
-        assertNotEquals(bnode1.uniqueReference(), bnode3.uniqueReference());
-        assertNotEquals(bnode1.ntriplesString(), bnode3.ntriplesString());
-    }
-
-    @Test
-    public void testCreateBlankNodeIdentifierTwiceDifferentFactories() throws Exception {
-        BlankNode bnode1, differentFactory;
-        bnode1 = factory.createBlankNode();
-        // it MUST differ from a second factory
-        differentFactory = createFactory().createBlankNode();
-
-        // NOTE: We can't make similar assumption if we provide a
-        // name to createBlankNode(String) as its documentation
-        // only says:
-        //
-        // * BlankNodes created using this method with the same parameter, for
-        // * different instances of RDFFactory, SHOULD NOT be equivalent.
-        //
-        // https://github.com/apache/incubator-commonsrdf/pull/7#issuecomment-92312779
-        assertNotEquals(bnode1, differentFactory);
-        assertNotEquals(bnode1.uniqueReference(), differentFactory.uniqueReference());
-        // but we can't require:
-        // assertNotEquals(bnode1.ntriplesString(),
-        // differentFactory.ntriplesString());
-    }
-
-    @Test
-    public void testCreateGraph() {
-        final Graph graph = factory.createGraph();
-
-        assertEquals("Graph was not empty", 0, graph.size());
-        graph.add(factory.createBlankNode(), factory.createIRI("http://example.com/"), factory.createBlankNode());
-
-        final Graph graph2 = factory.createGraph();
-        assertNotSame(graph, graph2);
-        assertEquals("Graph was empty after adding", 1, graph.size());
-        assertEquals("New graph was not empty", 0, graph2.size());
-    }
-
-    @Test
-    public void testCreateIRI() throws Exception {
-        final IRI example = factory.createIRI("http://example.com/");
-
-        assertEquals("http://example.com/", example.getIRIString());
-        assertEquals("<http://example.com/>", example.ntriplesString());
-
-        final IRI term = factory.createIRI("http://example.com/vocab#term");
-        assertEquals("http://example.com/vocab#term", term.getIRIString());
-        assertEquals("<http://example.com/vocab#term>", term.ntriplesString());
-
-        // and now for the international fun!
-        // make sure this file is edited/compiled as UTF-8
-        final IRI latin1 = factory.createIRI("http://accént.example.com/première");
-        assertEquals("http://accént.example.com/première", latin1.getIRIString());
-        assertEquals("<http://accént.example.com/première>", latin1.ntriplesString());
-
-        final IRI cyrillic = factory.createIRI("http://example.испытание/Кириллица");
-        assertEquals("http://example.испытание/Кириллица", cyrillic.getIRIString());
-        assertEquals("<http://example.испытание/Кириллица>", cyrillic.ntriplesString());
-
-        final IRI deseret = factory.createIRI("http://𐐀.example.com/𐐀");
-        assertEquals("http://𐐀.example.com/𐐀", deseret.getIRIString());
-        assertEquals("<http://𐐀.example.com/𐐀>", deseret.ntriplesString());
-    }
-
-    @Test
-    public void testCreateLiteral() throws Exception {
-        final Literal example = factory.createLiteral("Example");
-        assertEquals("Example", example.getLexicalForm());
-        assertFalse(example.getLanguageTag().isPresent());
-        assertEquals("http://www.w3.org/2001/XMLSchema#string", example.getDatatype().getIRIString());
-        // http://lists.w3.org/Archives/Public/public-rdf-comments/2014Dec/0004.html
-        assertEquals("\"Example\"", example.ntriplesString());
-    }
-
-    @Test
-    public void testCreateLiteralDateTime() throws Exception {
-        final Literal dateTime = factory.createLiteral("2014-12-27T00:50:00T-0600",
-                factory.createIRI("http://www.w3.org/2001/XMLSchema#dateTime"));
-        assertEquals("2014-12-27T00:50:00T-0600", dateTime.getLexicalForm());
-        assertFalse(dateTime.getLanguageTag().isPresent());
-        assertEquals("http://www.w3.org/2001/XMLSchema#dateTime", dateTime.getDatatype().getIRIString());
-        assertEquals("\"2014-12-27T00:50:00T-0600\"^^<http://www.w3.org/2001/XMLSchema#dateTime>",
-                dateTime.ntriplesString());
-    }
-
-    @Test
-    public void testCreateLiteralLang() throws Exception {
-        final Literal example = factory.createLiteral("Example", "en");
-
-        assertEquals("Example", example.getLexicalForm());
-        assertEquals("en", example.getLanguageTag().get());
-        assertEquals("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", example.getDatatype().getIRIString());
-        assertEquals("\"Example\"@en", example.ntriplesString());
-    }
-
-    @Test
-    public void testCreateLiteralLangISO693_3() throws Exception {
-        // see https://issues.apache.org/jira/browse/JENA-827
-        final Literal vls = factory.createLiteral("Herbert Van de Sompel", "vls"); // JENA-827
-
-        assertEquals("vls", vls.getLanguageTag().get());
-        assertEquals("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", vls.getDatatype().getIRIString());
-        assertEquals("\"Herbert Van de Sompel\"@vls", vls.ntriplesString());
-    }
-
-
-    private void assertEqualsBothWays(Object a, Object b) {
-        assertEquals(a, b);
-        assertEquals(b, a);
-        // hashCode must match as well
-        assertEquals(a.hashCode(), b.hashCode());
-    }
-
-    @Test
-    public void testCreateLiteralLangCaseInsensitive() throws Exception {
-        /*
-         * COMMONSRDF-51: Literal langtag may not be in lowercase, but must be
-         * COMPARED (aka .equals and .hashCode()) in lowercase as the language
-         * space is lower case.
-         */
-        final Literal upper = factory.createLiteral("Hello", "EN-GB");
-        final Literal lower = factory.createLiteral("Hello", "en-gb");
-        final Literal mixed = factory.createLiteral("Hello", "en-GB");
-
-        /*
-         * Disabled as some RDF frameworks (namely RDF4J) can be c configured to
-         * do BCP47 normalization (e.g. "en-GB"), so we can't guarantee
-         * lowercase language tags are preserved.
-         */
-        // assertEquals("en-gb", lower.getLanguageTag().get());
-
-        /*
-         * NOTE: the RDF framework is free to lowercase the language tag or
-         * leave it as-is, so we can't assume:
-         */
-        // assertEquals("en-gb", upper.getLanguageTag().get());
-        // assertEquals("en-gb", mixed.getLanguageTag().get());
-
-        /* ..unless we do a case-insensitive comparison: */
-        assertEquals("en-gb",
-                lower.getLanguageTag().get().toLowerCase(Locale.ROOT));
-        assertEquals("en-gb",
-                upper.getLanguageTag().get().toLowerCase(Locale.ROOT));
-        assertEquals("en-gb",
-                mixed.getLanguageTag().get().toLowerCase(Locale.ROOT));
-
-        // However these should all be true using .equals
-        assertEquals(lower, lower);
-        assertEqualsBothWays(lower, upper);
-        assertEqualsBothWays(lower, mixed);
-        assertEquals(upper, upper);
-        assertEqualsBothWays(upper, mixed);
-        assertEquals(mixed, mixed);
-        // Note that assertEqualsBothWays also checks
-        // that .hashCode() matches
-    }
-
-    @Test
-    public void testCreateLiteralLangCaseInsensitiveOther() throws Exception {
-        // COMMONSRDF-51: Ensure the Literal is using case insensitive
-        // comparison against any literal implementation
-        // which may not have done .toLowerString() in their constructor
-        final Literal upper = factory.createLiteral("Hello", "EN-GB");
-        final Literal lower = factory.createLiteral("Hello", "en-gb");
-        final Literal mixed = factory.createLiteral("Hello", "en-GB");
-
-        Literal otherLiteral = new Literal() {
-            @Override
-            public String ntriplesString() {
-                return "Hello@eN-Gb";
-            }
-            @Override
-            public String getLexicalForm() {
-                return "Hello";
-            }
-            @Override
-            public Optional<String> getLanguageTag() {
-                return Optional.of("eN-Gb");
-            }
-            @Override
-            public IRI getDatatype() {
-                return factory.createIRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");
-            }
-            @Override
-            public boolean equals(Object obj) {
-                throw new RuntimeException("Wrong way comparison of literal");
-            }
-        };
-
-        // NOTE: Our fake Literal can't do .equals() or .hashCode(),
-        // so don't check the wrong way around!
-        assertEquals(mixed, otherLiteral);
-        assertEquals(lower, otherLiteral);
-        assertEquals(upper, otherLiteral);
-    }
-
-    @Test
-    public void testCreateLiteralLangCaseInsensitiveInTurkish() throws Exception {
-        // COMMONSRDF-51: Special test for Turkish issue where
-        // "i".toLowerCase() != "i"
-        // See also:
-        // https://garygregory.wordpress.com/2015/11/03/java-lowercase-conversion-turkey/
-        Locale defaultLocale = Locale.getDefault();
-        try {
-            Locale.setDefault(Locale.ROOT);
-            final Literal mixedROOT = factory.createLiteral("moi", "fI");
-            final Literal lowerROOT = factory.createLiteral("moi", "fi");
-            final Literal upperROOT = factory.createLiteral("moi", "FI");
-
-            Locale turkish = Locale.forLanguageTag("TR");
-            Locale.setDefault(turkish);
-            // If the below assertion fails, then the Turkish
-            // locale no longer have this peculiarity that
-            // we want to test.
-            Assume.assumeFalse("FI".toLowerCase().equals("fi"));
-
-            final Literal mixed = factory.createLiteral("moi", "fI");
-            final Literal lower = factory.createLiteral("moi", "fi");
-            final Literal upper = factory.createLiteral("moi", "FI");
-
-            assertEquals(lower, lower);
-            assertEqualsBothWays(lower, upper);
-            assertEqualsBothWays(lower, mixed);
-
-            assertEquals(upper, upper);
-            assertEqualsBothWays(upper, mixed);
-
-            assertEquals(mixed, mixed);
-
-            // And our instance created previously in ROOT locale
-            // should still be equal to the instance created in TR locale
-            // (e.g. test constructor is not doing a naive .toLowerCase())
-            assertEqualsBothWays(lower, lowerROOT);
-            assertEqualsBothWays(upper, lowerROOT);
-            assertEqualsBothWays(mixed, lowerROOT);
-
-            assertEqualsBothWays(lower, upperROOT);
-            assertEqualsBothWays(upper, upperROOT);
-            assertEqualsBothWays(mixed, upperROOT);
-
-            assertEqualsBothWays(lower, mixedROOT);
-            assertEqualsBothWays(upper, mixedROOT);
-            assertEqualsBothWays(mixed, mixedROOT);
-        } finally {
-            Locale.setDefault(defaultLocale);
-        }
-    }
-
-    @Test
-    public void testCreateLiteralString() throws Exception {
-        final Literal example = factory.createLiteral("Example",
-                factory.createIRI("http://www.w3.org/2001/XMLSchema#string"));
-        assertEquals("Example", example.getLexicalForm());
-        assertFalse(example.getLanguageTag().isPresent());
-        assertEquals("http://www.w3.org/2001/XMLSchema#string", example.getDatatype().getIRIString());
-        // http://lists.w3.org/Archives/Public/public-rdf-comments/2014Dec/0004.html
-        assertEquals("\"Example\"", example.ntriplesString());
-    }
-
-    @Test
-    public void testCreateTripleBnodeBnode() {
-        final BlankNode subject = factory.createBlankNode("b1");
-        final IRI predicate = factory.createIRI("http://example.com/pred");
-        final BlankNode object = factory.createBlankNode("b2");
-        final Triple triple = factory.createTriple(subject, predicate, object);
-
-        // bnode equivalence should be OK as we used the same
-        // factory and have not yet inserted Triple into a Graph
-        assertEquals(subject, triple.getSubject());
-        assertEquals(predicate, triple.getPredicate());
-        assertEquals(object, triple.getObject());
-    }
-
-    @Test
-    public void testCreateTripleBnodeIRI() {
-        final BlankNode subject = factory.createBlankNode("b1");
-        final IRI predicate = factory.createIRI("http://example.com/pred");
-        final IRI object = factory.createIRI("http://example.com/obj");
-        final Triple triple = factory.createTriple(subject, predicate, object);
-
-        // bnode equivalence should be OK as we used the same
-        // factory and have not yet inserted Triple into a Graph
-        assertEquals(subject, triple.getSubject());
-        assertEquals(predicate, triple.getPredicate());
-        assertEquals(object, triple.getObject());
-    }
-
-    @Test
-    public void testCreateTripleBnodeTriple() {
-        final BlankNode subject = factory.createBlankNode();
-        final IRI predicate = factory.createIRI("http://example.com/pred");
-        final Literal object = factory.createLiteral("Example", "en");
-        final Triple triple = factory.createTriple(subject, predicate, object);
-
-        // bnode equivalence should be OK as we used the same
-        // factory and have not yet inserted Triple into a Graph
-        assertEquals(subject, triple.getSubject());
-        assertEquals(predicate, triple.getPredicate());
-        assertEquals(object, triple.getObject());
-    }
-
-    @Test
-    public void testPossiblyInvalidBlankNode() throws Exception {
-        BlankNode withColon;
-        try {
-            withColon = factory.createBlankNode("with:colon");
-        } catch (final IllegalArgumentException ex) {
-            // Good!
-            return;
-        }
-        // Factory allows :colon, which is OK as long as it's not causing an
-        // invalid ntriplesString
-        assertFalse(withColon.ntriplesString().contains("with:colon"));
-
-        // and creating it twice gets the same ntriplesString
-        assertEquals(withColon.ntriplesString(), factory.createBlankNode("with:colon").ntriplesString());
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidIRI() throws Exception {
-        factory.createIRI("<no_brackets>");
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidLiteralLang() throws Exception {
-        factory.createLiteral("Example", "with space");
-    }
-
-    @Test(expected = Exception.class)
-    public void testInvalidTriplePredicate() {
-        final BlankNode subject = factory.createBlankNode("b1");
-        final BlankNode predicate = factory.createBlankNode("b2");
-        final BlankNode object = factory.createBlankNode("b3");
-        factory.createTriple(subject, (IRI) predicate, object);
-    }
-
-    @Test
-    public void hashCodeBlankNode() throws Exception {
-        final BlankNode bnode1 = factory.createBlankNode();
-        assertEquals(bnode1.uniqueReference().hashCode(), bnode1.hashCode());
-    }
-
-    @Test
-    public void hashCodeIRI() throws Exception {
-        final IRI iri = factory.createIRI("http://example.com/");
-        assertEquals(iri.getIRIString().hashCode(), iri.hashCode());
-    }
-
-    @Test
-    public void hashCodeLiteral() throws Exception {
-        final Literal literal = factory.createLiteral("Hello");
-        assertEquals(Objects.hash(literal.getLexicalForm(), literal.getDatatype(), literal.getLanguageTag()),
-                literal.hashCode());
-    }
-
-    @Test
-    public void hashCodeTriple() throws Exception {
-        final IRI iri = factory.createIRI("http://example.com/");
-        final Triple triple = factory.createTriple(iri, iri, iri);
-        assertEquals(Objects.hash(iri, iri, iri), triple.hashCode());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java b/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java
deleted file mode 100644
index 024c2cf..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java
+++ /dev/null
@@ -1,58 +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.api;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class DefaultDatasetTest {
-    
-    DummyDataset dataset = new DummyDataset();
-    
-    @Test
-    public void close() throws Exception {
-        dataset.close(); // no-op
-    }
-    
-    @Test
-    public void defaultIterate() throws Exception {
-        assertFalse(dataset.streamCalled);
-        assertFalse(dataset.filteredStreamCalled);
-        for (final Quad t : dataset.iterate()) {
-            assertEquals(t, new DummyQuad());
-        }
-        assertTrue(dataset.streamCalled);
-        assertFalse(dataset.filteredStreamCalled);
-    }
-    
-    @Test
-    public void defaultFilteredIterate() throws Exception {
-        assertFalse(dataset.streamCalled);
-        assertFalse(dataset.filteredStreamCalled);
-        for (final Quad t : dataset.iterate(null, null, new DummyIRI(2), null)) {
-            assertEquals(t, new DummyQuad());
-        }
-        assertTrue(dataset.filteredStreamCalled);
-        assertFalse(dataset.streamCalled);
-    }
-    
-}
-

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java b/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java
deleted file mode 100644
index 8d6f337..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java
+++ /dev/null
@@ -1,78 +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.api;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-
-public class DefaultGraphTest {
-    
-    DummyGraph graph = new DummyGraph();
-    
-    @Test
-    public void close() throws Exception {
-        graph.close(); // no-op
-    }
-    
-    @SuppressWarnings("deprecation")
-    @Test
-    public void defaultGetTriples() throws Exception {
-        assertFalse(graph.streamCalled);
-        assertFalse(graph.filteredStreamCalled);
-        assertEquals(1L, graph.getTriples().count());        
-        assertTrue(graph.streamCalled);
-        assertFalse(graph.filteredStreamCalled);        
-    }
-
-    @SuppressWarnings("deprecation")
-    @Test
-    public void defaultGetTriplesFiltered() throws Exception {
-        assertFalse(graph.streamCalled);
-        assertFalse(graph.filteredStreamCalled);
-        assertEquals(1L, graph.getTriples(null,null,null).count());
-        assertFalse(graph.streamCalled);
-        assertTrue(graph.filteredStreamCalled);
-        // Ensure arguments are passed on to graph.stream(s,p,o);
-        assertEquals(0L, graph.getTriples(new DummyIRI(0),null,null).count());
-    }
-    
-    @Test
-    public void defaultIterate() throws Exception {
-        assertFalse(graph.streamCalled);
-        assertFalse(graph.filteredStreamCalled);
-        for (final Triple t : graph.iterate()) {
-            assertEquals(t, new DummyTriple());
-        }
-        assertTrue(graph.streamCalled);
-        assertFalse(graph.filteredStreamCalled);
-    }
-    
-    @Test
-    public void defaultFilteredIterate() throws Exception {
-        assertFalse(graph.streamCalled);
-        assertFalse(graph.filteredStreamCalled);
-        for (final Triple t : graph.iterate(null, new DummyIRI(2), null)) {
-            assertEquals(t, new DummyTriple());
-        }
-        assertTrue(graph.filteredStreamCalled);
-        assertFalse(graph.streamCalled);
-    }
-    
-}
-

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java b/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java
deleted file mode 100644
index 00d66b5..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java
+++ /dev/null
@@ -1,47 +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.api;
-
-import static org.junit.Assert.*;
-
-import java.util.Objects;
-
-import org.junit.Test;
-
-public class DefaultQuadTest {
-    @Test
-    public void asQuad() throws Exception {
-        final Quad q = new DummyQuad();
-        final Triple t = q.asTriple();
-        assertEquals(t, t);
-        assertNotEquals(t,  q);
-        assertEquals(t, new DummyTriple());
-        assertEquals(t, new DummyQuad().asTriple());
-        
-        // FIXME: This would not catch if asTriple() accidentally mixed up s/p/o
-        // as they are here all the same
-        assertEquals(new DummyIRI(1), t.getSubject());
-        assertEquals(new DummyIRI(2), t.getPredicate());
-        assertEquals(new DummyIRI(3), t.getObject());
-        
-        
-        
-        assertEquals(Objects.hash(q.getSubject(), q.getPredicate(), q.getObject()), t.hashCode());
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DefaultRDFTermFactoryTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DefaultRDFTermFactoryTest.java b/api/src/test/java/org/apache/commons/rdf/api/DefaultRDFTermFactoryTest.java
deleted file mode 100644
index 7a48464..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DefaultRDFTermFactoryTest.java
+++ /dev/null
@@ -1,63 +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.api;
-
-import org.junit.Test;
-
-/**
- * Test that all {@link RDFTermFactory} default methods throw
- * {@link UnsupportedOperationException}.
- */
-@SuppressWarnings("deprecation")
-public class DefaultRDFTermFactoryTest {
-    // All methods in RDFTermFactory has a default implementation
-    RDFTermFactory factory = new RDFTermFactory() {};
-    
-    @Test(expected=UnsupportedOperationException.class)
-    public void createBlankNode() throws Exception {
-        factory.createBlankNode();
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void createBlankNodeName() throws Exception {
-        factory.createBlankNode("fred");
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void createGraph() throws Exception {
-        factory.createGraph();
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void createIRI() throws Exception {
-        factory.createIRI("http://example.com/");
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void createLiteral() throws Exception {
-        factory.createLiteral("Alice");
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void createLiteralLang() throws Exception {
-        factory.createLiteral("Alice", "en");
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void createLiteralTyped() throws Exception {
-        factory.createLiteral("Alice", new DummyIRI(0));
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void createTriple() throws Exception {
-        factory.createTriple(new DummyIRI(1), new DummyIRI(2), new DummyIRI(3));
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyDataset.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyDataset.java b/api/src/test/java/org/apache/commons/rdf/api/DummyDataset.java
deleted file mode 100644
index c3c103a..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyDataset.java
+++ /dev/null
@@ -1,110 +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.api;
-
-import java.util.Arrays;
-import java.util.Optional;
-import java.util.stream.Stream;
-
-class DummyDataset implements Dataset {
-    
-    boolean streamCalled = false;
-    boolean filteredStreamCalled;
-    
-    @Override
-    public void add(final Quad Quad) {
-        if (! contains(Quad)) {
-            throw new IllegalStateException("DummyDataset can't be modified");
-        }
-    }
-    
-    @Override
-    public void add(final BlankNodeOrIRI graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        if (! contains(Optional.ofNullable(graphName), subject, predicate, object)) { 
-            throw new IllegalStateException("DummyDataset can't be modified");
-        }
-    }
-    
-    @Override
-    public boolean contains(final Quad Quad) {
-        return Quad.equals(new DummyQuad());
-    }
-    
-    @Override
-    public boolean contains(final Optional<BlankNodeOrIRI> graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {        
-        return (graphName == null || ! graphName.isPresent()) &&
-                (subject == null || subject.equals(new DummyIRI(1))) && 
-                (predicate == null || predicate.equals(new DummyIRI(2))) && 
-                (object == null || object.equals(new DummyIRI(3)));
-    }
-    @Override
-    public void remove(final Quad Quad) {
-        if (contains(Quad)) {
-            throw new IllegalStateException("DummyDataset can't be modified");
-        }
-    }
-    @Override
-    public void remove(final Optional<BlankNodeOrIRI> graphName, final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        if (contains(graphName, subject, predicate, object)) {
-            throw new IllegalStateException("DummyDataset can't be modified");
-        }
-    }
-    @Override
-    public void clear() {
-        throw new IllegalStateException("DummyDataset can't be modified");
-    }
-    @Override
-    public long size() {
-        return 1;
-    }
-    @Override
-    public Stream<? extends Quad> stream() {
-        streamCalled = true;
-        return Arrays.asList(new DummyQuad()).stream();
-    }
-
-    @Override
-    public Stream<? extends Quad> stream(final Optional<BlankNodeOrIRI> graphName, final BlankNodeOrIRI subject, final IRI predicate,
-            final RDFTerm object) {
-        filteredStreamCalled = true;
-        if (contains(graphName, subject, predicate, object)) { 
-            return Stream.of(new DummyQuad());
-        } else {
-            return Stream.empty();
-        }
-    }
-
-    @Override
-    public Graph getGraph() {
-        return new DummyGraph();
-    }
-
-    @Override
-    public Optional<Graph> getGraph(final BlankNodeOrIRI graphName) {
-        if (graphName == null) { 
-            return Optional.of(getGraph());
-        } else {
-            return Optional.empty();
-        }
-    }
-
-    @Override
-    public Stream<BlankNodeOrIRI> getGraphNames() {
-        return Stream.empty();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyDatasetTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyDatasetTest.java b/api/src/test/java/org/apache/commons/rdf/api/DummyDatasetTest.java
deleted file mode 100644
index cf0c6e2..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyDatasetTest.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.api;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-
-public class DummyDatasetTest {
-    Dataset dataset = new DummyDataset();
-
-    @Test
-    public void add() throws Exception {
-        dataset.add(new DummyQuad());
-    }
-
-    @Test
-    public void addSPO() throws Exception {
-        dataset.add(null, new DummyIRI(1), new DummyIRI(2), new DummyIRI(3));
-    }
-
-    @Test
-    public void contains() throws Exception {
-        assertTrue(dataset.contains(new DummyQuad()));
-    }
-
-    @Test
-    public void containsSPO() throws Exception {
-        assertTrue(dataset.contains(null, null, null, null));
-        assertTrue(dataset.contains(null, new DummyIRI(1), new DummyIRI(2), new DummyIRI(3)));
-        assertFalse(dataset.contains(null, new DummyIRI(0), new DummyIRI(0), new DummyIRI(0)));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void clearNotSupported() throws Exception {
-        dataset.clear();
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void remove() throws Exception {
-        dataset.remove(new DummyQuad());
-    }
-
-    @Test
-    public void removeSPO() throws Exception {
-        dataset.remove(null, new DummyIRI(0), new DummyIRI(0), new DummyIRI(0));
-    }
-
-    @Test
-    public void size() throws Exception {
-        assertEquals(1, dataset.size());
-    }
-
-    @Test
-    public void stream() throws Exception {
-        assertEquals(new DummyQuad(), dataset.stream().findAny().get());
-    }
-
-    @Test
-    public void streamFiltered() throws Exception {
-        assertEquals(new DummyQuad(), dataset.stream(null, null, null, null).findAny().get());
-        assertEquals(new DummyQuad(),
-                dataset.stream(null, new DummyIRI(1), new DummyIRI(2), new DummyIRI(3)).findAny().get());
-        assertFalse(dataset.stream(null, new DummyIRI(0), new DummyIRI(0), new DummyIRI(0)).findAny().isPresent());
-    }
-
-    @Test
-    public void getGraph() throws Exception {
-        assertTrue(dataset.getGraph() instanceof DummyGraph);
-    }
-    
-    @Test
-    public void getGraphNull() throws Exception {
-        assertTrue(dataset.getGraph(null).get() instanceof DummyGraph);
-    }
-
-    @Test
-    public void getGraphNamed() throws Exception {
-        assertFalse(dataset.getGraph(new DummyIRI(0)).isPresent());
-    }
-    
-    @Test
-    public void getGraphNames() throws Exception {
-        assertFalse(dataset.getGraphNames().findAny().isPresent());
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyGraph.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyGraph.java b/api/src/test/java/org/apache/commons/rdf/api/DummyGraph.java
deleted file mode 100644
index 1dc0e31..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyGraph.java
+++ /dev/null
@@ -1,85 +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.api;
-
-import java.util.Arrays;
-import java.util.stream.Stream;
-
-class DummyGraph implements Graph {
-    
-    boolean streamCalled = false;
-    boolean filteredStreamCalled;
-    
-    @Override
-    public void add(final Triple triple) {
-        if (! contains(triple)) {
-            throw new IllegalStateException("DummyGraph can't be modified");
-        }
-    }
-    @Override
-    public void add(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        if (! contains(subject, predicate, object)) { 
-            throw new IllegalStateException("DummyGraph can't be modified");
-        }
-    }
-    @Override
-    public boolean contains(final Triple triple) {
-        return triple.equals(new DummyTriple());
-    }
-    @Override
-    public boolean contains(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        return (subject == null || subject.equals(new DummyIRI(1))) && 
-                (predicate == null || predicate.equals(new DummyIRI(2))) && 
-                (object == null || object.equals(new DummyIRI(3)));
-    }
-    @Override
-    public void remove(final Triple triple) {
-        if (contains(triple)) {
-            throw new IllegalStateException("DummyGraph can't be modified");
-        }
-    }
-    @Override
-    public void remove(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        if (contains(subject, predicate, object)) {
-            throw new IllegalStateException("DummyGraph can't be modified");
-        }
-    }
-    @Override
-    public void clear() {
-        throw new IllegalStateException("DummyGraph can't be modified");
-    }
-    @Override
-    public long size() {
-        return 1;
-    }
-    @Override
-    public Stream<? extends Triple> stream() {
-        streamCalled = true;
-        return Arrays.asList(new DummyTriple()).stream();
-    }
-
-    @Override
-    public Stream<? extends Triple> stream(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
-        filteredStreamCalled = true;
-        if (contains(subject, predicate, object)) { 
-            return Stream.of(new DummyTriple());
-        } else {
-            return Stream.empty();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyGraphTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyGraphTest.java b/api/src/test/java/org/apache/commons/rdf/api/DummyGraphTest.java
deleted file mode 100644
index a5dffed..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyGraphTest.java
+++ /dev/null
@@ -1,84 +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.api;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-
-public class DummyGraphTest {
-    Graph graph = new DummyGraph();
-
-    @Test
-    public void add() throws Exception {
-        graph.add(new DummyTriple());
-    }
-
-    @Test
-    public void addSPO() throws Exception {
-        graph.add(new DummyIRI(1), new DummyIRI(2), new DummyIRI(3));
-    }
-
-    @Test
-    public void contains() throws Exception {
-        assertTrue(graph.contains(new DummyTriple()));
-    }
-
-    @Test
-    public void containsSPO() throws Exception {
-        assertTrue(graph.contains(null, null, null));
-        assertTrue(graph.contains(new DummyIRI(1), new DummyIRI(2), new DummyIRI(3)));
-        assertFalse(graph.contains(new DummyIRI(0), new DummyIRI(0), new DummyIRI(0)));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void clearNotSupported() throws Exception {
-        graph.clear();
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void remove() throws Exception {
-        graph.remove(new DummyTriple());
-    }
-
-    @Test
-    public void removeSPO() throws Exception {
-        graph.remove(new DummyIRI(0), new DummyIRI(0), new DummyIRI(0));
-    }
-
-    @Test
-    public void size() throws Exception {
-        assertEquals(1, graph.size());
-    }
-
-    @Test
-    public void stream() throws Exception {
-        assertEquals(new DummyTriple(), graph.stream().findAny().get());
-    }
-
-    @Test
-    public void streamFiltered() throws Exception {
-        assertEquals(new DummyTriple(), graph.stream(null, null, null).findAny().get());
-        assertEquals(new DummyTriple(),
-                graph.stream(new DummyIRI(1), new DummyIRI(2), new DummyIRI(3)).findAny().get());
-        assertFalse(graph.stream(new DummyIRI(0), new DummyIRI(0), new DummyIRI(0)).findAny().isPresent());
-    }
-    
-    
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyIRI.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyIRI.java b/api/src/test/java/org/apache/commons/rdf/api/DummyIRI.java
deleted file mode 100644
index 6d05981..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyIRI.java
+++ /dev/null
@@ -1,47 +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.api;
-
-class DummyIRI implements IRI {
-    static final String EXAMPLE_COM = "http://example.com/";
-    final int i;
-
-    public DummyIRI(final int i) {
-        this.i = i;
-    }
-
-    @Override
-    public String ntriplesString() {
-        return "<" + EXAMPLE_COM + i + ">";
-    }
-
-    @Override
-    public String getIRIString() {
-        return EXAMPLE_COM + i;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        return (obj instanceof IRI) && ((IRI) obj).getIRIString().equals(EXAMPLE_COM + i);
-    }
-
-    @Override
-    public int hashCode() {
-        return getIRIString().hashCode();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyIRITest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyIRITest.java b/api/src/test/java/org/apache/commons/rdf/api/DummyIRITest.java
deleted file mode 100644
index c40e0d7..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyIRITest.java
+++ /dev/null
@@ -1,56 +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.api;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-
-public class DummyIRITest {
-    DummyIRI iri = new DummyIRI(1337);
-
-    @Test
-    public void i() throws Exception {
-        assertEquals(1337, iri.i);
-    }
-
-    @Test
-    public void equals() throws Exception {
-        assertEquals(iri, new DummyIRI(1337));
-    }
-
-    @Test
-    public void notEquals() throws Exception {
-        assertNotEquals(iri, new DummyIRI(1));
-    }
-
-    @Test
-    public void ntriplesString() throws Exception {
-        assertEquals("<http://example.com/1337>", iri.ntriplesString());
-    }
-
-    @Test
-    public void getIRIString() throws Exception {
-        assertEquals("http://example.com/1337", iri.getIRIString());
-    }
-
-    @Test
-    public void testHashCode() throws Exception {
-        assertEquals("http://example.com/1337".hashCode(), iri.hashCode());
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyQuad.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyQuad.java b/api/src/test/java/org/apache/commons/rdf/api/DummyQuad.java
deleted file mode 100644
index 7c24c74..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyQuad.java
+++ /dev/null
@@ -1,63 +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.api;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
-
-class DummyQuad implements Quad {
-    @Override
-    public Optional<BlankNodeOrIRI> getGraphName() {
-        return Optional.empty();
-    }
-    @Override
-    public BlankNodeOrIRI getSubject() {
-        return new DummyIRI(1);
-    }
-    @Override
-    public IRI getPredicate() {
-        return new DummyIRI(2);
-    }
-    @Override
-    public RDFTerm getObject() {
-        return new DummyIRI(3);
-    }
-
-    private static List<RDFTerm> quadList(final Quad q) {
-         return Arrays.asList(
-             q.getGraphName().orElse(null),
-             q.getSubject(),
-             q.getPredicate(),
-             q.getObject());
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (!(obj instanceof Quad)) {
-            return false;
-        }
-        return quadList(this).equals(quadList((Quad) obj));
-    }
-    
-    @Override
-    public int hashCode() {           
-        return Objects.hash(getSubject(), getPredicate(), getObject(), getGraphName());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java b/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java
deleted file mode 100644
index 560e3fb..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java
+++ /dev/null
@@ -1,58 +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.api;
-
-import static org.junit.Assert.*;
-
-import java.util.Objects;
-
-import org.junit.Test;
-
-public class DummyQuadTest {
-    Quad quad = new DummyQuad();
-
-    @Test
-    public void getGraphName() throws Exception {
-        assertFalse(quad.getGraphName().isPresent());
-    }
-
-    @Test
-    public void getSubject() throws Exception {
-        assertEquals(1, ((DummyIRI) quad.getSubject()).i);
-    }
-    @Test
-    public void getPredicate() throws Exception {
-        assertEquals(2, ((DummyIRI) quad.getPredicate()).i);
-    }
-    @Test
-    public void getObject() throws Exception {
-        assertEquals(3, ((DummyIRI) quad.getObject()).i);
-    }
-    
-    @Test
-    public void equals() throws Exception {
-        assertEquals(quad, new DummyQuad());
-    }
-    
-    @Test
-    public void testHashCode() {
-        final int expected = Objects.hash(quad.getSubject(), quad.getPredicate(), quad.getObject(), quad.getGraphName()); 
-        assertEquals(expected, quad.hashCode());
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyTriple.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyTriple.java b/api/src/test/java/org/apache/commons/rdf/api/DummyTriple.java
deleted file mode 100644
index 38eaf6e..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyTriple.java
+++ /dev/null
@@ -1,57 +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.api;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-
-class DummyTriple implements Triple {
-    @Override
-    public BlankNodeOrIRI getSubject() {
-        return new DummyIRI(1);
-    }
-    @Override
-    public IRI getPredicate() {
-        return new DummyIRI(2);
-    }
-    @Override
-    public RDFTerm getObject() {
-        return new DummyIRI(3);
-    }
-
-    private static List<RDFTerm> tripleList(final Triple q) {
-         return Arrays.asList(             
-             q.getSubject(),
-             q.getPredicate(),
-             q.getObject());
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (!(obj instanceof Triple)) {
-            return false;
-        }
-        return tripleList(this).equals(tripleList((Triple) obj));
-    }
-    
-    @Override
-    public int hashCode() {           
-        return Objects.hash(getSubject(), getPredicate(), getObject());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.java b/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.java
deleted file mode 100644
index 449de6e..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.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.api;
-
-import static org.junit.Assert.*;
-
-import java.util.Objects;
-
-import org.junit.Test;
-
-public class DummyTripleTest {
-    Triple triple = new DummyTriple();
-
-    @Test
-    public void getSubject() throws Exception {
-        assertEquals(1, ((DummyIRI) triple.getSubject()).i);
-    }
-    @Test
-    public void getPredicate() throws Exception {
-        assertEquals(2, ((DummyIRI) triple.getPredicate()).i);
-    }
-    @Test
-    public void getObject() throws Exception {
-        assertEquals(3, ((DummyIRI) triple.getObject()).i);
-    }
-    
-    @Test
-    public void equals() throws Exception {
-        assertEquals(triple, new DummyTriple());
-    }
-    
-    @Test
-    public void testHashCode() {
-        final int expected = Objects.hash(triple.getSubject(), triple.getPredicate(), triple.getObject()); 
-        assertEquals(expected, triple.hashCode());
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/java/org/apache/commons/rdf/api/RDFSyntaxTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/RDFSyntaxTest.java b/api/src/test/java/org/apache/commons/rdf/api/RDFSyntaxTest.java
deleted file mode 100644
index 5494147..0000000
--- a/api/src/test/java/org/apache/commons/rdf/api/RDFSyntaxTest.java
+++ /dev/null
@@ -1,146 +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.api;
-
-import static org.junit.Assert.*;
-
-import java.util.Optional;
-
-import org.junit.Test;
-
-public class RDFSyntaxTest {
-
-    @Test
-    public void byFileExtension() throws Exception {
-        assertEquals(RDFSyntax.JSONLD, RDFSyntax.byFileExtension(".jsonld").get());
-        assertEquals(RDFSyntax.NQUADS, RDFSyntax.byFileExtension(".nq").get());
-        assertEquals(RDFSyntax.NTRIPLES, RDFSyntax.byFileExtension(".nt").get());
-        assertEquals(RDFSyntax.RDFA, RDFSyntax.byFileExtension(".html").get());
-        assertEquals(RDFSyntax.RDFXML, RDFSyntax.byFileExtension(".rdf").get());
-        assertEquals(RDFSyntax.TRIG, RDFSyntax.byFileExtension(".trig").get());
-        assertEquals(RDFSyntax.TURTLE, RDFSyntax.byFileExtension(".ttl").get());
-    }
-
-    @Test
-    public void byFileExtensionFailsWithoutDot() throws Exception {
-        assertEquals(Optional.empty(), RDFSyntax.byFileExtension("rdf"));
-    }
-
-    @Test
-    public void byFileExtensionLowerCase() throws Exception {
-        assertEquals(RDFSyntax.TURTLE, RDFSyntax.byFileExtension(".TtL").get());
-    }
-
-    @Test
-    public void byFileExtensionUnknown() throws Exception {
-        assertEquals(Optional.empty(), RDFSyntax.byFileExtension(".tar"));
-    }
-
-    @Test
-    public void byMediaType() throws Exception {
-        assertEquals(RDFSyntax.JSONLD, RDFSyntax.byMediaType("application/ld+json").get());
-        assertEquals(RDFSyntax.NQUADS, RDFSyntax.byMediaType("application/n-quads").get());
-        assertEquals(RDFSyntax.NTRIPLES, RDFSyntax.byMediaType("application/n-triples").get());
-        assertEquals(RDFSyntax.RDFA, RDFSyntax.byMediaType("text/html").get());
-        assertEquals(RDFSyntax.RDFA, RDFSyntax.byMediaType("application/xhtml+xml").get());
-        assertEquals(RDFSyntax.RDFXML, RDFSyntax.byMediaType("application/rdf+xml").get());
-        assertEquals(RDFSyntax.TRIG, RDFSyntax.byMediaType("application/trig").get());
-        assertEquals(RDFSyntax.TURTLE, RDFSyntax.byMediaType("text/turtle").get());
-    }
-
-    @Test
-    public void byMediaTypeContentType() throws Exception {
-        assertEquals(RDFSyntax.TURTLE, RDFSyntax.byMediaType("text/turtle; charset=\"UTF-8\"").get());
-        assertEquals(RDFSyntax.TURTLE, RDFSyntax.byMediaType("text/turtle ; charset=\"UTF-8\"").get());
-        // That's a Content-Type, not media type; we won't split by ","
-        assertEquals(Optional.empty(), RDFSyntax.byMediaType("text/turtle, text/plain"));
-        // no trimming will be done
-        assertEquals(Optional.empty(), RDFSyntax.byMediaType(" text/turtle"));
-    }
-
-    @Test
-    public void byMediaTypeLowerCase() throws Exception {
-        assertEquals(RDFSyntax.JSONLD, RDFSyntax.byMediaType("APPLICATION/ld+JSON").get());
-    }
-
-    @Test
-    public void byMediaTypeUnknown() throws Exception {
-        assertEquals(Optional.empty(), RDFSyntax.byMediaType("application/octet-stream"));
-    }
-
-    @Test
-    public void fileExtension() throws Exception {
-        assertEquals(".jsonld", RDFSyntax.JSONLD.fileExtension());
-        assertEquals(".nq", RDFSyntax.NQUADS.fileExtension());
-        assertEquals(".nt", RDFSyntax.NTRIPLES.fileExtension());
-        assertEquals(".html", RDFSyntax.RDFA.fileExtension());
-        assertEquals(".rdf", RDFSyntax.RDFXML.fileExtension());
-        assertEquals(".trig", RDFSyntax.TRIG.fileExtension());
-        assertEquals(".ttl", RDFSyntax.TURTLE.fileExtension());
-    }
-
-    @Test
-    public void fileExtensions() throws Exception {
-        assertTrue(RDFSyntax.JSONLD.fileExtensions().contains(".jsonld"));
-        assertTrue(RDFSyntax.NQUADS.fileExtensions().contains(".nq"));
-        assertTrue(RDFSyntax.NTRIPLES.fileExtensions().contains(".nt"));
-        assertTrue(RDFSyntax.RDFA.fileExtensions().contains(".html"));
-        assertTrue(RDFSyntax.RDFA.fileExtensions().contains(".xhtml"));
-        assertTrue(RDFSyntax.RDFXML.fileExtensions().contains(".rdf"));
-        assertTrue(RDFSyntax.TRIG.fileExtensions().contains(".trig"));
-        assertTrue(RDFSyntax.TURTLE.fileExtensions().contains(".ttl"));
-    }
-    
-    @Test
-    public void mediaType() throws Exception {
-        assertEquals("application/ld+json", RDFSyntax.JSONLD.mediaType());
-        assertEquals("application/n-quads", RDFSyntax.NQUADS.mediaType());
-        assertEquals("application/n-triples", RDFSyntax.NTRIPLES.mediaType());
-        assertEquals("text/html", RDFSyntax.RDFA.mediaType());
-        assertEquals("application/rdf+xml", RDFSyntax.RDFXML.mediaType());
-        assertEquals("application/trig", RDFSyntax.TRIG.mediaType());
-        assertEquals("text/turtle", RDFSyntax.TURTLE.mediaType());
-    }
-
-
-    @Test
-    public void mediaTypes() throws Exception {
-        assertTrue(RDFSyntax.JSONLD.mediaTypes().contains("application/ld+json"));
-        assertTrue(RDFSyntax.NQUADS.mediaTypes().contains("application/n-quads"));
-        assertTrue(RDFSyntax.NTRIPLES.mediaTypes().contains("application/n-triples"));
-        assertTrue(RDFSyntax.RDFA.mediaTypes().contains("text/html"));
-        assertTrue(RDFSyntax.RDFA.mediaTypes().contains("application/xhtml+xml"));
-        assertTrue(RDFSyntax.RDFXML.mediaTypes().contains("application/rdf+xml"));
-        assertTrue(RDFSyntax.TRIG.mediaTypes().contains("application/trig"));
-        assertTrue(RDFSyntax.TURTLE.mediaTypes().contains("text/turtle"));
-    }
-    
-    @Test
-    public void string() throws Exception {
-        assertEquals("JSON-LD 1.0", RDFSyntax.JSONLD.toString());
-        assertEquals("RDF 1.1 Turtle", RDFSyntax.TURTLE.toString());
-    }
-
-    @Test
-    public void byName() throws Exception {
-        for (RDFSyntax s : RDFSyntax.w3cSyntaxes()) {
-            assertEquals(s, RDFSyntax.byName(s.name()).get());
-        }
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/resources/example-rdf/example.jsonld
----------------------------------------------------------------------
diff --git a/api/src/test/resources/example-rdf/example.jsonld b/api/src/test/resources/example-rdf/example.jsonld
deleted file mode 100644
index d6fb670..0000000
--- a/api/src/test/resources/example-rdf/example.jsonld
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  "@graph" : [ {
-    "@id" : "_:b0",
-    "license" : "http://www.apache.org/licenses/LICENSE-2.0",
-    "rights" : {
-      "@language" : "en",
-      "@value" : "Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"
-    }
-  }, {
-    "@graph" : [ {
-      "@id" : "_:b0",
-      "license" : "http://example.com/LICENSE"
-    } ],
-    "@id" : "http://example.com"
-  } ],
-  "@context" : {
-    "rights" : {
-      "@id" : "http://purl.org/dc/terms/rights"
-    },
-    "license" : {
-      "@id" : "http://purl.org/dc/terms/license",
-      "@type" : "@id"
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/resources/example-rdf/example.nq
----------------------------------------------------------------------
diff --git a/api/src/test/resources/example-rdf/example.nq b/api/src/test/resources/example-rdf/example.nq
deleted file mode 100644
index 9c5e749..0000000
--- a/api/src/test/resources/example-rdf/example.nq
+++ /dev/null
@@ -1,3 +0,0 @@
-_:b1 <http://purl.org/dc/terms/license> <http://www.apache.org/licenses/LICENSE-2.0> .
-_:b1 <http://purl.org/dc/terms/rights> "Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"@en .
-_:b1 <http://purl.org/dc/terms/license> <http://example.com/LICENSE> <http://example.com> .

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/resources/example-rdf/example.nt
----------------------------------------------------------------------
diff --git a/api/src/test/resources/example-rdf/example.nt b/api/src/test/resources/example-rdf/example.nt
deleted file mode 100644
index 53d3f94..0000000
--- a/api/src/test/resources/example-rdf/example.nt
+++ /dev/null
@@ -1,2 +0,0 @@
-_:b1 <http://purl.org/dc/terms/license> <http://www.apache.org/licenses/LICENSE-2.0> .
-_:b1 <http://purl.org/dc/terms/rights> "Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"@en .

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/resources/example-rdf/example.rdf
----------------------------------------------------------------------
diff --git a/api/src/test/resources/example-rdf/example.rdf b/api/src/test/resources/example-rdf/example.rdf
deleted file mode 100644
index 44adfbc..0000000
--- a/api/src/test/resources/example-rdf/example.rdf
+++ /dev/null
@@ -1,23 +0,0 @@
-<rdf:RDF
-    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-    xmlns:j.0="http://purl.org/dc/terms/">
-  <rdf:Description>
-    <j.0:rights xml:lang="en">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.
-</j.0:rights>
-    <j.0:license rdf:resource="http://www.apache.org/licenses/LICENSE-2.0"/>
-  </rdf:Description>
-</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/resources/example-rdf/example.trig
----------------------------------------------------------------------
diff --git a/api/src/test/resources/example-rdf/example.trig b/api/src/test/resources/example-rdf/example.trig
deleted file mode 100644
index 9d433ce..0000000
--- a/api/src/test/resources/example-rdf/example.trig
+++ /dev/null
@@ -1,3 +0,0 @@
-{ _:b0    <http://purl.org/dc/terms/license>  <http://www.apache.org/licenses/LICENSE-2.0> ;
-          <http://purl.org/dc/terms/rights>  "Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"@en .
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/api/src/test/resources/example-rdf/example.ttl
----------------------------------------------------------------------
diff --git a/api/src/test/resources/example-rdf/example.ttl b/api/src/test/resources/example-rdf/example.ttl
deleted file mode 100644
index 48b97af..0000000
--- a/api/src/test/resources/example-rdf/example.ttl
+++ /dev/null
@@ -1,2 +0,0 @@
-_:b0    <http://purl.org/dc/terms/license>  <http://www.apache.org/licenses/LICENSE-2.0> ;
-        <http://purl.org/dc/terms/rights>  "Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"@en .

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/commons-rdf-api/pom.xml
----------------------------------------------------------------------
diff --git a/commons-rdf-api/pom.xml b/commons-rdf-api/pom.xml
new file mode 100644
index 0000000..f6e0eed
--- /dev/null
+++ b/commons-rdf-api/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-rdf-parent</artifactId>
+        <version>0.5.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>commons-rdf-api</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Commons RDF API</name>
+    <description>Commons Java API for RDF 1.1</description>
+
+    <properties>
+      <commons.osgi.symbolicName>org.apache.commons.rdf.api</commons.osgi.symbolicName>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                  <execution>
+                      <id>test-jar</id>
+                      <!-- Also expose abstract test classes -->
+                      <goals>
+                          <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <configuration>
+                <instructions>
+                  <Bundle-SymbolicName>org.apache.commons.rdf.api</Bundle-SymbolicName>
+                  <Automatic-Module-Name>org.apache.commons.rdf.api</Automatic-Module-Name>
+                </instructions>
+              </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <distributionManagement>
+      <site>
+        <id>commonsrdf-api-site</id>
+        <url>scm:svn:${commons.scmPubUrl}/api/</url>
+      </site>
+    </distributionManagement>
+
+</project>

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java
new file mode 100644
index 0000000..73f8afe
--- /dev/null
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java
@@ -0,0 +1,120 @@
+/**
+ * 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.api;
+
+import java.util.UUID;
+
+/**
+ * A <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node" >RDF-1.1
+ * Blank Node</a>, as defined by
+ * <a href= "http://www.w3.org/TR/rdf11-concepts/#section-blank-nodes" >RDF-1.1
+ * Concepts and Abstract Syntax</a>, a W3C Recommendation published on 25
+ * February 2014.<br>
+ *
+ * Note: <blockquote>
+ * <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node">Blank nodes</a>
+ * are disjoint from IRIs and literals. Otherwise, the set of possible blank
+ * nodes is arbitrary. RDF makes no reference to any internal structure of blank
+ * nodes. </blockquote>
+ *
+ * Also note that: <blockquote> <a href=
+ * "http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node-identifier">Blank node
+ * identifiers</a> are local identifiers that are used in some concrete RDF
+ * syntaxes or RDF store implementations. They are always <em>locally
+ * scoped</em> to the file or RDF store, and are <em>not</em> persistent or
+ * portable identifiers for blank nodes. Blank node identifiers are <em>not</em>
+ * part of the RDF abstract syntax, but are entirely dependent on the concrete
+ * syntax or implementation. The syntactic restrictions on blank node
+ * identifiers, if any, therefore also depend on the concrete RDF syntax or
+ * implementation.
+ *
+ * Implementations that handle blank node identifiers in concrete syntaxes need
+ * to be careful not to create the same blank node from multiple occurrences of
+ * the same blank node identifier except in situations where this is supported
+ * by the syntax. </blockquote>
+ *
+ * A BlankNode SHOULD contain a {@link UUID}-derived string as part of its
+ * universally unique {@link #uniqueReference()}.
+ *
+ * @see RDF#createBlankNode()
+ * @see RDF#createBlankNode(String)
+ * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node">RDF-1.1
+ *      Blank Node</a>
+ */
+public interface BlankNode extends BlankNodeOrIRI {
+
+    /**
+     * Return a reference for uniquely identifying the blank node.
+     * <p>
+     * The reference string MUST universally and uniquely identify this blank
+     * node. That is, different blank nodes created separately in different JVMs
+     * or from different {@link RDF} instances MUST NOT have the same reference
+     * string.
+     * <p>
+     * The {@link #uniqueReference()} of two <code>BlankNode</code> instances
+     * MUST be equal if and only if the two blank nodes are equal according to
+     * {@link #equals(Object)}.
+     * <p>
+     * Clients should not assume any particular structure of the reference
+     * string, however it is recommended that the reference string contain a
+     * UUID-derived string, e.g. as returned from {@link UUID#toString()}.
+     * <p>
+     * <strong>IMPORTANT:</strong> This is not a
+     * <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node-identifier">
+     * blank node identifier</a> nor a serialization/syntax label, and there are
+     * no guarantees that it is a valid identifier in any concrete RDF syntax.
+     * For an N-Triples compatible identifier, use {@link #ntriplesString()}.
+     *
+     * @return A universally unique reference to identify this {@link BlankNode}
+     */
+    String uniqueReference();
+
+    /**
+     * Check it this BlankNode is equal to another BlankNode. Two BlankNodes
+     * MUST be equal if, and only if, they have the same
+     * {@link #uniqueReference()}.
+     * <p>
+     * Implementations MUST also override {@link #hashCode()} so that two equal
+     * Literals produce the same hash code.
+     *
+     * @param other
+     *            Another object
+     * @return true if other is a BlankNode instance that represent the same
+     *         blank node
+     * @see Object#equals(Object)
+     */
+    @Override
+    public boolean equals(Object other);
+
+    /**
+     * Calculate a hash code for this BlankNode.
+     * <p>
+     * The returned hash code MUST be equal to the {@link String#hashCode()} of
+     * the {@link #uniqueReference()}.
+     * <p>
+     * This method MUST be implemented in conjunction with
+     * {@link #equals(Object)} so that two equal BlankNodes produce the same
+     * hash code.
+     *
+     * @return a hash code value for this BlankNode.
+     * @see Object#hashCode()
+     */
+    @Override
+    public int hashCode();
+
+}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNodeOrIRI.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNodeOrIRI.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNodeOrIRI.java
new file mode 100644
index 0000000..1c6c469
--- /dev/null
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNodeOrIRI.java
@@ -0,0 +1,28 @@
+/**
+ * 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.api;
+
+/**
+ * This interface represents the {@link RDFTerm}s that may be used in the
+ * subject position of an RDF-1.1 {@link Triple} as well as the graph name
+ * position of a {@link Quad}.
+ * <p>
+ * Instances of BlankNodeOrIRI SHOULD be a {@link BlankNode} or an {@link IRI}.
+ */
+public interface BlankNodeOrIRI extends RDFTerm {
+}