commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [10/50] incubator-commonsrdf git commit: Use AbstractRDFParBuilder generics
Date Fri, 07 Oct 2016 15:01:13 GMT
Use AbstractRDFParBuilder generics


Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/57a4b193
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/57a4b193
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/57a4b193

Branch: refs/heads/master
Commit: 57a4b193d7a278dece3433bff0f419d7a6049841
Parents: 5cb811e
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Fri Sep 9 16:39:42 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Fri Sep 9 16:39:42 2016 +0100

----------------------------------------------------------------------
 .../org/apache/commons/rdf/rdf4j/RDF4JParserBuilder.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/57a4b193/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JParserBuilder.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JParserBuilder.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JParserBuilder.java
index d0b2c6c..732112b 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JParserBuilder.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JParserBuilder.java
@@ -51,7 +51,7 @@ import org.eclipse.rdf4j.rio.helpers.AbstractRDFHandler;
  * <em>rdf4j-rio-*</em> module on the classpath.
  *
  */
-public class RDF4JParserBuilder extends AbstractRDFParserBuilder implements RDFParserBuilder
{
+public class RDF4JParserBuilder extends AbstractRDFParserBuilder<RDF4JParserBuilder>
implements RDFParserBuilder {
 
 	private final class AddToQuadConsumer extends AbstractRDFHandler {
 		private final Consumer<Quad> quadTarget;
@@ -103,8 +103,8 @@ public class RDF4JParserBuilder extends AbstractRDFParserBuilder implements
RDFP
 	}
 
 	@Override
-	protected AbstractRDFParserBuilder prepareForParsing() throws IOException, IllegalStateException
{
-		RDF4JParserBuilder c = (RDF4JParserBuilder) prepareForParsing();
+	protected RDF4JParserBuilder prepareForParsing() throws IOException, IllegalStateException
{
+		RDF4JParserBuilder c = prepareForParsing();
 		// Ensure we have an RDF4JTermFactory for conversion.
 		// We'll make a new one if user has provided a non-RDF4J factory
 		c.rdf4jTermFactory = (RDF4JTermFactory) getRdfTermFactory().filter(RDF4JTermFactory.class::isInstance)
@@ -113,10 +113,10 @@ public class RDF4JParserBuilder extends AbstractRDFParserBuilder implements
RDFP
 	}
 
 	@Override
-	protected void parseSynchronusly() throws IOException, RDFParseException {
+	protected void parseSynchronusly() throws IOException {		
 		Optional<RDFFormat> formatByMimeType = getContentType().flatMap(Rio::getParserFormatForMIMEType);
 		String base = getBase().map(IRI::getIRIString).orElse(null);
-		
+				
 		ParserConfig parserConfig = new ParserConfig();
 		// TODO: Should we need to set anything?
 		RDFLoader loader = new RDFLoader(parserConfig, rdf4jTermFactory.getValueFactory());


Mime
View raw message