You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/09/12 23:13:19 UTC
[1/2] incubator-commonsrdf git commit: target(Consumer)
includes all triples
Repository: incubator-commonsrdf
Updated Branches:
refs/heads/parser-with-quads cbfb670b6 -> bfcead4f8
target(Consumer<Quad>) includes all triples
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/72016682
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/72016682
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/72016682
Branch: refs/heads/parser-with-quads
Commit: 72016682262ca1e696bf8af78e27dc54f759544a
Parents: cbfb670
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Sep 13 00:07:49 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Sep 13 00:09:52 2016 +0100
----------------------------------------------------------------------
.../commons/rdf/api/RDFParserBuilder.java | 21 +++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/72016682/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java b/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java
index 0494502..dde92ac 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
+import java.util.Optional;
import java.util.concurrent.Future;
import java.util.function.Consumer;
@@ -43,7 +44,7 @@ import java.util.function.Consumer;
* parsing.
* <p>
* Setting a method that has already been set will override any existing value
- * in the returned builder - irregardless of the parameter type (e.g.
+ * in the returned builder - regardless of the parameter type (e.g.
* {@link #source(IRI)} will override a previous {@link #source(Path)}. Settings
* can be unset by passing <code>null</code> - note that this may
* require casting, e.g. <code>contentType( (RDFSyntax) null )</code>
@@ -220,6 +221,13 @@ public interface RDFParserBuilder {
/**
* Specify a consumer for parsed quads.
* <p>
+ * The quads will include triples in all named graphs of the parsed
+ * source, including any triples in the default graph.
+ * When parsing a source format which do not support datasets, all quads
+ * delivered to the consumer will be in the default graph
+ * (e.g. their {@link Quad#getGraphName()} will be
+ * as {@link Optional#empty()}), while for a source
+ * <p>
* It is undefined if any quads are consumed if {@link #parse()} throws any
* exceptions. On the other hand, if {@link #parse()} does not indicate an
* exception, the implementation SHOULD have produced all parsed quads to
@@ -243,7 +251,6 @@ public interface RDFParserBuilder {
* A {@link Consumer} of {@link Quad}s
* @return An {@link RDFParserBuilder} that will call the consumer for into
* the specified dataset.
- * @return
*/
RDFParserBuilder target(Consumer<Quad> consumer);
@@ -355,7 +362,7 @@ public interface RDFParserBuilder {
* <p>
* The source set will not be read before the call to {@link #parse()}.
* <p>
- * If this builder does not support the given IRI (e.g.
+ * If this builder does not support the given IRI protocol (e.g.
* <code>urn:uuid:ce667463-c5ab-4c23-9b64-701d055c4890</code>), this method
* should succeed, while the {@link #parse()} should throw an
* {@link IOException}.
@@ -425,9 +432,9 @@ public interface RDFParserBuilder {
* method) MUST have been called before calling this method, otherwise an
* {@link IllegalStateException} will be thrown.
* <p>
- * A target method (e.g. {@link #target(Consumer)}, {@link #target(Dataset)}
- * , {@link #target(Graph)} or an equivalent subclass method) MUST have been
- * called before calling this method, otherwise an
+ * A target method (e.g. {@link #target(Consumer)}, {@link #target(Dataset)},
+ * {@link #target(Graph)} or an equivalent subclass method) MUST have been
+ * called before calling parse(), otherwise an
* {@link IllegalStateException} will be thrown.
* <p>
* It is undefined if this method is thread-safe, however the
@@ -449,7 +456,7 @@ public interface RDFParserBuilder {
* parsing succeeded.
* <p>
* If an exception occurs during parsing, (e.g. {@link IOException} or
- * {@link org.apache.commons.rdf.simple.AbstractRDFParserBuilder.RDFParseException}),
+ * {@link org.apache.commons.rdf.simple.RDFParseException}),
* it should be indicated as the
* {@link java.util.concurrent.ExecutionException#getCause()} in the
* {@link java.util.concurrent.ExecutionException} thrown on
[2/2] incubator-commonsrdf git commit: Corrected javadoc syntax/links
Posted by st...@apache.org.
Corrected javadoc syntax/links
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/bfcead4f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/bfcead4f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/bfcead4f
Branch: refs/heads/parser-with-quads
Commit: bfcead4f8ac403686cf136a59c598b07d6526a33
Parents: 7201668
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Sep 13 00:08:44 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Sep 13 00:11:20 2016 +0100
----------------------------------------------------------------------
.../apache/commons/rdf/simple/AbstractRDFParserBuilder.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/bfcead4f/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java b/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
index 0dc0e67..9e97487 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
@@ -369,10 +369,6 @@ public abstract class AbstractRDFParserBuilder<T extends AbstractRDFParserBuilde
* One of the source fields MUST be present, as checked by {@link #checkSource()}.
* <p>
* {@link #checkBaseRequired()} is called to verify if {@link #getBase()} is required.
- * <p>
- * When this method is called, {@link #intoGraph} MUST always be present, as
- * that is where the parsed triples MUST be inserted into.
- * <p>
*
* @throws IOException If the source could not be read
* @throws RDFParseException If the source could not be parsed (e.g. a .ttl file was not valid Turtle)
@@ -384,7 +380,7 @@ public abstract class AbstractRDFParserBuilder<T extends AbstractRDFParserBuilde
* completed.
* <p>
* The returned clone will always have
- * {@link #getIntoGraph()} and {@link #getRdfTermFactory()} present.
+ * {@link #getTarget()} and {@link #getRdfTermFactory()} present.
* <p>
* If the {@link #getSourceFile()} is present, but the
* {@link #getBase()} is not present, the base will be set to the