commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [50/50] [abbrv] incubator-commonsrdf git commit: Use AbstractRDFParserBuilder getters
Date Sat, 02 Jul 2016 16:15:07 GMT
Use AbstractRDFParserBuilder getters


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

Branch: refs/heads/jena
Commit: 6f46d762c20b18531ed7c5df7899224238045a57
Parents: 087a61a
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Wed Apr 13 03:34:19 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Wed Apr 13 03:34:19 2016 +0100

----------------------------------------------------------------------
 .../commons/rdf/jena/JenaRDFParserBuilder.java   | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/6f46d762/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDFParserBuilder.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDFParserBuilder.java b/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDFParserBuilder.java
index de75844..604db1a 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDFParserBuilder.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDFParserBuilder.java
@@ -20,7 +20,6 @@ package org.apache.commons.rdf.jena;
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.file.Files;
-import java.text.ParseException;
 
 import org.apache.commons.rdf.api.IRI;
 import org.apache.commons.rdf.api.RDFParserBuilder;
@@ -37,20 +36,20 @@ public class JenaRDFParserBuilder extends AbstractRDFParserBuilder implements
RD
 	}
 
 	@Override
-	protected void parseSynchronusly() throws IOException, IllegalStateException, ParseException
{
-		StreamRDF dest = JenaCommonsRDF.streamJenaToCommonsRDF(rdfTermFactory.get(), intoGraph.get());
+	protected void parseSynchronusly() throws IOException {
+		StreamRDF dest = JenaCommonsRDF.streamJenaToCommonsRDF(getRdfTermFactory().get(), getIntoGraph().get());
 
-		Lang lang = contentTypeSyntax.flatMap(JenaCommonsRDF::rdfSyntaxToLang).orElse(null);
-		String baseStr = base.map(IRI::getIRIString).orElse(null);
+		Lang lang = getContentTypeSyntax().flatMap(JenaCommonsRDF::rdfSyntaxToLang).orElse(null);
+		String baseStr = getBase().map(IRI::getIRIString).orElse(null);
 
-		if (sourceIri.isPresent()) {
-			RDFDataMgr.parse(dest, sourceIri.get().toString(), baseStr, lang, null);
-		} else if (sourceFile.isPresent()) {
-			try (InputStream s = Files.newInputStream(sourceFile.get())) {
+		if (getSourceIri().isPresent()) {
+			RDFDataMgr.parse(dest, getSourceIri().get().toString(), baseStr, lang, null);
+		} else if (getSourceFile().isPresent()) {
+			try (InputStream s = Files.newInputStream(getSourceFile().get())) {
 				RDFDataMgr.parse(dest, s, baseStr, lang, null);
 			}
 		} else {
-			RDFDataMgr.parse(dest, sourceInputStream.get(), baseStr, lang, null);
+			RDFDataMgr.parse(dest, getSourceInputStream().get(), baseStr, lang, null);
 		}
 	}
 


Mime
View raw message