You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by st...@apache.org on 2018/02/13 00:45:59 UTC
[1/2] commons-rdf git commit: Cleanup for PMD warnings in -rdf-api
Repository: commons-rdf
Updated Branches:
refs/heads/master 09ae5451e -> eebb6ad6b
Cleanup for PMD warnings in -rdf-api
Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/f998f5d3
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/f998f5d3
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/f998f5d3
Branch: refs/heads/master
Commit: f998f5d3fac68fafe12586a9976d26e7a723cba1
Parents: 4c95437
Author: ajs6f <aj...@apache.org>
Authored: Thu Dec 14 12:53:39 2017 -0500
Committer: ajs6f <aj...@apache.org>
Committed: Thu Dec 14 12:53:39 2017 -0500
----------------------------------------------------------------------
.../org/apache/commons/rdf/api/BlankNode.java | 4 +--
.../java/org/apache/commons/rdf/api/IRI.java | 4 +--
.../org/apache/commons/rdf/api/Literal.java | 4 +--
.../java/org/apache/commons/rdf/api/Quad.java | 4 +--
.../java/org/apache/commons/rdf/api/RDF.java | 20 +++++------
.../org/apache/commons/rdf/api/RDFSyntax.java | 38 ++++++++++----------
.../org/apache/commons/rdf/api/RDFTerm.java | 4 +--
.../java/org/apache/commons/rdf/api/Triple.java | 4 +--
.../commons/rdf/experimental/RDFParser.java | 2 +-
9 files changed, 42 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java
index 73f8afe..c1ff628 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/BlankNode.java
@@ -99,7 +99,7 @@ public interface BlankNode extends BlankNodeOrIRI {
* @see Object#equals(Object)
*/
@Override
- public boolean equals(Object other);
+ boolean equals(Object other);
/**
* Calculate a hash code for this BlankNode.
@@ -115,6 +115,6 @@ public interface BlankNode extends BlankNodeOrIRI {
* @see Object#hashCode()
*/
@Override
- public int hashCode();
+ int hashCode();
}
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/IRI.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/IRI.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/IRI.java
index 673cdc2..75ec994 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/IRI.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/IRI.java
@@ -57,7 +57,7 @@ public interface IRI extends BlankNodeOrIRI {
* @see Object#equals(Object)
*/
@Override
- public boolean equals(Object other);
+ boolean equals(Object other);
/**
* Calculate a hash code for this IRI.
@@ -73,5 +73,5 @@ public interface IRI extends BlankNodeOrIRI {
* @see Object#hashCode()
*/
@Override
- public int hashCode();
+ int hashCode();
}
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Literal.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Literal.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Literal.java
index 89328c7..52d31fc 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Literal.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Literal.java
@@ -120,7 +120,7 @@ public interface Literal extends RDFTerm {
* @see Object#equals(Object)
*/
@Override
- public boolean equals(Object other);
+ boolean equals(Object other);
/**
* Calculate a hash code for this Literal.
@@ -139,6 +139,6 @@ public interface Literal extends RDFTerm {
* @see Objects#hash(Object...)
*/
@Override
- public int hashCode();
+ int hashCode();
}
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Quad.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Quad.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Quad.java
index c007aff..9e75ad6 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Quad.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Quad.java
@@ -217,7 +217,7 @@ public interface Quad extends QuadLike<BlankNodeOrIRI> {
* @see Object#equals(Object)
*/
@Override
- public boolean equals(Object other);
+ boolean equals(Object other);
/**
* Calculate a hash code for this Quad.
@@ -235,6 +235,6 @@ public interface Quad extends QuadLike<BlankNodeOrIRI> {
* @see Objects#hash(Object...)
*/
@Override
- public int hashCode();
+ int hashCode();
}
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDF.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDF.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDF.java
index b942b30..457ee90 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDF.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDF.java
@@ -56,7 +56,7 @@ public interface RDF {
*
* @return A new, unique {@link BlankNode}
*/
- public BlankNode createBlankNode();
+ BlankNode createBlankNode();
/**
* Create a blank node based on the given name.
@@ -81,7 +81,7 @@ public interface RDF {
* node in the context of this {@link RDF}.
* @return A BlankNode for the given name
*/
- public BlankNode createBlankNode(String name);
+ BlankNode createBlankNode(String name);
/**
* Create a new graph.
@@ -91,7 +91,7 @@ public interface RDF {
*
* @return A new Graph
*/
- public Graph createGraph();
+ Graph createGraph();
/**
* Create a new dataset.
@@ -101,7 +101,7 @@ public interface RDF {
*
* @return A new Dataset
*/
- public Dataset createDataset();
+ Dataset createDataset();
/**
* Create an IRI from a (possibly escaped) String.
@@ -117,7 +117,7 @@ public interface RDF {
* If the provided string is not acceptable, e.g. does not
* conform to the RFC3987 syntax.
*/
- public IRI createIRI(String iri) throws IllegalArgumentException;
+ IRI createIRI(String iri) throws IllegalArgumentException;
/**
* Create a simple literal.
@@ -138,7 +138,7 @@ public interface RDF {
* If the provided lexicalForm is not acceptable, e.g. because
* it is too large for an underlying storage.
*/
- public Literal createLiteral(String lexicalForm) throws IllegalArgumentException;
+ Literal createLiteral(String lexicalForm) throws IllegalArgumentException;
/**
* Create a literal with the specified data type.
@@ -170,7 +170,7 @@ public interface RDF {
* If any of the provided arguments are not acceptable, e.g.
* because the provided dataType is not permitted.
*/
- public Literal createLiteral(String lexicalForm, IRI dataType) throws IllegalArgumentException;
+ Literal createLiteral(String lexicalForm, IRI dataType) throws IllegalArgumentException;
/**
* Create a language-tagged literal.
@@ -204,7 +204,7 @@ public interface RDF {
* If the provided values are not acceptable, e.g. because the
* languageTag was syntactically invalid.
*/
- public Literal createLiteral(String lexicalForm, String languageTag) throws IllegalArgumentException;
+ Literal createLiteral(String lexicalForm, String languageTag) throws IllegalArgumentException;
/**
* Create a triple.
@@ -226,7 +226,7 @@ public interface RDF {
* because a Literal has a lexicalForm that is too large for an
* underlying storage.
*/
- public Triple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) throws IllegalArgumentException;
+ Triple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) throws IllegalArgumentException;
/**
* Create a quad.
@@ -252,7 +252,7 @@ public interface RDF {
* because a Literal has a lexicalForm that is too large for an
* underlying storage.
*/
- public Quad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
+ Quad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
throws IllegalArgumentException;
}
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java
index 9e2a22d..00b9408 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java
@@ -45,7 +45,7 @@ public interface RDFSyntax {
* "https://www.w3.org/TR/json-ld/">https://www.w3.org/TR/json-ld/</a>
*
*/
- public static RDFSyntax JSONLD = W3CRDFSyntax.JSONLD;
+ static RDFSyntax JSONLD = W3CRDFSyntax.JSONLD;
/**
* RDF 1.1 Turtle
@@ -54,7 +54,7 @@ public interface RDFSyntax {
* "https://www.w3.org/TR/turtle/">https://www.w3.org/TR/turtle/</a>
*
*/
- public static RDFSyntax TURTLE = W3CRDFSyntax.TURTLE;
+ static RDFSyntax TURTLE = W3CRDFSyntax.TURTLE;
/**
* RDF 1.1 N-Quads
@@ -62,7 +62,7 @@ public interface RDFSyntax {
* @see <a href=
* "https://www.w3.org/TR/n-quads/">https://www.w3.org/TR/n-quads/</a>
*/
- public static RDFSyntax NQUADS = W3CRDFSyntax.NQUADS;
+ static RDFSyntax NQUADS = W3CRDFSyntax.NQUADS;
/**
* RDF 1.1 N-Triples
@@ -70,7 +70,7 @@ public interface RDFSyntax {
* @see <a href=
* "https://www.w3.org/TR/n-triples/">https://www.w3.org/TR/n-triples/</a>
*/
- public static RDFSyntax NTRIPLES = W3CRDFSyntax.NTRIPLES;
+ static RDFSyntax NTRIPLES = W3CRDFSyntax.NTRIPLES;
/**
* HTML+RDFa 1.1 and XHTML+RDFa 1.1
@@ -80,7 +80,7 @@ public interface RDFSyntax {
* @see <a href=
* "https://www.w3.org/TR/xhtml-rdfa/">https://www.w3.org/TR/xhtml-rdfa/</a>
*/
- public static RDFSyntax RDFA = W3CRDFSyntax.RDFA;
+ static RDFSyntax RDFA = W3CRDFSyntax.RDFA;
/**
* RDF 1.1 XML Syntax
@@ -88,7 +88,7 @@ public interface RDFSyntax {
* @see <a href=
* "https://www.w3.org/TR/rdf-syntax-grammar/">https://www.w3.org/TR/rdf-syntax-grammar/</a>
*/
- public static RDFSyntax RDFXML = W3CRDFSyntax.RDFXML;
+ static RDFSyntax RDFXML = W3CRDFSyntax.RDFXML;
/**
* RDF 1.1 TriG
@@ -96,7 +96,7 @@ public interface RDFSyntax {
* @see <a href=
* "https://www.w3.org/TR/trig/">https://www.w3.org/TR/trig/</a>
*/
- public static RDFSyntax TRIG = W3CRDFSyntax.TRIG;
+ static RDFSyntax TRIG = W3CRDFSyntax.TRIG;
/**
* A short name of the RDF Syntax e.g. <code>JSONLD</code>.
@@ -105,7 +105,7 @@ public interface RDFSyntax {
*
* @return Short name for RDF syntax
*/
- public String name();
+ String name();
/**
* The title of the RDF Syntax.
@@ -115,7 +115,7 @@ public interface RDFSyntax {
*
* @return Title of RDF Syntax
*/
- public String title();
+ String title();
/**
* The <a href="https://tools.ietf.org/html/rfc2046">IANA media type</a> for
@@ -128,7 +128,7 @@ public interface RDFSyntax {
*
* @return The registered media type of the RDF Syntax
*/
- public String mediaType();
+ String mediaType();
/**
* Set of <a href="https://tools.ietf.org/html/rfc2046">IANA media types</a> that
@@ -144,7 +144,7 @@ public interface RDFSyntax {
*
* @return The media types corresponding to the RDF Syntax
*/
- default public Set<String> mediaTypes() {
+ default Set<String> mediaTypes() {
return Collections.singleton(mediaType());
}
@@ -156,7 +156,7 @@ public interface RDFSyntax {
*
* @return The registered file extension of the RDF Syntax
*/
- public String fileExtension();
+ String fileExtension();
/**
* Set of file extensions for this RDF syntax, including any non-official extensions.
@@ -168,7 +168,7 @@ public interface RDFSyntax {
*
* @return The file extensions corresponding to the RDF Syntax
*/
- default public Set<String> fileExtensions() {
+ default Set<String> fileExtensions() {
return Collections.singleton(fileExtension());
}
@@ -179,7 +179,7 @@ public interface RDFSyntax {
*
* @return true if this RDF Syntax supports datasets; false otherwise
*/
- public boolean supportsDataset();
+ boolean supportsDataset();
/**
* Return the {@link IRI} that <em>identifies</em> the RDF syntax.
@@ -190,7 +190,7 @@ public interface RDFSyntax {
* @return Identifying IRI, e.g.
* <code>http://www.w3.org/ns/formats/JSON-LD</code>
*/
- public IRI iri();
+ IRI iri();
/**
* Compare this RDFSyntax with another object.
@@ -237,7 +237,7 @@ public interface RDFSyntax {
* @see org.apache.commons.rdf.experimental.RDFParser
*/
- public static Set<RDFSyntax> w3cSyntaxes() {
+ static Set<RDFSyntax> w3cSyntaxes() {
return W3CRDFSyntax.syntaxes;
}
@@ -261,7 +261,7 @@ public interface RDFSyntax {
* {@link Optional#empty()} indicating that no matching syntax was
* found.
*/
- public static Optional<RDFSyntax> byMediaType(final String mediaType) {
+ static Optional<RDFSyntax> byMediaType(final String mediaType) {
final String type = mediaType.toLowerCase(Locale.ROOT).split("\\s*;", 2)[0];
return w3cSyntaxes().stream().filter(t -> t.mediaTypes().contains(type))
.findAny();
@@ -283,7 +283,7 @@ public interface RDFSyntax {
* {@link Optional#empty()} indicating that no matching file
* extension was found.
*/
- public static Optional<RDFSyntax> byFileExtension(final String fileExtension) {
+ static Optional<RDFSyntax> byFileExtension(final String fileExtension) {
final String ext = fileExtension.toLowerCase(Locale.ROOT);
return w3cSyntaxes().stream().filter(t -> t.fileExtensions().contains(ext))
.findAny();
@@ -300,7 +300,7 @@ public interface RDFSyntax {
* a matching {@link RDFSyntax#name()}, otherwise
* {@link Optional#empty()} indicating that no matching name was found.
*/
- public static Optional<RDFSyntax> byName(final String name) {
+ static Optional<RDFSyntax> byName(final String name) {
return w3cSyntaxes().stream().filter(t -> t.name().equals(name)).findAny();
}
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFTerm.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFTerm.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFTerm.java
index dc095b7..faf22c2 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFTerm.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/RDFTerm.java
@@ -83,7 +83,7 @@ public interface RDFTerm {
* @return true if other is a RDFTerm and is equal to this
*/
@Override
- public boolean equals(Object other);
+ boolean equals(Object other);
/**
* Calculate a hash code for this RDFTerm.
@@ -102,6 +102,6 @@ public interface RDFTerm {
* @return a hash code value for this RDFTerm.
*/
@Override
- public int hashCode();
+ int hashCode();
}
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Triple.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Triple.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Triple.java
index 36bd187..7a6e8b7 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Triple.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/Triple.java
@@ -106,7 +106,7 @@ public interface Triple extends TripleLike {
* @see Object#equals(Object)
*/
@Override
- public boolean equals(Object other);
+ boolean equals(Object other);
/**
* Calculate a hash code for this Triple.
@@ -124,6 +124,6 @@ public interface Triple extends TripleLike {
* @see Objects#hash(Object...)
*/
@Override
- public int hashCode();
+ int hashCode();
}
http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/f998f5d3/commons-rdf-api/src/main/java/org/apache/commons/rdf/experimental/RDFParser.java
----------------------------------------------------------------------
diff --git a/commons-rdf-api/src/main/java/org/apache/commons/rdf/experimental/RDFParser.java b/commons-rdf-api/src/main/java/org/apache/commons/rdf/experimental/RDFParser.java
index 83c40db..d5da0d9 100644
--- a/commons-rdf-api/src/main/java/org/apache/commons/rdf/experimental/RDFParser.java
+++ b/commons-rdf-api/src/main/java/org/apache/commons/rdf/experimental/RDFParser.java
@@ -90,7 +90,7 @@ public interface RDFParser {
* This is a marker interface that may be subclassed to include parser
* details, e.g. warning messages or triple counts.
*/
- public interface ParseResult {
+ interface ParseResult {
}
/**
[2/2] commons-rdf git commit: Cleanup for PMD warnings in -rdf-api
Posted by st...@apache.org.
Cleanup for PMD warnings in -rdf-api
Merge commit 'refs/pull/50/head' of https://github.com/apache/commons-rdf
Contributed by @ajs6f
Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/eebb6ad6
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/eebb6ad6
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/eebb6ad6
Branch: refs/heads/master
Commit: eebb6ad6b73501fbdd8da0d34c2e3b6fc979d2bb
Parents: 09ae545 f998f5d
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Feb 13 00:41:56 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Feb 13 00:42:27 2018 +0000
----------------------------------------------------------------------
.../org/apache/commons/rdf/api/BlankNode.java | 4 +--
.../java/org/apache/commons/rdf/api/IRI.java | 4 +--
.../org/apache/commons/rdf/api/Literal.java | 4 +--
.../java/org/apache/commons/rdf/api/Quad.java | 4 +--
.../java/org/apache/commons/rdf/api/RDF.java | 20 +++++------
.../org/apache/commons/rdf/api/RDFSyntax.java | 38 ++++++++++----------
.../org/apache/commons/rdf/api/RDFTerm.java | 4 +--
.../java/org/apache/commons/rdf/api/Triple.java | 4 +--
.../commons/rdf/experimental/RDFParser.java | 2 +-
9 files changed, 42 insertions(+), 42 deletions(-)
----------------------------------------------------------------------