commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [39/50] [abbrv] incubator-commonsrdf git commit: Reformat tab -> spaces
Date Fri, 28 Oct 2016 13:08:17 GMT
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/NativeStoreGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/NativeStoreGraphTest.java b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/NativeStoreGraphTest.java
index 7e43068..35a7071 100644
--- a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/NativeStoreGraphTest.java
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/NativeStoreGraphTest.java
@@ -40,125 +40,135 @@ import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.Timeout;
 
-
 /**
  * Test a graph within a file-based RDF4J {@link SailRepository}.
  * <p>
- * TIP: If the {@link #shutdownAndDelete()} take about 20 seconds
- * this is a hint that a {@link RepositoryConnection} or 
- * {@link RepositoryResult} was not closed correctly.
+ * TIP: If the {@link #shutdownAndDelete()} take about 20 seconds this is a hint
+ * that a {@link RepositoryConnection} or {@link RepositoryResult} was not
+ * closed correctly.
  * 
  */
 public class NativeStoreGraphTest extends AbstractGraphTest {
 
-	public final class NativeStoreRDF implements RDF {
-
-		RDF4J rdf4jFactory = new RDF4J(getRepository().getValueFactory());
-
-		@Override
-		public RDF4JGraph createGraph() {
-			// We re-use the repository connection, but use a different context every time
-			Set<RDF4JBlankNode> context = Collections.singleton(rdf4jFactory.createBlankNode());
-			return rdf4jFactory.asGraph(getRepository(), context);
-		}
-		@Override
-		public Dataset createDataset() {
-			throw new UnsupportedOperationException("Can't create more than one Dataset in this test");
-			// ...as the below would re-use the same repository:
-			//return rdf4jFactory.asRDFTermDataset(getRepository()); 
-		}
-		
-		// Delegate methods 
-		public RDF4JBlankNode createBlankNode() {
-			return rdf4jFactory.createBlankNode();
-		}
-		public RDF4JBlankNode createBlankNode(String name) {
-			return rdf4jFactory.createBlankNode(name);
-		}
-		public RDF4JIRI createIRI(String iri) throws IllegalArgumentException, UnsupportedOperationException {
-			return rdf4jFactory.createIRI(iri);
-		}
-		public RDF4JLiteral createLiteral(String lexicalForm) {
-			return rdf4jFactory.createLiteral(lexicalForm);
-		}
-		public Literal createLiteral(String lexicalForm, IRI dataType) {
-			return rdf4jFactory.createLiteral(lexicalForm, dataType);
-		}
-		public Literal createLiteral(String lexicalForm, String languageTag) {
-			return rdf4jFactory.createLiteral(lexicalForm, languageTag);
-		}
-		public RDF4JTriple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-			return rdf4jFactory.createTriple(subject, predicate, object);
-		}
-		public Quad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
-				throws IllegalArgumentException {
-			return rdf4jFactory.createQuad(graphName, subject, predicate, object);
-		}
-	}
-
-
-	@Rule
-	public TemporaryFolder tempDir = new TemporaryFolder();
-
-	private SailRepository repository;
-	
-	public void createRepository() throws IOException {
-		Sail sail = new NativeStore(tempDir.newFolder());
-		repository = new SailRepository(sail);
-		repository.initialize();
-	}
-
-	public synchronized SailRepository getRepository() {
-		if (repository == null) {
-			try {
-				createRepository();
-			} catch (IOException e) {
-				throw new UncheckedIOException(e);
-			}
-		}
-		return repository;
-	}
-	
-	@Rule
-	/**
-	 * A timeout of more than 15 seconds pr test indicates typically that
-	 * shutdownAndDelete failed.
-	 */
-	public Timeout globalTimeout = Timeout.seconds(15);
-	
-	@After
-	public void shutdownAndDelete() throws IOException {
-		// must shutdown before we delete
-		if (repository != null) {
-			System.out.print("Shutting down rdf4j repository " + repository + "...");
-			// NOTE: 
-			// If this takes about 20 seconds it means the code forgot to close a
-			// RepositoryConnection or RespositoryResult
-			// e.g. missing a try-with-resources block
-			repository.shutDown();
-			System.out.println("OK");
-		}
-	}
-	
-//	private static void deleteAll(Path dir) throws IOException {
-//		Files.walkFileTree(dir, new SimpleFileVisitor<Path>(){
-//			@Override
-//			public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
-//				Files.delete(file);
-//				return FileVisitResult.CONTINUE;
-//			}
-//			@Override
-//			public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
-//				FileVisitResult r = super.postVisitDirectory(dir, exc);
-//				Files.delete(dir);
-//				return r;
-//			}
-//		});
-//	}
-
-	@Override
-	public RDF createFactory() {
-		return new NativeStoreRDF();
-	}
+    public final class NativeStoreRDF implements RDF {
+
+        RDF4J rdf4jFactory = new RDF4J(getRepository().getValueFactory());
+
+        @Override
+        public RDF4JGraph createGraph() {
+            // We re-use the repository connection, but use a different context
+            // every time
+            Set<RDF4JBlankNode> context = Collections.singleton(rdf4jFactory.createBlankNode());
+            return rdf4jFactory.asGraph(getRepository(), context);
+        }
+
+        @Override
+        public Dataset createDataset() {
+            throw new UnsupportedOperationException("Can't create more than one Dataset in this test");
+            // ...as the below would re-use the same repository:
+            // return rdf4jFactory.asRDFTermDataset(getRepository());
+        }
+
+        // Delegate methods
+        public RDF4JBlankNode createBlankNode() {
+            return rdf4jFactory.createBlankNode();
+        }
+
+        public RDF4JBlankNode createBlankNode(String name) {
+            return rdf4jFactory.createBlankNode(name);
+        }
+
+        public RDF4JIRI createIRI(String iri) throws IllegalArgumentException, UnsupportedOperationException {
+            return rdf4jFactory.createIRI(iri);
+        }
+
+        public RDF4JLiteral createLiteral(String lexicalForm) {
+            return rdf4jFactory.createLiteral(lexicalForm);
+        }
+
+        public Literal createLiteral(String lexicalForm, IRI dataType) {
+            return rdf4jFactory.createLiteral(lexicalForm, dataType);
+        }
+
+        public Literal createLiteral(String lexicalForm, String languageTag) {
+            return rdf4jFactory.createLiteral(lexicalForm, languageTag);
+        }
+
+        public RDF4JTriple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+            return rdf4jFactory.createTriple(subject, predicate, object);
+        }
+
+        public Quad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
+                throws IllegalArgumentException {
+            return rdf4jFactory.createQuad(graphName, subject, predicate, object);
+        }
+    }
+
+    @Rule
+    public TemporaryFolder tempDir = new TemporaryFolder();
+
+    private SailRepository repository;
+
+    public void createRepository() throws IOException {
+        Sail sail = new NativeStore(tempDir.newFolder());
+        repository = new SailRepository(sail);
+        repository.initialize();
+    }
+
+    public synchronized SailRepository getRepository() {
+        if (repository == null) {
+            try {
+                createRepository();
+            } catch (IOException e) {
+                throw new UncheckedIOException(e);
+            }
+        }
+        return repository;
+    }
+
+    @Rule
+    /**
+     * A timeout of more than 15 seconds pr test indicates typically that
+     * shutdownAndDelete failed.
+     */
+    public Timeout globalTimeout = Timeout.seconds(15);
+
+    @After
+    public void shutdownAndDelete() throws IOException {
+        // must shutdown before we delete
+        if (repository != null) {
+            System.out.print("Shutting down rdf4j repository " + repository + "...");
+            // NOTE:
+            // If this takes about 20 seconds it means the code forgot to close
+            // a
+            // RepositoryConnection or RespositoryResult
+            // e.g. missing a try-with-resources block
+            repository.shutDown();
+            System.out.println("OK");
+        }
+    }
+
+    // private static void deleteAll(Path dir) throws IOException {
+    // Files.walkFileTree(dir, new SimpleFileVisitor<Path>(){
+    // @Override
+    // public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
+    // throws IOException {
+    // Files.delete(file);
+    // return FileVisitResult.CONTINUE;
+    // }
+    // @Override
+    // public FileVisitResult postVisitDirectory(Path dir, IOException exc)
+    // throws IOException {
+    // FileVisitResult r = super.postVisitDirectory(dir, exc);
+    // Files.delete(dir);
+    // return r;
+    // }
+    // });
+    // }
+
+    @Override
+    public RDF createFactory() {
+        return new NativeStoreRDF();
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JServiceLoaderTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JServiceLoaderTest.java b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JServiceLoaderTest.java
index cbd85f1..fffa134 100644
--- a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JServiceLoaderTest.java
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JServiceLoaderTest.java
@@ -31,10 +31,10 @@ public class RDF4JServiceLoaderTest {
     public void testServiceLoaderLookup() {
         ServiceLoader<RDF> loader = ServiceLoader.load(RDF.class);
         for (RDF impl : loader) {
-        	if (impl instanceof RDF4J) {
-        		return; // yay
-        	}
+            if (impl instanceof RDF4J) {
+                return; // yay
+            }
         }
-        fail("RDF4J not found in ServiceLoader");        
+        fail("RDF4J not found in ServiceLoader");
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JTest.java b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JTest.java
index c10ea9a..29674ae 100644
--- a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JTest.java
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/RDF4JTest.java
@@ -23,15 +23,15 @@ import org.junit.Assume;
 
 public class RDF4JTest extends AbstractRDFTest {
 
-	@Override
-	public RDF createFactory() {
-		return new RDF4J();
-	}
-	
-	@Override
-	public void testInvalidLiteralLang() throws Exception {
-		Assume.assumeTrue("RDF4J doesn't check Lang strings",false);
-		super.testInvalidLiteralLang();
-	}
-	
+    @Override
+    public RDF createFactory() {
+        return new RDF4J();
+    }
+
+    @Override
+    public void testInvalidLiteralLang() throws Exception {
+        Assume.assumeTrue("RDF4J doesn't check Lang strings", false);
+        super.testInvalidLiteralLang();
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
index 4b20618..1e2dfca 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
@@ -55,7 +55,6 @@ final class BlankNodeImpl implements BlankNode, SimpleRDFTerm {
         // ntriplesString() (there are no restrictions on
         // RDF.createBlankNode(String) ).
 
-
         // Rather than implement ntriples escaping here, and knowing
         // our uniqueReference() contain a UUID anyway, we simply
         // create another name-based UUID, and use it within both
@@ -65,8 +64,7 @@ final class BlankNodeImpl implements BlankNode, SimpleRDFTerm {
         // is not preserved or shown in ntriplesString. In a way
         // this is a feature, not a bug. as the contract for RDF
         // has no such requirement.
-        this.uniqueReference = UUID.nameUUIDFromBytes(
-                uuidInput.getBytes(StandardCharsets.UTF_8)).toString();
+        this.uniqueReference = UUID.nameUUIDFromBytes(uuidInput.getBytes(StandardCharsets.UTF_8)).toString();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
index d578a40..cc6f4b4 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetGraphView.java
@@ -40,99 +40,100 @@ import org.apache.commons.rdf.api.Triple;
  * {@link Quad}s of the Dataset is represented as a {@link Triple}. Adding
  * triples will add them to the <em>default graph</em>, while removing triples
  * will remove from all graphs.</dd>
-* 
+ * 
  * <dt>{@link #DatasetGraphView(Dataset, BlankNodeOrIRI)}</dt>
- * <dd>Expose a particular graph of the Dataset, either named by an {@link IRI}, a
- * {@link BlankNode}, or  <code>null</code> for the <em>default graph</em>.</dd>
+ * <dd>Expose a particular graph of the Dataset, either named by an {@link IRI},
+ * a {@link BlankNode}, or <code>null</code> for the <em>default
+ * graph</em>.</dd>
  * </dl>
  * <p>
- * Changes in the Graph are reflected directly in the Dataset and vice versa.  
+ * Changes in the Graph are reflected directly in the Dataset and vice versa.
  * This class is thread-safe is the underlying Dataset is thread-safe.
  */
 public class DatasetGraphView implements Graph {
 
-	private final boolean unionGraph;
-	private final BlankNodeOrIRI namedGraph;
-	private final Dataset dataset;
-
-	public DatasetGraphView(Dataset dataset) {
-		this.dataset = dataset;
-		this.namedGraph = null;
-		this.unionGraph = true;
-	}
-
-	public DatasetGraphView(Dataset dataset, BlankNodeOrIRI namedGraph) {
-		this.dataset = dataset;
-		this.namedGraph = namedGraph;
-		this.unionGraph = false;
-	}
-
-	@Override
-	public void close() throws Exception {
-		dataset.close();
-
-	}
-
-	@Override
-	public void add(Triple triple) {
-		dataset.add(namedGraph, triple.getSubject(), triple.getPredicate(), triple.getObject());
-	}
-
-	@Override
-	public void add(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-		dataset.add(namedGraph, subject, predicate, object);
-	}
-
-	@Override
-	public boolean contains(Triple triple) {
-		return dataset.contains(unionOrNamedGraph(), triple.getSubject(), triple.getPredicate(), triple.getObject());
-	}
-
-	private Optional<BlankNodeOrIRI> unionOrNamedGraph() {
-		if (unionGraph) {
-			return null;
-		}
-		return Optional.ofNullable(namedGraph);
-	}
-
-	@Override
-	public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-		return dataset.contains(unionOrNamedGraph(), subject, predicate, object);
-	}
-
-	@Override
-	public void remove(Triple triple) {
-		dataset.remove(unionOrNamedGraph(), triple.getSubject(), triple.getPredicate(), triple.getObject());
-	}
-
-	@Override
-	public void remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-		dataset.remove(unionOrNamedGraph(), subject, predicate, object);
-	}
-
-	@Override
-	public void clear() {
-		dataset.remove(unionOrNamedGraph(), null, null, null);
-	}
-
-	@Override
-	public long size() {
-		return stream().count();
-	}
-
-	@Override
-	public Stream<? extends Triple> stream() {
-		return stream(null, null, null);
-	}
-
-	@Override
-	public Stream<? extends Triple> stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-		Stream<Triple> stream = dataset.stream(unionOrNamedGraph(), subject, predicate, object).map(Quad::asTriple);
-		if (unionGraph) {
-			// remove duplicates
-			return stream.distinct();
-		}
-		return stream;
-	}
+    private final boolean unionGraph;
+    private final BlankNodeOrIRI namedGraph;
+    private final Dataset dataset;
+
+    public DatasetGraphView(Dataset dataset) {
+        this.dataset = dataset;
+        this.namedGraph = null;
+        this.unionGraph = true;
+    }
+
+    public DatasetGraphView(Dataset dataset, BlankNodeOrIRI namedGraph) {
+        this.dataset = dataset;
+        this.namedGraph = namedGraph;
+        this.unionGraph = false;
+    }
+
+    @Override
+    public void close() throws Exception {
+        dataset.close();
+
+    }
+
+    @Override
+    public void add(Triple triple) {
+        dataset.add(namedGraph, triple.getSubject(), triple.getPredicate(), triple.getObject());
+    }
+
+    @Override
+    public void add(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+        dataset.add(namedGraph, subject, predicate, object);
+    }
+
+    @Override
+    public boolean contains(Triple triple) {
+        return dataset.contains(unionOrNamedGraph(), triple.getSubject(), triple.getPredicate(), triple.getObject());
+    }
+
+    private Optional<BlankNodeOrIRI> unionOrNamedGraph() {
+        if (unionGraph) {
+            return null;
+        }
+        return Optional.ofNullable(namedGraph);
+    }
+
+    @Override
+    public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+        return dataset.contains(unionOrNamedGraph(), subject, predicate, object);
+    }
+
+    @Override
+    public void remove(Triple triple) {
+        dataset.remove(unionOrNamedGraph(), triple.getSubject(), triple.getPredicate(), triple.getObject());
+    }
+
+    @Override
+    public void remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+        dataset.remove(unionOrNamedGraph(), subject, predicate, object);
+    }
+
+    @Override
+    public void clear() {
+        dataset.remove(unionOrNamedGraph(), null, null, null);
+    }
+
+    @Override
+    public long size() {
+        return stream().count();
+    }
+
+    @Override
+    public Stream<? extends Triple> stream() {
+        return stream(null, null, null);
+    }
+
+    @Override
+    public Stream<? extends Triple> stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+        Stream<Triple> stream = dataset.stream(unionOrNamedGraph(), subject, predicate, object).map(Quad::asTriple);
+        if (unionGraph) {
+            // remove duplicates
+            return stream.distinct();
+        }
+        return stream;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
index a23f27e..974122d 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/DatasetImpl.java
@@ -43,7 +43,7 @@ import org.apache.commons.rdf.simple.SimpleRDF.SimpleRDFTerm;
  * All Stream operations are performed using parallel and unordered directives.
  */
 final class DatasetImpl implements Dataset {
-	
+
     private static final int TO_STRING_MAX = 10;
     private final Set<Quad> quads = new HashSet<Quad>();
     private final SimpleRDF factory;
@@ -51,43 +51,39 @@ final class DatasetImpl implements Dataset {
     DatasetImpl(SimpleRDF simpleRDF) {
         this.factory = simpleRDF;
     }
-    
-	@Override
-	public void add(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-		BlankNodeOrIRI newGraphName = (BlankNodeOrIRI) internallyMap(graphName);
-		BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);
+
+    @Override
+    public void add(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+        BlankNodeOrIRI newGraphName = (BlankNodeOrIRI) internallyMap(graphName);
+        BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);
         IRI newPredicate = (IRI) internallyMap(predicate);
         RDFTerm newObject = internallyMap(object);
         Quad result = factory.createQuad(newGraphName, newSubject, newPredicate, newObject);
         quads.add(result);
-	}    
+    }
 
     @Override
-    public void add(Quad quad) {    	
-    	BlankNodeOrIRI newGraph = (BlankNodeOrIRI) internallyMap(quad.getGraphName().orElse(null));
-    	BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(quad
-                .getSubject());        
+    public void add(Quad quad) {
+        BlankNodeOrIRI newGraph = (BlankNodeOrIRI) internallyMap(quad.getGraphName().orElse(null));
+        BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(quad.getSubject());
         IRI newPredicate = (IRI) internallyMap(quad.getPredicate());
         RDFTerm newObject = internallyMap(quad.getObject());
         // Check if any of the object references changed during the mapping, to
         // avoid creating a new Quad object if possible
-        if (newGraph == quad.getGraphName().orElse(null) 
-        	&& newSubject == quad.getSubject()
-            && newPredicate == quad.getPredicate()
-            && newObject == quad.getObject()) {
+        if (newGraph == quad.getGraphName().orElse(null) && newSubject == quad.getSubject()
+                && newPredicate == quad.getPredicate() && newObject == quad.getObject()) {
             quads.add(quad);
         } else {
-        	// Make a new Quad with our mapped instances
-            Quad result = factory.createQuad(newGraph, newSubject, newPredicate,
-                    newObject);
+            // Make a new Quad with our mapped instances
+            Quad result = factory.createQuad(newGraph, newSubject, newPredicate, newObject);
             quads.add(result);
         }
     }
 
     private <T extends RDFTerm> RDFTerm internallyMap(T object) {
-    	if (object == null || object instanceof SimpleRDFTerm) {
-    		return object;
-    	}    	
+        if (object == null || object instanceof SimpleRDFTerm) {
+            return object;
+        }
         if (object instanceof BlankNode && !(object instanceof BlankNodeImpl)) {
             BlankNode blankNode = (BlankNode) object;
             // This guarantees that adding the same BlankNode multiple times to
@@ -98,18 +94,15 @@ final class DatasetImpl implements Dataset {
         } else if (object instanceof IRI && !(object instanceof IRIImpl)) {
             IRI iri = (IRI) object;
             return factory.createIRI(iri.getIRIString());
-        } else if (object instanceof Literal
-                && !(object instanceof LiteralImpl)) {
+        } else if (object instanceof Literal && !(object instanceof LiteralImpl)) {
             Literal literal = (Literal) object;
             if (literal.getLanguageTag().isPresent()) {
-                return factory.createLiteral(literal.getLexicalForm(), literal
-                        .getLanguageTag().get());
+                return factory.createLiteral(literal.getLexicalForm(), literal.getLanguageTag().get());
             } else {
-                return factory.createLiteral(literal.getLexicalForm(),
-                        (IRI) internallyMap(literal.getDatatype()));
+                return factory.createLiteral(literal.getLexicalForm(), (IRI) internallyMap(literal.getDatatype()));
             }
         } else {
-        	throw new IllegalArgumentException("Not a BlankNode, IRI or Literal: " + object);
+            throw new IllegalArgumentException("Not a BlankNode, IRI or Literal: " + object);
         }
     }
 
@@ -118,34 +111,34 @@ final class DatasetImpl implements Dataset {
         quads.clear();
     }
 
-	@Override
-	public boolean contains(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-		return stream(graphName, subject, predicate, object).findAny().isPresent();
-	}
-    
+    @Override
+    public boolean contains(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+        return stream(graphName, subject, predicate, object).findAny().isPresent();
+    }
+
     @Override
     public boolean contains(Quad quad) {
         return quads.contains(Objects.requireNonNull(quad));
     }
-    
-	@Override
-	public Stream<Quad> stream() {
+
+    @Override
+    public Stream<Quad> stream() {
         return quads.parallelStream().unordered();
-	}
+    }
 
-	@Override
-	public Stream<Quad> stream(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate,
-			RDFTerm object) {
-		final Optional<BlankNodeOrIRI> newGraphName = graphName.map(g -> (BlankNodeOrIRI)internallyMap(g));
+    @Override
+    public Stream<Quad> stream(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate,
+            RDFTerm object) {
+        final Optional<BlankNodeOrIRI> newGraphName = graphName.map(g -> (BlankNodeOrIRI) internallyMap(g));
         final BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);
         final IRI newPredicate = (IRI) internallyMap(predicate);
         final RDFTerm newObject = internallyMap(object);
 
         return getQuads(t -> {
             if (newGraphName != null && !t.getGraphName().equals(newGraphName)) {
-            	// This would check Optional.empty() == Optional.empty()
+                // This would check Optional.empty() == Optional.empty()
                 return false;
-            }        	
+            }
             if (subject != null && !t.getSubject().equals(newSubject)) {
                 return false;
             }
@@ -157,20 +150,20 @@ final class DatasetImpl implements Dataset {
             }
             return true;
         });
-	}    
+    }
 
     private Stream<Quad> getQuads(final Predicate<Quad> filter) {
         return stream().filter(filter);
     }
 
-	@Override
-	public void remove(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+    @Override
+    public void remove(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         Stream<Quad> toRemove = stream(graphName, subject, predicate, object);
         for (Quad t : toRemove.collect(Collectors.toList())) {
             // Avoid ConcurrentModificationException in ArrayList
             remove(t);
         }
-	}
+    }
 
     @Override
     public void remove(Quad quad) {
@@ -184,8 +177,7 @@ final class DatasetImpl implements Dataset {
 
     @Override
     public String toString() {
-        String s = stream().limit(TO_STRING_MAX).map(Object::toString)
-                .collect(Collectors.joining("\n"));
+        String s = stream().limit(TO_STRING_MAX).map(Object::toString).collect(Collectors.joining("\n"));
         if (size() > TO_STRING_MAX) {
             return s + "\n# ... +" + (size() - TO_STRING_MAX) + " more";
         } else {
@@ -193,29 +185,24 @@ final class DatasetImpl implements Dataset {
         }
     }
 
-	@Override
-	public void close() {
-	}
-
-	@Override
-	public Graph getGraph() {
-		return getGraph(null).get();
-	}
-
-	@Override
-	public Optional<Graph> getGraph(BlankNodeOrIRI graphName) {
-		return Optional.of(new DatasetGraphView(this, graphName));
-	}
+    @Override
+    public void close() {
+    }
 
-	@Override
-	public Stream<BlankNodeOrIRI> getGraphNames() {
-		// Not very efficient..
-		return stream()
-				.map(Quad::getGraphName)
-				.filter(Optional::isPresent).map(Optional::get)
-				.distinct();
-	}
+    @Override
+    public Graph getGraph() {
+        return getGraph(null).get();
+    }
 
+    @Override
+    public Optional<Graph> getGraph(BlankNodeOrIRI graphName) {
+        return Optional.of(new DatasetGraphView(this, graphName));
+    }
 
+    @Override
+    public Stream<BlankNodeOrIRI> getGraphNames() {
+        // Not very efficient..
+        return stream().map(Quad::getGraphName).filter(Optional::isPresent).map(Optional::get).distinct();
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
index b9221d5..84ac9a6 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
@@ -55,16 +55,17 @@ final class GraphImpl implements Graph {
 
     @Override
     public void add(Triple triple) {
-    	triples.add(internallyMap(triple));
+        triples.add(internallyMap(triple));
     }
 
     private <T extends RDFTerm> RDFTerm internallyMap(T object) {
-    	if (object == null || object instanceof SimpleRDFTerm) {
-    		// No need to re-map our own objects.
-    		// We support null as internallyMap() is also used by the filters, and the
-    		// factory constructors later do null checks
-    		return object;
-    	}
+        if (object == null || object instanceof SimpleRDFTerm) {
+            // No need to re-map our own objects.
+            // We support null as internallyMap() is also used by the filters,
+            // and the
+            // factory constructors later do null checks
+            return object;
+        }
         if (object instanceof BlankNode) {
             BlankNode blankNode = (BlankNode) object;
             // This guarantees that adding the same BlankNode multiple times to
@@ -78,31 +79,26 @@ final class GraphImpl implements Graph {
         } else if (object instanceof Literal) {
             Literal literal = (Literal) object;
             if (literal.getLanguageTag().isPresent()) {
-                return factory.createLiteral(literal.getLexicalForm(), literal
-                        .getLanguageTag().get());
+                return factory.createLiteral(literal.getLexicalForm(), literal.getLanguageTag().get());
             } else {
-                return factory.createLiteral(literal.getLexicalForm(),
-                        (IRI) internallyMap(literal.getDatatype()));
+                return factory.createLiteral(literal.getLexicalForm(), (IRI) internallyMap(literal.getDatatype()));
             }
         } else {
-        	throw new IllegalArgumentException("RDFTerm was neither a BlankNode, IRI nor Literal: " + object);
+            throw new IllegalArgumentException("RDFTerm was neither a BlankNode, IRI nor Literal: " + object);
         }
     }
 
     private Triple internallyMap(Triple triple) {
-        BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(triple
-                .getSubject());
+        BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(triple.getSubject());
         IRI newPredicate = (IRI) internallyMap(triple.getPredicate());
         RDFTerm newObject = internallyMap(triple.getObject());
         // Check if any of the object references changed during the mapping, to
         // avoid creating a new Triple object if possible
-        if (newSubject == triple.getSubject()
-                && newPredicate == triple.getPredicate()
+        if (newSubject == triple.getSubject() && newPredicate == triple.getPredicate()
                 && newObject == triple.getObject()) {
             return triple;
         } else {
-            return factory.createTriple(newSubject, newPredicate,
-                    newObject);
+            return factory.createTriple(newSubject, newPredicate, newObject);
         }
     }
 
@@ -112,24 +108,22 @@ final class GraphImpl implements Graph {
     }
 
     @Override
-    public boolean contains(BlankNodeOrIRI subject, IRI predicate,
-                            RDFTerm object) {
+    public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         return stream(subject, predicate, object).findFirst().isPresent();
     }
 
     @Override
     public boolean contains(Triple triple) {
-    	return triples.contains(internallyMap(triple));
+        return triples.contains(internallyMap(triple));
     }
-    
-	@Override
+
+    @Override
     public Stream<Triple> stream() {
         return triples.parallelStream().unordered();
     }
 
     @Override
-    public Stream<Triple> stream(final BlankNodeOrIRI subject,
-                                     final IRI predicate, final RDFTerm object) {
+    public Stream<Triple> stream(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
         final BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);
         final IRI newPredicate = (IRI) internallyMap(predicate);
         final RDFTerm newObject = internallyMap(object);
@@ -175,8 +169,7 @@ final class GraphImpl implements Graph {
 
     @Override
     public String toString() {
-        String s = stream().limit(TO_STRING_MAX).map(Object::toString)
-                .collect(Collectors.joining("\n"));
+        String s = stream().limit(TO_STRING_MAX).map(Object::toString).collect(Collectors.joining("\n"));
         if (size() > TO_STRING_MAX) {
             return s + "\n# ... +" + (size() - TO_STRING_MAX) + " more";
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/LiteralImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/LiteralImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/LiteralImpl.java
index d477e43..4d3bf31 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/LiteralImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/LiteralImpl.java
@@ -42,20 +42,17 @@ final class LiteralImpl implements Literal, SimpleRDF.SimpleRDFTerm {
 
     public LiteralImpl(String lexicalForm, IRI dataType) {
         this.lexicalForm = Objects.requireNonNull(lexicalForm);
-        this.dataType = Types.get(Objects.requireNonNull(dataType)).orElse(
-                dataType);
+        this.dataType = Types.get(Objects.requireNonNull(dataType)).orElse(dataType);
         if (Types.RDF_LANGSTRING.equals(this.dataType)) {
             throw new IllegalArgumentException(
-                    "Cannot create a non-language literal with type "
-                            + Types.RDF_LANGSTRING);
+                    "Cannot create a non-language literal with type " + Types.RDF_LANGSTRING);
         }
         this.languageTag = null;
     }
 
     public LiteralImpl(String literal, String languageTag) {
         this.lexicalForm = Objects.requireNonNull(literal);
-        this.languageTag = Objects.requireNonNull(languageTag).toLowerCase(
-                Locale.ENGLISH);
+        this.languageTag = Objects.requireNonNull(languageTag).toLowerCase(Locale.ENGLISH);
         if (languageTag.isEmpty()) {
             // TODO: Check against
             // http://www.w3.org/TR/n-triples/#n-triples-grammar
@@ -64,8 +61,7 @@ final class LiteralImpl implements Literal, SimpleRDF.SimpleRDFTerm {
         try {
             new Locale.Builder().setLanguageTag(languageTag);
         } catch (IllformedLocaleException ex) {
-            throw new IllegalArgumentException("Invalid languageTag: "
-                    + languageTag, ex);
+            throw new IllegalArgumentException("Invalid languageTag: " + languageTag, ex);
         }
 
         // System.out.println(aLocale);
@@ -129,8 +125,7 @@ final class LiteralImpl implements Literal, SimpleRDF.SimpleRDFTerm {
             return false;
         }
         Literal literal = (Literal) obj;
-        return getDatatype().equals(literal.getDatatype())
-                && getLexicalForm().equals(literal.getLexicalForm())
+        return getDatatype().equals(literal.getDatatype()) && getLexicalForm().equals(literal.getLexicalForm())
                 && getLanguageTag().equals(literal.getLanguageTag());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/QuadImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/QuadImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/QuadImpl.java
index 00f8fa8..5092a56 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/QuadImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/QuadImpl.java
@@ -31,7 +31,7 @@ import java.util.Optional;
  */
 final class QuadImpl implements Quad {
 
-	private final BlankNodeOrIRI graphName;
+    private final BlankNodeOrIRI graphName;
     private final BlankNodeOrIRI subject;
     private final IRI predicate;
     private final RDFTerm object;
@@ -42,13 +42,17 @@ final class QuadImpl implements Quad {
      * The objects are not changed. All mapping of BNode objects is done in
      * {@link SimpleRDF#createQuad(BlankNodeOrIRI, BlankNodeOrIRI, IRI, RDFTerm)}.
      *
-     * @param graphName  graphName of triple
-     * @param subject   subject of triple
-     * @param predicate predicate of triple
-     * @param object    object of triple
+     * @param graphName
+     *            graphName of triple
+     * @param subject
+     *            subject of triple
+     * @param predicate
+     *            predicate of triple
+     * @param object
+     *            object of triple
      */
     public QuadImpl(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-    	this.graphName = graphName; // possibly null
+        this.graphName = graphName; // possibly null
         this.subject = Objects.requireNonNull(subject);
         this.predicate = Objects.requireNonNull(predicate);
         this.object = Objects.requireNonNull(object);
@@ -56,9 +60,9 @@ final class QuadImpl implements Quad {
 
     @Override
     public Optional<BlankNodeOrIRI> getGraphName() {
-    	return Optional.ofNullable(graphName);
+        return Optional.ofNullable(graphName);
     }
-    
+
     @Override
     public BlankNodeOrIRI getSubject() {
         return subject;
@@ -75,13 +79,10 @@ final class QuadImpl implements Quad {
     }
 
     @Override
-    public String toString() {    	
-        return 
-			getSubject().ntriplesString() + " "
-	        + getPredicate().ntriplesString() + " "
-	        + getObject().ntriplesString() + " " 
-	        + getGraphName().map(g -> g.ntriplesString() + " ").orElse("")
-	        + ".";    	
+    public String toString() {
+        return getSubject().ntriplesString() + " " + getPredicate().ntriplesString() + " "
+                + getObject().ntriplesString() + " " + getGraphName().map(g -> g.ntriplesString() + " ").orElse("")
+                + ".";
     }
 
     @Override
@@ -95,15 +96,13 @@ final class QuadImpl implements Quad {
             return false;
         }
         Quad other = (Quad) obj;
-        return getGraphName().equals(other.getGraphName()) 
-        		&& getSubject().equals(other.getSubject())
-                && getPredicate().equals(other.getPredicate())
-                && getObject().equals(other.getObject());
+        return getGraphName().equals(other.getGraphName()) && getSubject().equals(other.getSubject())
+                && getPredicate().equals(other.getPredicate()) && getObject().equals(other.getObject());
     }
-    
+
     @Override
     public Triple asTriple() {
-    	return new TripleImpl(getSubject(), getPredicate(), getObject());
+        return new TripleImpl(getSubject(), getPredicate(), getObject());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDF.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDF.java b/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDF.java
index 1698955..1292dc7 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDF.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDF.java
@@ -33,26 +33,25 @@ import org.apache.commons.rdf.api.Triple;
 /**
  * Simple RDF implementation.
  * <p>
- * The {@link RDFTerm}, {@link Triple}, {@link Quad}, {@link Graph}
- * and {@link Dataset} instances created by SimpleRDF are
- * simple in-memory Implementations that are not thread-safe or efficient, but
- * which may be useful for testing and prototyping purposes.
+ * The {@link RDFTerm}, {@link Triple}, {@link Quad}, {@link Graph} and
+ * {@link Dataset} instances created by SimpleRDF are simple in-memory
+ * Implementations that are not thread-safe or efficient, but which may be
+ * useful for testing and prototyping purposes.
  */
 public class SimpleRDF implements RDF {
 
-	/**
-	 * Marker interface to say that this RDFTerm is part of the 
-	 * Simple implementation. Used by {@link GraphImpl} to avoid
-	 * double remapping. 
-	 * <p>
-	 * This method is package protected to avoid any third-party
-	 * subclasses.
-	 *
-	 */
-	static interface SimpleRDFTerm extends RDFTerm {		
-	}
-	
-    /** Unique salt per instance, for {@link #createBlankNode(String)}
+    /**
+     * Marker interface to say that this RDFTerm is part of the Simple
+     * implementation. Used by {@link GraphImpl} to avoid double remapping.
+     * <p>
+     * This method is package protected to avoid any third-party subclasses.
+     *
+     */
+    static interface SimpleRDFTerm extends RDFTerm {
+    }
+
+    /**
+     * Unique salt per instance, for {@link #createBlankNode(String)}
      */
     private final UUID SALT = UUID.randomUUID();
 
@@ -75,9 +74,9 @@ public class SimpleRDF implements RDF {
 
     @Override
     public Dataset createDataset() throws UnsupportedOperationException {
-    	return new DatasetImpl(this);
+        return new DatasetImpl(this);
     }
-    
+
     @Override
     public IRI createIRI(String iri) {
         IRI result = new IRIImpl(iri);
@@ -101,14 +100,13 @@ public class SimpleRDF implements RDF {
     }
 
     @Override
-    public Triple createTriple(BlankNodeOrIRI subject, IRI predicate,
-                               RDFTerm object) {
+    public Triple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         return new TripleImpl(subject, predicate, object);
     }
-    
+
     @Override
     public Quad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
-    		throws IllegalArgumentException {
-    	return new QuadImpl(graphName, subject, predicate, object);
+            throws IllegalArgumentException {
+        return new QuadImpl(graphName, subject, predicate, object);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java b/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
index fa242b1..144cfe5 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
@@ -34,37 +34,37 @@ import org.apache.commons.rdf.api.Triple;
 @Deprecated
 public class SimpleRDFTermFactory implements RDFTermFactory {
 
-	private SimpleRDF factory = new SimpleRDF();
+    private SimpleRDF factory = new SimpleRDF();
 
-	public BlankNode createBlankNode() {
-		return factory.createBlankNode();
-	}
+    public BlankNode createBlankNode() {
+        return factory.createBlankNode();
+    }
 
-	public BlankNode createBlankNode(String name) {
-		return factory.createBlankNode(name);
-	}
+    public BlankNode createBlankNode(String name) {
+        return factory.createBlankNode(name);
+    }
 
-	public Graph createGraph() {
-		return factory.createGraph();
-	}
+    public Graph createGraph() {
+        return factory.createGraph();
+    }
 
-	public IRI createIRI(String iri) {
-		return factory.createIRI(iri);
-	}
+    public IRI createIRI(String iri) {
+        return factory.createIRI(iri);
+    }
 
-	public Literal createLiteral(String literal) {
-		return factory.createLiteral(literal);
-	}
+    public Literal createLiteral(String literal) {
+        return factory.createLiteral(literal);
+    }
 
-	public Literal createLiteral(String literal, IRI dataType) {
-		return factory.createLiteral(literal, dataType);
-	}
+    public Literal createLiteral(String literal, IRI dataType) {
+        return factory.createLiteral(literal, dataType);
+    }
 
-	public Literal createLiteral(String literal, String language) {
-		return factory.createLiteral(literal, language);
-	}
+    public Literal createLiteral(String literal, String language) {
+        return factory.createLiteral(literal, language);
+    }
 
-	public Triple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-		return factory.createTriple(subject, predicate, object);
-	} 
+    public Triple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+        return factory.createTriple(subject, predicate, object);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/TripleImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/TripleImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/TripleImpl.java
index 1abd905..35ce1cc 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/TripleImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/TripleImpl.java
@@ -39,9 +39,12 @@ final class TripleImpl implements Triple {
      * The objects are not changed. All mapping of BNode objects is done in
      * {@link SimpleRDF#createTriple(BlankNodeOrIRI, IRI, RDFTerm)}.
      *
-     * @param subject   subject of triple
-     * @param predicate predicate of triple
-     * @param object    object of triple
+     * @param subject
+     *            subject of triple
+     * @param predicate
+     *            predicate of triple
+     * @param object
+     *            object of triple
      */
     public TripleImpl(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         this.subject = Objects.requireNonNull(subject);
@@ -66,8 +69,7 @@ final class TripleImpl implements Triple {
 
     @Override
     public String toString() {
-        return getSubject().ntriplesString() + " "
-                + getPredicate().ntriplesString() + " "
+        return getSubject().ntriplesString() + " " + getPredicate().ntriplesString() + " "
                 + getObject().ntriplesString() + " .";
     }
 
@@ -82,8 +84,7 @@ final class TripleImpl implements Triple {
             return false;
         }
         Triple other = (Triple) obj;
-        return getSubject().equals(other.getSubject())
-                && getPredicate().equals(other.getPredicate())
+        return getSubject().equals(other.getSubject()) && getPredicate().equals(other.getPredicate())
                 && getObject().equals(other.getObject());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/413dd09a/simple/src/main/java/org/apache/commons/rdf/simple/Types.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/Types.java b/simple/src/main/java/org/apache/commons/rdf/simple/Types.java
index b6dd8ee..cf4d2e1 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/Types.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/Types.java
@@ -32,14 +32,12 @@ public final class Types implements IRI, SimpleRDF.SimpleRDFTerm {
     /**
      * <tt>http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML</tt>
      */
-    public static final Types RDF_HTML = new Types(
-            "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML");
+    public static final Types RDF_HTML = new Types("http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML");
 
     /**
      * <tt>http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</tt>
      */
-    public static final Types RDF_LANGSTRING = new Types(
-            "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");
+    public static final Types RDF_LANGSTRING = new Types("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");
 
     /**
      * <tt>http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral</tt>
@@ -47,236 +45,197 @@ public final class Types implements IRI, SimpleRDF.SimpleRDFTerm {
      * @deprecated Not used in RDF-1.1
      */
     @Deprecated
-    public static final Types RDF_PLAINLITERAL = new Types(
-            "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral");
+    public static final Types RDF_PLAINLITERAL = new Types("http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral");
 
     /**
      * <tt>http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral</tt>
      */
-    public static final Types RDF_XMLLITERAL = new Types(
-            "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
+    public static final Types RDF_XMLLITERAL = new Types("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#anyURI</tt>
      */
-    public static final Types XSD_ANYURI = new Types(
-            "http://www.w3.org/2001/XMLSchema#anyURI");
+    public static final Types XSD_ANYURI = new Types("http://www.w3.org/2001/XMLSchema#anyURI");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#base64Binary</tt>
      */
-    public static final Types XSD_BASE64BINARY = new Types(
-            "http://www.w3.org/2001/XMLSchema#base64Binary");
+    public static final Types XSD_BASE64BINARY = new Types("http://www.w3.org/2001/XMLSchema#base64Binary");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#boolean</tt>
      */
-    public static final Types XSD_BOOLEAN = new Types(
-            "http://www.w3.org/2001/XMLSchema#boolean");
+    public static final Types XSD_BOOLEAN = new Types("http://www.w3.org/2001/XMLSchema#boolean");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#byte</tt>
      */
-    public static final Types XSD_BYTE = new Types(
-            "http://www.w3.org/2001/XMLSchema#byte");
+    public static final Types XSD_BYTE = new Types("http://www.w3.org/2001/XMLSchema#byte");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#date</tt>
      */
-    public static final Types XSD_DATE = new Types(
-            "http://www.w3.org/2001/XMLSchema#date");
+    public static final Types XSD_DATE = new Types("http://www.w3.org/2001/XMLSchema#date");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#dateTime</tt>
      */
-    public static final Types XSD_DATETIME = new Types(
-            "http://www.w3.org/2001/XMLSchema#dateTime");
+    public static final Types XSD_DATETIME = new Types("http://www.w3.org/2001/XMLSchema#dateTime");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#dayTimeDuration</tt>
      */
-    public static final Types XSD_DAYTIMEDURATION = new Types(
-            "http://www.w3.org/2001/XMLSchema#dayTimeDuration");
+    public static final Types XSD_DAYTIMEDURATION = new Types("http://www.w3.org/2001/XMLSchema#dayTimeDuration");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#decimal</tt>
      */
-    public static final Types XSD_DECIMAL = new Types(
-            "http://www.w3.org/2001/XMLSchema#decimal");
+    public static final Types XSD_DECIMAL = new Types("http://www.w3.org/2001/XMLSchema#decimal");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#double</tt>
      */
-    public static final Types XSD_DOUBLE = new Types(
-            "http://www.w3.org/2001/XMLSchema#double");
+    public static final Types XSD_DOUBLE = new Types("http://www.w3.org/2001/XMLSchema#double");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#duration</tt>
      */
-    public static final Types XSD_DURATION = new Types(
-            "http://www.w3.org/2001/XMLSchema#duration");
+    public static final Types XSD_DURATION = new Types("http://www.w3.org/2001/XMLSchema#duration");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#float</tt>
      */
-    public static final Types XSD_FLOAT = new Types(
-            "http://www.w3.org/2001/XMLSchema#float");
+    public static final Types XSD_FLOAT = new Types("http://www.w3.org/2001/XMLSchema#float");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#gDay</tt>
      */
-    public static final Types XSD_GDAY = new Types(
-            "http://www.w3.org/2001/XMLSchema#gDay");
+    public static final Types XSD_GDAY = new Types("http://www.w3.org/2001/XMLSchema#gDay");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#gMonth</tt>
      */
-    public static final Types XSD_GMONTH = new Types(
-            "http://www.w3.org/2001/XMLSchema#gMonth");
+    public static final Types XSD_GMONTH = new Types("http://www.w3.org/2001/XMLSchema#gMonth");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#gMonthDay</tt>
      */
-    public static final Types XSD_GMONTHDAY = new Types(
-            "http://www.w3.org/2001/XMLSchema#gMonthDay");
+    public static final Types XSD_GMONTHDAY = new Types("http://www.w3.org/2001/XMLSchema#gMonthDay");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#gYear</tt>
      */
-    public static final Types XSD_GYEAR = new Types(
-            "http://www.w3.org/2001/XMLSchema#gYear");
+    public static final Types XSD_GYEAR = new Types("http://www.w3.org/2001/XMLSchema#gYear");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#gYearMonth</tt>
      */
-    public static final Types XSD_GYEARMONTH = new Types(
-            "http://www.w3.org/2001/XMLSchema#gYearMonth");
+    public static final Types XSD_GYEARMONTH = new Types("http://www.w3.org/2001/XMLSchema#gYearMonth");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#hexBinary</tt>
      */
-    public static final Types XSD_HEXBINARY = new Types(
-            "http://www.w3.org/2001/XMLSchema#hexBinary");
+    public static final Types XSD_HEXBINARY = new Types("http://www.w3.org/2001/XMLSchema#hexBinary");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#int</tt>
      */
-    public static final Types XSD_INT = new Types(
-            "http://www.w3.org/2001/XMLSchema#int");
+    public static final Types XSD_INT = new Types("http://www.w3.org/2001/XMLSchema#int");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#integer</tt>
      */
-    public static final Types XSD_INTEGER = new Types(
-            "http://www.w3.org/2001/XMLSchema#integer");
+    public static final Types XSD_INTEGER = new Types("http://www.w3.org/2001/XMLSchema#integer");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#language</tt>
      */
-    public static final Types XSD_LANGUAGE = new Types(
-            "http://www.w3.org/2001/XMLSchema#language");
+    public static final Types XSD_LANGUAGE = new Types("http://www.w3.org/2001/XMLSchema#language");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#long</tt>
      */
-    public static final Types XSD_LONG = new Types(
-            "http://www.w3.org/2001/XMLSchema#long");
+    public static final Types XSD_LONG = new Types("http://www.w3.org/2001/XMLSchema#long");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#Name</tt>
      */
-    public static final Types XSD_NAME = new Types(
-            "http://www.w3.org/2001/XMLSchema#Name");
+    public static final Types XSD_NAME = new Types("http://www.w3.org/2001/XMLSchema#Name");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#NCName</tt>
      */
-    public static final Types XSD_NCNAME = new Types(
-            "http://www.w3.org/2001/XMLSchema#NCName");
+    public static final Types XSD_NCNAME = new Types("http://www.w3.org/2001/XMLSchema#NCName");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#negativeInteger</tt>
      */
-    public static final Types XSD_NEGATIVEINTEGER = new Types(
-            "http://www.w3.org/2001/XMLSchema#negativeInteger");
+    public static final Types XSD_NEGATIVEINTEGER = new Types("http://www.w3.org/2001/XMLSchema#negativeInteger");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#NMTOKEN</tt>
      */
-    public static final Types XSD_NMTOKEN = new Types(
-            "http://www.w3.org/2001/XMLSchema#NMTOKEN");
+    public static final Types XSD_NMTOKEN = new Types("http://www.w3.org/2001/XMLSchema#NMTOKEN");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#nonNegativeInteger</tt>
      */
-    public static final Types XSD_NONNEGATIVEINTEGER = new Types(
-            "http://www.w3.org/2001/XMLSchema#nonNegativeInteger");
+    public static final Types XSD_NONNEGATIVEINTEGER = new Types("http://www.w3.org/2001/XMLSchema#nonNegativeInteger");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#nonPositiveInteger</tt>
      */
-    public static final Types XSD_NONPOSITIVEINTEGER = new Types(
-            "http://www.w3.org/2001/XMLSchema#nonPositiveInteger");
+    public static final Types XSD_NONPOSITIVEINTEGER = new Types("http://www.w3.org/2001/XMLSchema#nonPositiveInteger");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#normalizedString</tt>
      */
-    public static final Types XSD_NORMALIZEDSTRING = new Types(
-            "http://www.w3.org/2001/XMLSchema#normalizedString");
+    public static final Types XSD_NORMALIZEDSTRING = new Types("http://www.w3.org/2001/XMLSchema#normalizedString");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#positiveInteger</tt>
      */
-    public static final Types XSD_POSITIVEINTEGER = new Types(
-            "http://www.w3.org/2001/XMLSchema#positiveInteger");
+    public static final Types XSD_POSITIVEINTEGER = new Types("http://www.w3.org/2001/XMLSchema#positiveInteger");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#short</tt>
      */
-    public static final Types XSD_SHORT = new Types(
-            "http://www.w3.org/2001/XMLSchema#short");
+    public static final Types XSD_SHORT = new Types("http://www.w3.org/2001/XMLSchema#short");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#string</tt>
      */
-    public static final Types XSD_STRING = new Types(
-            "http://www.w3.org/2001/XMLSchema#string");
+    public static final Types XSD_STRING = new Types("http://www.w3.org/2001/XMLSchema#string");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#time</tt>
      */
-    public static final Types XSD_TIME = new Types(
-            "http://www.w3.org/2001/XMLSchema#time");
+    public static final Types XSD_TIME = new Types("http://www.w3.org/2001/XMLSchema#time");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#token</tt>
      */
-    public static final Types XSD_TOKEN = new Types(
-            "http://www.w3.org/2001/XMLSchema#token");
+    public static final Types XSD_TOKEN = new Types("http://www.w3.org/2001/XMLSchema#token");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#unsignedByte</tt>
      */
-    public static final Types XSD_UNSIGNEDBYTE = new Types(
-            "http://www.w3.org/2001/XMLSchema#unsignedByte");
+    public static final Types XSD_UNSIGNEDBYTE = new Types("http://www.w3.org/2001/XMLSchema#unsignedByte");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#unsignedInt</tt>
      */
-    public static final Types XSD_UNSIGNEDINT = new Types(
-            "http://www.w3.org/2001/XMLSchema#unsignedInt");
+    public static final Types XSD_UNSIGNEDINT = new Types("http://www.w3.org/2001/XMLSchema#unsignedInt");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#unsignedLong</tt>
      */
-    public static final Types XSD_UNSIGNEDLONG = new Types(
-            "http://www.w3.org/2001/XMLSchema#unsignedLong");
+    public static final Types XSD_UNSIGNEDLONG = new Types("http://www.w3.org/2001/XMLSchema#unsignedLong");
 
     /**
      * <tt>http://www.w3.org/2001/XMLSchema#unsignedShort</tt>
      */
-    public static final Types XSD_UNSIGNEDSHORT = new Types(
-            "http://www.w3.org/2001/XMLSchema#unsignedShort");
+    public static final Types XSD_UNSIGNEDSHORT = new Types("http://www.w3.org/2001/XMLSchema#unsignedShort");
 
     private static final Set<IRI> ALL_TYPES;
 
@@ -371,9 +330,10 @@ public final class Types implements IRI, SimpleRDF.SimpleRDFTerm {
      * Get the IRI from this collection if it is present, or return
      * {@link Optional#empty()} otherwise.
      *
-     * @param nextIRI The IRI to look for.
+     * @param nextIRI
+     *            The IRI to look for.
      * @return An {@link Optional} containing the IRI from this collection or
-     * {@link Optional#empty()} if it is not present here.
+     *         {@link Optional#empty()} if it is not present here.
      */
     public static Optional<IRI> get(IRI nextIRI) {
         if (ALL_TYPES.contains(nextIRI)) {


Mime
View raw message