commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [01/22] commons-rdf git commit: Module names, directory names, and artifact names should match.
Date Mon, 30 Oct 2017 14:57:01 GMT
Repository: commons-rdf
Updated Branches:
  refs/heads/master b73edce61 -> d59203ce0


http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/main/java/org/apache/commons/rdf/simple/experimental/package-info.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/experimental/package-info.java b/simple/src/main/java/org/apache/commons/rdf/simple/experimental/package-info.java
deleted file mode 100644
index c5f4a42..0000000
--- a/simple/src/main/java/org/apache/commons/rdf/simple/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 Simple 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.simple} package.
- * <ul>
- * <li>{@link AbstractRDFParser} - an abstract helper class for implementations
- * of {@link org.apache.commons.rdf.experimental.RDFParser}.</li>
- * </ul>
- */
-package org.apache.commons.rdf.simple.experimental;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/main/java/org/apache/commons/rdf/simple/package-info.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/package-info.java b/simple/src/main/java/org/apache/commons/rdf/simple/package-info.java
deleted file mode 100644
index 782c7d5..0000000
--- a/simple/src/main/java/org/apache/commons/rdf/simple/package-info.java
+++ /dev/null
@@ -1,38 +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.
- */
-/**
- * A simple in-memory implementation of the Commons RDF API.
- * <p>
- * This package contains a simple (if not naive) implementation of
- * {@link org.apache.commons.rdf.api} using in-memory POJO objects.
- * <p>
- * Note that although this module fully implements the commons-rdf API, it
- * should <strong>not</strong> be considered a reference implementation. It is
- * <strong>not thread-safe</strong> nor scalable, but may be useful for testing
- * and simple usage (e.g. prototyping).
- * <p>
- * To use this implementation, create an instance of
- * {@link org.apache.commons.rdf.simple.SimpleRDF} and use methods like
- * {@link org.apache.commons.rdf.simple.SimpleRDF#createGraph} and
- * {@link org.apache.commons.rdf.simple.SimpleRDF#createIRI(String)}.
- * <p>
- * The {@link org.apache.commons.rdf.simple.Types} class provide constant
- * {@link org.apache.commons.rdf.api.IRI}s of the common RDF XML datatypes.
- *
- */
-package org.apache.commons.rdf.simple;

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

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/simple/src/main/resources/META-INF/NOTICE b/simple/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 6147016..0000000
--- a/simple/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache Commons RDF
-Copyright 2015-2016 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).

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

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory
----------------------------------------------------------------------
diff --git a/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory b/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory
deleted file mode 100644
index 5a56ae6..0000000
--- a/simple/src/main/resources/META-INF/services/org.apache.commons.rdf.api.RDFTermFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.commons.rdf.simple.SimpleRDFTermFactory

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

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

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/BlankNodeImplTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/BlankNodeImplTest.java b/simple/src/test/java/org/apache/commons/rdf/simple/BlankNodeImplTest.java
deleted file mode 100644
index aa2359a..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/BlankNodeImplTest.java
+++ /dev/null
@@ -1,43 +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.simple;
-
-import java.util.UUID;
-
-import org.apache.commons.rdf.api.AbstractBlankNodeTest;
-import org.apache.commons.rdf.api.BlankNode;
-
-/**
- * Concrete implementation of BlankNodeImpl test.
- */
-public class BlankNodeImplTest extends AbstractBlankNodeTest {
-
-    // Fixed salt just for this test
-    private static UUID SALT = UUID.fromString("35019b59-18b3-4e74-8707-ec55f62a37d6");
-
-    @Override
-    protected BlankNode getBlankNode() {
-        return new BlankNodeImpl();
-    }
-
-    @Override
-    protected BlankNode getBlankNode(final String identifier) {
-        return new BlankNodeImpl(SALT, identifier);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/DummyRDFParserBuilder.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/DummyRDFParserBuilder.java b/simple/src/test/java/org/apache/commons/rdf/simple/DummyRDFParserBuilder.java
deleted file mode 100644
index 02f37f4..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/DummyRDFParserBuilder.java
+++ /dev/null
@@ -1,93 +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.simple;
-
-import java.io.IOException;
-import java.util.UUID;
-import java.util.function.Consumer;
-
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.Quad;
-import org.apache.commons.rdf.api.RDF;
-import org.apache.commons.rdf.experimental.RDFParser;
-import org.apache.commons.rdf.simple.experimental.AbstractRDFParser;
-import org.apache.commons.rdf.simple.experimental.RDFParseException;
-
-/**
- * For test purposes - a {@link RDFParser} that inserts information about what
- * it has been asked to parse instead of actually parsing anything.
- * <p>
- * This always insert at least the triple equivalent to:
- * 
- * <pre>
- *    &lt;urn:uuid:b7ac3fcc-4d86-4d28-8358-a1cd094974a6&gt; &lt;http://example.com/greeting&gt; "Hello world" .
- * </pre>
- * 
- * Additional triples match the corresponding getter in AbstractRDFParser, e.g.:
- * 
- * <pre>
- *   &lt;urn:uuid:b7ac3fcc-4d86-4d28-8358-a1cd094974a6&gt; &lt;http://example.com/base&gt; &lt;http://www.example.org/&gt; .
- *   &lt;urn:uuid:b7ac3fcc-4d86-4d28-8358-a1cd094974a6&gt; &lt;http://example.com/sourceFile&gt; "/tmp/file.ttl" .
- * </pre>
- * 
- *
- */
-public class DummyRDFParserBuilder extends AbstractRDFParser<DummyRDFParserBuilder> {
-
-    @Override
-    protected void parseSynchronusly() throws IOException, IllegalStateException, RDFParseException {
-        // From parseSynchronusly both of these are always present
-        final RDF factory = getRdfTermFactory().get();
-        final Consumer<Quad> t = getTarget();
-
-        // well - each parsing is unique. This should hopefully
-        // catch any accidental double parsing
-        final IRI parsing = factory.createIRI("urn:uuid:" + UUID.randomUUID());
-        t.accept(factory.createQuad(null, parsing, factory.createIRI("http://example.com/greeting"),
-                factory.createLiteral("Hello world")));
-
-        // Now we'll expose the finalized AbstractRDFParser settings
-        // so they can be inspected by the junit test
-
-        if (getSourceIri().isPresent()) {
-            t.accept(factory.createQuad(null, parsing, factory.createIRI("http://example.com/source"),
-                    getSourceIri().get()));
-        }
-        if (getSourceFile().isPresent()) {
-            t.accept(factory.createQuad(null, parsing, factory.createIRI("http://example.com/source"),
-                    factory.createIRI(getSourceFile().get().toUri().toString())));
-        }
-        if (getSourceInputStream().isPresent()) {
-            t.accept(factory.createQuad(null, parsing, factory.createIRI("http://example.com/source"),
-                    factory.createBlankNode()));
-        }
-
-        if (getBase().isPresent()) {
-            t.accept(factory.createQuad(null, parsing, factory.createIRI("http://example.com/base"), getBase().get()));
-        }
-        if (getContentType().isPresent()) {
-            t.accept(factory.createQuad(null, parsing, factory.createIRI("http://example.com/contentType"),
-                    factory.createLiteral(getContentType().get())));
-        }
-        if (getContentTypeSyntax().isPresent()) {
-            t.accept(factory.createQuad(null, parsing, factory.createIRI("http://example.com/contentTypeSyntax"),
-                    factory.createLiteral(getContentTypeSyntax().get().name())));
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/SimpleDatasetTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/SimpleDatasetTest.java b/simple/src/test/java/org/apache/commons/rdf/simple/SimpleDatasetTest.java
deleted file mode 100644
index 630ab07..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/SimpleDatasetTest.java
+++ /dev/null
@@ -1,48 +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.simple;
-
-import static org.junit.Assert.*;
-
-import org.apache.commons.rdf.api.AbstractDatasetTest;
-import org.apache.commons.rdf.api.RDF;
-import org.junit.Assume;
-import org.junit.Test;
-
-/**
- * Test SimpleRDF with AbstractGraphTest
- */
-public class SimpleDatasetTest extends AbstractDatasetTest {
-
-    @Override
-    public RDF createFactory() {
-        return new SimpleRDF();
-    }
-
-    @Test
-    public void datasetToString() {
-        Assume.assumeNotNull(aliceName, companyName);
-        //System.out.println(dataset);
-        assertTrue(
-                dataset.toString().contains("<http://example.com/alice> <http://xmlns.com/foaf/0.1/name> \"Alice\" <http://example.com/graph1> ."));
-        assertTrue(dataset.toString().contains(" <http://xmlns.com/foaf/0.1/name> \"A company\" _:"));
-        assertTrue(dataset.toString().contains("<http://example.com/alice> <http://xmlns.com/foaf/0.1/isPrimaryTopicOf> <http://example.com/graph1> ."));
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/SimpleGraphTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/SimpleGraphTest.java b/simple/src/test/java/org/apache/commons/rdf/simple/SimpleGraphTest.java
deleted file mode 100644
index bbbad55..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/SimpleGraphTest.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.simple;
-
-import static org.junit.Assert.assertTrue;
-
-import org.apache.commons.rdf.api.AbstractGraphTest;
-import org.apache.commons.rdf.api.RDF;
-import org.junit.Assume;
-import org.junit.Test;
-
-/**
- * Test SimpleRDF with AbstractGraphTest
- */
-public class SimpleGraphTest extends AbstractGraphTest {
-
-    @Override
-    public RDF createFactory() {
-        return new SimpleRDF();
-    }
-
-    @Test
-    public void graphToString() {
-        Assume.assumeNotNull(aliceName, companyName);
-        // System.out.println(graph);
-        assertTrue(
-                graph.toString().contains("<http://example.com/alice> <http://xmlns.com/foaf/0.1/name> \"Alice\" ."));
-        assertTrue(graph.toString().contains(" <http://xmlns.com/foaf/0.1/name> \"A company\" ."));
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/SimpleRDFTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/SimpleRDFTest.java b/simple/src/test/java/org/apache/commons/rdf/simple/SimpleRDFTest.java
deleted file mode 100644
index 31915de..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/SimpleRDFTest.java
+++ /dev/null
@@ -1,33 +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.simple;
-
-import org.apache.commons.rdf.api.AbstractRDFTest;
-import org.apache.commons.rdf.api.RDF;
-
-/**
- * Simple RDF Test
- */
-public class SimpleRDFTest extends AbstractRDFTest {
-
-    @Override
-    public RDF createFactory() {
-        return new SimpleRDF();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/SimpleServiceLoaderTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/SimpleServiceLoaderTest.java b/simple/src/test/java/org/apache/commons/rdf/simple/SimpleServiceLoaderTest.java
deleted file mode 100644
index c79746e..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/SimpleServiceLoaderTest.java
+++ /dev/null
@@ -1,40 +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.simple;
-
-import static org.junit.Assert.fail;
-
-import java.util.ServiceLoader;
-
-import org.apache.commons.rdf.api.RDF;
-import org.junit.Test;
-
-public class SimpleServiceLoaderTest {
-
-    @Test
-    public void testServiceLoaderLookup() {
-        final ServiceLoader<RDF> loader = ServiceLoader.load(RDF.class);
-        for (final RDF impl : loader) {
-            if (impl instanceof SimpleRDF) {
-                return; // yay
-            }
-        }
-        fail("SimpleRDF not found in ServiceLoader");
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java b/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
deleted file mode 100644
index 4f28af7..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/TestWritingGraph.java
+++ /dev/null
@@ -1,152 +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.simple;
-
-import static org.junit.Assert.assertEquals;
-
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Stream;
-
-import org.apache.commons.rdf.api.Graph;
-import org.apache.commons.rdf.api.IRI;
-import org.apache.commons.rdf.api.RDF;
-import org.apache.commons.rdf.api.Triple;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Test writing graph
- */
-public class TestWritingGraph {
-
-    /*
-     * 200k triples should do - about 7 MB on disk. Override with
-     * -Dtriples=20000000 to exercise your memory banks.
-     */
-    private static final long TRIPLES = Long.getLong("triples", 200000L);
-
-    /**
-     * Run tests with -Dkeepfiles=true to inspect /tmp files *
-     */
-    private static boolean KEEP_FILES = Boolean.getBoolean("keepfiles");
-
-    private static Graph graph;
-
-    private static RDF factory;
-
-    @BeforeClass
-    public static void createGraph() throws Exception {
-        factory = new SimpleRDF();
-        graph = factory.createGraph();
-        final IRI subject = factory.createIRI("subj");
-        final IRI predicate = factory.createIRI("pred");
-        final List<IRI> types = new ArrayList<>(Types.values());
-        // Ensure we don't try to create a literal with rdf:langString but
-        // without a language tag
-        types.remove(Types.RDF_LANGSTRING);
-        Collections.shuffle(types);
-        for (int i = 0; i < TRIPLES; i++) {
-            if (i % 11 == 0) {
-                graph.add(subject, predicate, factory.createBlankNode("Example " + i));
-            } else if (i % 5 == 0) {
-                graph.add(subject, predicate, factory.createLiteral("Example " + i, "en"));
-            } else if (i % 3 == 0) {
-                graph.add(subject, predicate, factory.createLiteral("Example " + i, types.get(i % types.size())));
-            } else {
-                graph.add(subject, predicate, factory.createLiteral("Example " + i));
-            }
-        }
-    }
-
-    @AfterClass
-    public static void tearDownClass() throws Exception {
-        graph.clear();
-        graph = null;
-    }
-
-    @Test
-    public void createGraphTiming() throws Exception {
-        createGraph();
-    }
-
-    @Test
-    public void countQuery() {
-        final IRI subject = factory.createIRI("subj");
-        final IRI predicate = factory.createIRI("pred");
-        final long count = graph.stream(subject, predicate, null).unordered().parallel().count();
-        // System.out.println("Counted - " + count);
-        assertEquals(count, TRIPLES);
-    }
-
-    public static String tripleAsString(final Triple t) {
-        return t.getSubject().ntriplesString() + " " + t.getPredicate().ntriplesString() + " "
-                + t.getObject().ntriplesString() + " .";
-    }
-
-    @Test
-    public void writeGraphFromStream() throws Exception {
-        final Path graphFile = Files.createTempFile("graph", ".nt");
-        if (KEEP_FILES) {
-            System.out.println("From stream: " + graphFile);
-        } else {
-            graphFile.toFile().deleteOnExit();
-        }
-
-        final Stream<CharSequence> stream = graph.stream().map(TestWritingGraph::tripleAsString);
-        Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
-    }
-
-    @Test
-    public void writeGraphFromStreamFiltered() throws Exception {
-        final Path graphFile = Files.createTempFile("graph", ".nt");
-        if (KEEP_FILES) {
-            System.out.println("Filtered stream: " + graphFile);
-        } else {
-            graphFile.toFile().deleteOnExit();
-        }
-
-        final IRI subject = factory.createIRI("subj");
-        final IRI predicate = factory.createIRI("pred");
-        final Stream<CharSequence> stream = graph.stream(subject, predicate, null).map(TestWritingGraph::tripleAsString);
-        Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
-
-    }
-
-    @Test
-    public void writeGraphFromStreamFilteredNoMatches() throws Exception {
-        final Path graphFile = Files.createTempFile("graph-empty-", ".nt");
-        if (KEEP_FILES) {
-            System.out.println("Filtered stream: " + graphFile);
-        } else {
-            graphFile.toFile().deleteOnExit();
-        }
-
-        final IRI subject = factory.createIRI("nonexistent");
-        final IRI predicate = factory.createIRI("pred");
-        final Stream<CharSequence> stream = graph.stream(subject, predicate, null).map(Object::toString);
-        Files.write(graphFile, stream::iterator, StandardCharsets.UTF_8);
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/TypesTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/TypesTest.java b/simple/src/test/java/org/apache/commons/rdf/simple/TypesTest.java
deleted file mode 100644
index f199d9e..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/TypesTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.rdf.simple;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Tests for the {@link org.apache.commons.rdf.simple.Types} enumeration.
- */
-public class TypesTest {
-
-    /**
-     * Test method for
-     * {@link org.apache.commons.rdf.simple.Types#getIRIString()} .
-     */
-    @Test
-    public final void testGetIRIString() {
-        assertEquals("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", Types.RDF_LANGSTRING.getIRIString());
-    }
-
-    /**
-     * Test method for
-     * {@link org.apache.commons.rdf.simple.Types#ntriplesString()}.
-     */
-    @Test
-    public final void testNtriplesString() {
-        assertEquals("<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>", Types.RDF_LANGSTRING.ntriplesString());
-    }
-
-    /**
-     * Test method for
-     * {@link org.apache.commons.rdf.simple.Types#get(org.apache.commons.rdf.api.IRI)}
-     * .
-     */
-    @Test
-    public final void testGet() {
-        assertTrue(Types.get(new IRIImpl("http://www.w3.org/2001/XMLSchema#boolean")).isPresent());
-        assertEquals("http://www.w3.org/2001/XMLSchema#boolean",
-                Types.get(new IRIImpl("http://www.w3.org/2001/XMLSchema#boolean")).get().getIRIString());
-        assertFalse(Types.get(new IRIImpl("http://www.w3.org/2001/XMLSchema#nonExistent")).isPresent());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/d59203ce/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java b/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
deleted file mode 100644
index 68f686b..0000000
--- a/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
+++ /dev/null
@@ -1,279 +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.simple.experimental;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeNotNull;
-import static org.apache.commons.rdf.api.RDFSyntax.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.concurrent.TimeUnit;
-
-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.RDFSyntax;
-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.experimental.RDFParser;
-import org.apache.commons.rdf.simple.DummyRDFParserBuilder;
-import org.apache.commons.rdf.simple.SimpleRDF;
-import org.apache.commons.rdf.simple.Types;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-public class AbstractRDFParserTest {
-
-    private final RDF factory = new SimpleRDF();
-
-    private final DummyRDFParserBuilder dummyParser = new DummyRDFParserBuilder();
-    private Path testNt;
-    private Path testTtl;
-    private Path testXml;
-
-	private Path symlink;
-    
-    @Before
-    public void createTempFile() throws IOException {
-        testNt = Files.createTempFile("test", ".nt");
-        testTtl = Files.createTempFile("test", ".ttl");
-        testXml = Files.createTempFile("test", ".xml");
-        // No need to populate the files as the dummy parser
-        // doesn't actually read anything
-        
-        // If supported, we'll make a symbolic link
-        Path symlinks = Files.createTempDirectory("symlinked");
-        try { 
-        	symlink = Files.createSymbolicLink(
-        				symlinks.resolve("linked.ttl"), testNt);
-        } catch (IOException|UnsupportedOperationException ex) {
-        	symlink = null;
-        }
-    }
-
-    @After
-    public void deleteTempFiles() throws IOException {
-        Files.deleteIfExists(testNt);
-        Files.deleteIfExists(testTtl);
-        Files.deleteIfExists(testXml);
-    }
-
-    @Test
-    public void guessRDFSyntax() throws Exception {
-        assertEquals(RDFSyntax.NTRIPLES, AbstractRDFParser.guessRDFSyntax(testNt).get());
-        assertEquals(RDFSyntax.TURTLE, AbstractRDFParser.guessRDFSyntax(testTtl).get());
-        assertFalse(AbstractRDFParser.guessRDFSyntax(testXml).isPresent());
-    }
-
-    private void checkGraph(final Graph g) throws Exception {
-        assertTrue(g.size() > 0);
-        final IRI greeting = factory.createIRI("http://example.com/greeting");
-        // Should only have parsed once!
-        assertEquals(1, g.stream(null, greeting, null).count());
-        final Triple triple = g.stream(null, greeting, null).findAny().get();
-        assertTrue(triple.getSubject() instanceof IRI);
-        final IRI parsing = (IRI) triple.getSubject();
-        assertTrue(parsing.getIRIString().startsWith("urn:uuid:"));
-
-        assertEquals("http://example.com/greeting", triple.getPredicate().getIRIString());
-
-        assertTrue(triple.getObject() instanceof Literal);
-        final Literal literal = (Literal) triple.getObject();
-        assertEquals("Hello world", literal.getLexicalForm());
-        assertFalse(literal.getLanguageTag().isPresent());
-        assertEquals(Types.XSD_STRING, literal.getDatatype());
-
-        // Check uniqueness of properties that are always present
-        assertEquals(1, g.stream(null, factory.createIRI("http://example.com/source"), null).count());
-
-        // Check optional properties that are unique
-        assertTrue(2 > g.stream(null, factory.createIRI("http://example.com/base"), null).count());
-        assertTrue(2 > g.stream(null, factory.createIRI("http://example.com/contentType"), null).count());
-        assertTrue(2 > g.stream(null, factory.createIRI("http://example.com/contentTypeSyntax"), null).count());
-    }
-
-    @Test
-    public void parseFile() throws Exception {
-        final Graph g = factory.createGraph();
-        final RDFParser parser = dummyParser.source(testNt).target(g);
-        parser.parse().get(5, TimeUnit.SECONDS);
-        checkGraph(g);
-        // FIXME: this could potentially break if the equivalent of /tmp
-        // includes
-        // international characters
-        assertEquals("<" + testNt.toUri().toString() + ">", firstPredicate(g, "source"));
-        // Should be set to the file path - after following symlinks
-        assertEquals("<" + testNt.toRealPath().toUri().toString() + ">", firstPredicate(g, "base"));
-
-        // Should NOT have guessed the content type
-        assertNull(firstPredicate(g, "contentType"));
-        assertNull(firstPredicate(g, "contentTypeSyntax"));
-    }
-
-    @Test
-    public void parseFileSymlink() throws Exception {
-    	// This test will typically not work in Windows
-    	// which requires system privileges to create symlinks 
-    	assumeNotNull(symlink);
-        final Graph g = factory.createGraph();
-        final RDFParser parser = dummyParser.source(symlink).target(g);
-        parser.parse().get(5, TimeUnit.SECONDS);
-        checkGraph(g);
-        assertEquals("<" + symlink.toUri().toString() + ">", firstPredicate(g, "source"));
-        assertEquals("<" + testNt.toRealPath().toUri().toString() + ">", firstPredicate(g, "base"));
-    }    
-
-    @Test
-    public void parseNoSource() throws Exception {
-        thrown.expect(IllegalStateException.class);
-        dummyParser.parse();
-    }
-
-    @Test
-    public void parseBaseAndContentTypeNoSource() throws Exception {
-        // Can set the other options, even without source()
-        final IRI base = dummyParser.createRDFTermFactory().createIRI("http://www.example.org/test.rdf");
-        final RDFParser parser = dummyParser.base(base).contentType(RDFSyntax.RDFXML);
-        thrown.expect(IllegalStateException.class);
-        thrown.expectMessage("No source has been set");
-        // but .parse() should fail
-        parser.parse();
-    }
-
-    @Test
-    public void parseFileMissing() throws Exception {
-        Files.delete(testNt);
-        // This should not fail yet
-        final RDFParser parser = dummyParser.source(testNt);
-        // but here:
-        thrown.expect(IOException.class);
-        parser.parse();
-    }
-
-    @Test
-    public void parseFileContentType() throws Exception {
-        final Graph g = factory.createGraph();
-        final RDFParser parser = dummyParser.source(testNt).contentType(RDFSyntax.NTRIPLES).target(g);
-        parser.parse().get(5, TimeUnit.SECONDS);
-        checkGraph(g);
-        // FIXME: this could potentially break if the equivalent of /tmp
-        // includes
-        // international characters
-        assertEquals("<" + testNt.toUri().toString() + ">", firstPredicate(g, "source"));
-        // Should be set to the file path - after following symlinks
-        assertEquals("<" + testNt.toRealPath().toUri().toString() + ">", firstPredicate(g, "base"));
-        assertEquals("\"" + RDFSyntax.NTRIPLES.name() + "\"", 
-                firstPredicate(g, "contentTypeSyntax"));
-        assertEquals("\"application/n-triples\"", firstPredicate(g, "contentType"));
-    }
-
-    private String firstPredicate(final Graph g, final String pred) {
-        return g.stream(null, factory.createIRI("http://example.com/" + pred), null).map(Triple::getObject)
-                .map(RDFTerm::ntriplesString).findAny().orElse(null);
-    }
-
-    @Rule
-    public ExpectedException thrown = ExpectedException.none();
-
-    @Test
-    public void parseInputStreamFailsIfBaseMissing() throws Exception {
-        final InputStream inputStream = new ByteArrayInputStream(new byte[0]);
-        // Should not fail at this point
-        final RDFParser parser = dummyParser.source(inputStream);
-        // but here:
-        thrown.expect(IllegalStateException.class);
-        thrown.expectMessage("base iri required for inputstream source");
-        parser.parse();
-    }
-
-    @Test
-    public void parseInputStreamWithBase() throws Exception {
-        final InputStream inputStream = new ByteArrayInputStream(new byte[0]);
-        final IRI base = dummyParser.createRDFTermFactory().createIRI("http://www.example.org/test.rdf");
-        final Graph g = factory.createGraph();
-        final RDFParser parser = dummyParser.source(inputStream).base(base).target(g);
-        parser.parse().get(5, TimeUnit.SECONDS);
-        checkGraph(g);
-        assertEquals("<http://www.example.org/test.rdf>", firstPredicate(g, "base"));
-        // in our particular debug output,
-        // bnode source indicates InputStream
-        assertTrue(firstPredicate(g, "source").startsWith("_:"));
-        assertNull(firstPredicate(g, "contentType"));
-        assertNull(firstPredicate(g, "contentTypeSyntax"));
-    }
-
-    @Test
-    public void parseInputStreamWithNQuads() throws Exception {
-        final InputStream inputStream = new ByteArrayInputStream(new byte[0]);
-        final Graph g = factory.createGraph();
-        final RDFParser parser = dummyParser.source(inputStream).contentType(RDFSyntax.NQUADS).target(g);
-        parser.parse().get(5, TimeUnit.SECONDS);
-        checkGraph(g);
-        assertNull(firstPredicate(g, "base"));
-        // in our particular debug output,
-        // bnode source indicates InputStream
-        assertTrue(firstPredicate(g, "source").startsWith("_:"));
-        assertEquals("\"application/n-quads\"", firstPredicate(g, "contentType"));
-        assertEquals("\"" + RDFSyntax.NQUADS.name() + "\"", 
-                firstPredicate(g, "contentTypeSyntax"));
-    }
-
-    @Test
-    public void parseIRI() throws Exception {
-        final IRI iri = dummyParser.createRDFTermFactory().createIRI("http://www.example.net/test.ttl");
-        final Graph g = factory.createGraph();
-        final RDFParser parser = dummyParser.source(iri).target(g);
-        parser.parse().get(5, TimeUnit.SECONDS);
-        checkGraph(g);
-        assertEquals("<http://www.example.net/test.ttl>", firstPredicate(g, "source"));
-        // No base - assuming the above IRI is always
-        // the base would break server-supplied base from
-        // any HTTP Location redirects and Content-Location header
-        assertNull(firstPredicate(g, "base"));
-        // ".ttl" in IRI string does not imply any content type
-        assertNull(firstPredicate(g, "contentType"));
-        assertNull(firstPredicate(g, "contentTypeSyntax"));
-
-    }
-
-    @Test
-    public void parseIRIBaseContentType() throws Exception {
-        final IRI iri = dummyParser.createRDFTermFactory().createIRI("http://www.example.net/test.ttl");
-        final Graph g = factory.createGraph();
-        final RDFParser parser = dummyParser.source(iri).base(iri).contentType(RDFSyntax.TURTLE).target(g);
-        parser.parse().get(5, TimeUnit.SECONDS);
-        checkGraph(g);
-        assertEquals("<http://www.example.net/test.ttl>", firstPredicate(g, "source"));
-        assertEquals("<http://www.example.net/test.ttl>", firstPredicate(g, "base"));
-        assertEquals("\"" + RDFSyntax.TURTLE.name() + "\"", 
-                firstPredicate(g, "contentTypeSyntax"));
-        assertEquals("\"text/turtle\"", firstPredicate(g, "contentType"));
-    }
-
-}


Mime
View raw message