commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [50/50] [abbrv] commons-rdf git commit: Merge branch 'master' into COMMONSRDF-47
Date Thu, 12 Jan 2017 17:36:38 GMT
Merge branch 'master' into COMMONSRDF-47


Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/dc082d14
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/dc082d14
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/dc082d14

Branch: refs/heads/COMMONSRDF-47
Commit: dc082d141eb34b331fe1a42147fdfe580d14d739
Parents: 8dd1664 0e1969a
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Thu Jan 12 17:35:39 2017 +0000
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Thu Jan 12 17:35:39 2017 +0000

----------------------------------------------------------------------
 .travis.yml                                     |   2 +-
 DISCLAIMER                                      |   9 -
 MATURITY.md                                     | 327 ++++++++++
 README.md                                       |  68 +-
 RELEASE-NOTES.txt                               |   8 +-
 RELEASE-PROCESS.md                              |   6 +-
 api/pom.xml                                     |  16 +-
 .../org/apache/commons/rdf/api/Dataset.java     |  18 +-
 .../java/org/apache/commons/rdf/api/Graph.java  |  18 +-
 .../java/org/apache/commons/rdf/api/Quad.java   |   8 +-
 .../org/apache/commons/rdf/api/RDFSyntax.java   |   4 +-
 .../apache/commons/rdf/api/RDFTermFactory.java  |  12 +-
 .../java/org/apache/commons/rdf/api/Triple.java |   3 +
 .../commons/rdf/experimental/RDFParser.java     |   4 +-
 .../commons/rdf/api/AbstractBlankNodeTest.java  |  48 +-
 .../commons/rdf/api/AbstractDatasetTest.java    | 594 +++++++++++++++++
 .../commons/rdf/api/AbstractGraphTest.java      | 106 +--
 .../apache/commons/rdf/api/AbstractRDFTest.java |  72 +--
 .../commons/rdf/api/DefaultDatasetTest.java     |  58 ++
 .../commons/rdf/api/DefaultGraphTest.java       |  78 +++
 .../apache/commons/rdf/api/DefaultQuadTest.java |  47 ++
 .../rdf/api/DefaultRDFTermFactoryTest.java      |  63 ++
 .../apache/commons/rdf/api/DummyDataset.java    | 110 ++++
 .../commons/rdf/api/DummyDatasetTest.java       | 101 +++
 .../org/apache/commons/rdf/api/DummyGraph.java  |  85 +++
 .../apache/commons/rdf/api/DummyGraphTest.java  |  84 +++
 .../org/apache/commons/rdf/api/DummyIRI.java    |  47 ++
 .../apache/commons/rdf/api/DummyIRITest.java    |  56 ++
 .../org/apache/commons/rdf/api/DummyQuad.java   |  63 ++
 .../apache/commons/rdf/api/DummyQuadTest.java   |  58 ++
 .../org/apache/commons/rdf/api/DummyTriple.java |  57 ++
 .../apache/commons/rdf/api/DummyTripleTest.java |  53 ++
 .../apache/commons/rdf/api/RDFSyntaxTest.java   |   6 +
 examples/pom.xml                                |  19 +-
 examples/src/example/IntroToRDF.java            | 149 +++++
 examples/src/example/IntroToRDFTest.java        |  30 +
 integration-tests/pom.xml                       |   7 +-
 .../rdf/integrationtests/AllToAllTest.java      |  56 +-
 jena/pom.xml                                    |  18 +-
 .../commons/rdf/jena/ConversionException.java   |   6 +-
 .../org/apache/commons/rdf/jena/JenaRDF.java    | 146 +++--
 .../rdf/jena/experimental/JenaRDFParser.java    |  22 +-
 .../rdf/jena/impl/AbstractJenaRDFTerm.java      |   8 +-
 .../commons/rdf/jena/impl/AbstractQuadLike.java |  12 +-
 .../rdf/jena/impl/InternalJenaFactory.java      |  53 +-
 .../rdf/jena/impl/JenaBlankNodeImpl.java        |  17 +-
 .../commons/rdf/jena/impl/JenaDatasetImpl.java  |  57 +-
 .../jena/impl/JenaGeneralizedQuadLikeImpl.java  |   4 +-
 .../impl/JenaGeneralizedTripleLikeImpl.java     |   4 +-
 .../commons/rdf/jena/impl/JenaGraphImpl.java    |  42 +-
 .../commons/rdf/jena/impl/JenaIRIImpl.java      |  17 +-
 .../commons/rdf/jena/impl/JenaLiteralImpl.java  |  20 +-
 .../commons/rdf/jena/impl/JenaQuadImpl.java     |  14 +-
 .../commons/rdf/jena/impl/JenaTripleImpl.java   |  17 +-
 jena/src/site/resources/profile.jacoco          |   0
 .../commons/rdf/jena/DatasetJenaTest.java       |  31 +
 .../commons/rdf/jena/JenaServiceLoaderTest.java |   4 +-
 .../commons/rdf/jena/TestBlankNodeJena.java     |   2 +-
 .../jena/TestJenaGraphToCommonsRDFGraph.java    |  30 +-
 .../commons/rdf/jena/TestRDFParserBuilder.java  |   4 +-
 jsonld-java/pom.xml                             |  15 +-
 .../commons/rdf/jsonldjava/JsonLdBlankNode.java |  13 +-
 .../commons/rdf/jsonldjava/JsonLdDataset.java   |  27 +-
 .../commons/rdf/jsonldjava/JsonLdGraph.java     |  24 +-
 .../commons/rdf/jsonldjava/JsonLdGraphLike.java |  47 +-
 .../commons/rdf/jsonldjava/JsonLdIRI.java       |   8 +-
 .../commons/rdf/jsonldjava/JsonLdLiteral.java   |  10 +-
 .../commons/rdf/jsonldjava/JsonLdQuad.java      |   6 +-
 .../commons/rdf/jsonldjava/JsonLdQuadLike.java  |   7 +-
 .../commons/rdf/jsonldjava/JsonLdRDF.java       |  56 +-
 .../commons/rdf/jsonldjava/JsonLdTerm.java      |   9 +-
 .../commons/rdf/jsonldjava/JsonLdTriple.java    |   6 +-
 .../rdf/jsonldjava/JsonLdUnionGraph.java        |  18 +-
 .../jsonldjava/experimental/JsonLdParser.java   |  28 +-
 jsonld-java/src/site/resources/profile.jacoco   |   0
 .../rdf/jsonldjava/JsonLdBlankNodeTest.java     |   2 +-
 .../rdf/jsonldjava/JsonLdDatasetTest.java       |  30 +
 .../rdf/jsonldjava/JsonLdParserBuilderTest.java |  14 +-
 .../rdf/jsonldjava/JsonLdServiceLoaderTest.java |   4 +-
 pom.xml                                         | 267 ++++----
 rdf4j/pom.xml                                   |  18 +-
 .../org/apache/commons/rdf/rdf4j/RDF4J.java     |  90 +--
 .../rdf/rdf4j/experimental/RDF4JParser.java     |  55 +-
 .../commons/rdf/rdf4j/impl/AbstractRDFTerm.java |   3 +-
 .../rdf4j/impl/AbstractRepositoryGraphLike.java |   5 +-
 .../commons/rdf/rdf4j/impl/BlankNodeImpl.java   |  20 +-
 .../rdf/rdf4j/impl/ConvertedStatements.java     |  12 +-
 .../apache/commons/rdf/rdf4j/impl/IRIImpl.java  |   9 +-
 .../rdf/rdf4j/impl/InternalRDF4JFactory.java    |  20 +-
 .../commons/rdf/rdf4j/impl/LiteralImpl.java     |   9 +-
 .../commons/rdf/rdf4j/impl/ModelGraphImpl.java  |  29 +-
 .../apache/commons/rdf/rdf4j/impl/QuadImpl.java |  22 +-
 .../rdf/rdf4j/impl/RepositoryDatasetImpl.java   | 101 ++-
 .../rdf/rdf4j/impl/RepositoryGraphImpl.java     |  71 +-
 .../commons/rdf/rdf4j/impl/TripleImpl.java      |  10 +-
 rdf4j/src/site/resources/profile.jacoco         |   0
 .../apache/commons/rdf/rdf4j/BlankNodeTest.java |   2 +-
 .../apache/commons/rdf/rdf4j/DatasetTest.java   |  30 +
 .../commons/rdf/rdf4j/MemoryGraphTest.java      |  28 +-
 .../commons/rdf/rdf4j/NativeStoreGraphTest.java |  30 +-
 .../rdf/rdf4j/RDF4JServiceLoaderTest.java       |   4 +-
 simple/pom.xml                                  |  16 +-
 .../commons/rdf/simple/BlankNodeImpl.java       |   8 +-
 .../commons/rdf/simple/DatasetGraphView.java    |  20 +-
 .../apache/commons/rdf/simple/DatasetImpl.java  |  64 +-
 .../apache/commons/rdf/simple/GraphImpl.java    |  47 +-
 .../org/apache/commons/rdf/simple/IRIImpl.java  |   6 +-
 .../apache/commons/rdf/simple/LiteralImpl.java  |  14 +-
 .../org/apache/commons/rdf/simple/QuadImpl.java |   6 +-
 .../apache/commons/rdf/simple/SimpleRDF.java    |  16 +-
 .../rdf/simple/SimpleRDFTermFactory.java        |  22 +-
 .../apache/commons/rdf/simple/TripleImpl.java   |   6 +-
 .../org/apache/commons/rdf/simple/Types.java    |  10 +-
 .../simple/experimental/AbstractRDFParser.java  |  62 +-
 .../simple/experimental/RDFParseException.java  |  10 +-
 .../commons/rdf/simple/BlankNodeImplTest.java   |   2 +-
 .../rdf/simple/DummyRDFParserBuilder.java       |   6 +-
 .../commons/rdf/simple/SimpleDatasetTest.java   |  48 ++
 .../rdf/simple/SimpleNoRelativeIRIRDTest.java   |  45 --
 .../rdf/simple/SimpleServiceLoaderTest.java     |   4 +-
 .../commons/rdf/simple/TestWritingGraph.java    |  34 +-
 .../experimental/AbstractRDFParserTest.java     |  60 +-
 src/assembly/src.xml                            |   1 -
 src/site/markdown/contributing.md               |  31 +-
 src/site/markdown/download.md                   |  71 +-
 src/site/markdown/implementations.md            |  46 +-
 src/site/markdown/index.md                      |  41 +-
 src/site/markdown/introduction.md               | 645 +++++++++++++++++++
 src/site/markdown/userguide.md                  |  16 +-
 src/site/resources/images/class-diagram.nomnoml |   9 +-
 src/site/resources/images/class-diagram.png     | Bin 56161 -> 71605 bytes
 src/site/resources/images/rdf-01.svg            |  30 +
 src/site/resources/images/rdf-02.svg            |  31 +
 src/site/site.xml                               |  13 +-
 134 files changed, 4369 insertions(+), 1308 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/dc082d14/api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java
----------------------------------------------------------------------
diff --cc api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java
index 0a6913d,2948437..0d2f0b0
--- a/api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java
@@@ -194,10 -167,9 +194,10 @@@ public interface RDFSyntax 
       *         {@link Optional#empty()} indicating that no matching syntax was
       *         found.
       */
-     public static Optional<RDFSyntax> byMediaType(String mediaType) {
+     public static Optional<RDFSyntax> byMediaType(final String mediaType) {
 -        final String type = mediaType.toLowerCase(Locale.ENGLISH).split("\\s*[;,]", 2)[0];
 -        return Arrays.stream(RDFSyntax.values()).filter(t -> t.mediaType.equals(type)).findAny();
 +        final String type = mediaType.toLowerCase(Locale.ROOT).split("\\s*;", 2)[0];
 +        return w3cSyntaxes().stream().filter(t -> t.mediaType().equals(type))
 +                .findAny();
      }
  
      /**
@@@ -217,34 -186,9 +217,34 @@@
       *         {@link Optional#empty()} indicating that no matching file
       *         extension was found.
       */
-     public static Optional<RDFSyntax> byFileExtension(String fileExtension) {
+     public static Optional<RDFSyntax> byFileExtension(final String fileExtension)
{
 -        final String ext = fileExtension.toLowerCase(Locale.ENGLISH);
 -        return Arrays.stream(RDFSyntax.values()).filter(t -> t.fileExtension.equals(ext)).findAny();
 +        final String ext = fileExtension.toLowerCase(Locale.ROOT);        
 +        return w3cSyntaxes().stream().filter(t -> t.fileExtension().equals(ext))
 +                .findAny();
      }
 -
 -}
 +    
 +    /**
 +     * Compare this RDFSyntax with another object.
 +     * <p>
 +     * Two {@link RDFSyntax}es are considered equal if their
 +     * {@link #mediaType()}s are equal when compared as lower case strings
 +     * according to {@link String#toLowerCase(Locale)} with the locale
 +     * {@link Locale#ROOT}.
 +     * 
 +     * @param obj
 +     * @return
 +     */
 +    @Override
 +    boolean equals(Object obj);
 +    
 +    /**
 +     * The hash code of an RDFSyntax is equivalent to the hash code 
 +     * of the {@link #mediaType()} in lower case according to
 +     * {@link String#toLowerCase(Locale)} with the locale
 +     * {@link Locale#ROOT}. 
 +     * 
 +     * @return Hash code of RDFSyntax
 +     */
 +    @Override
 +    int hashCode();
 +}

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/dc082d14/api/src/test/java/org/apache/commons/rdf/api/RDFSyntaxTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/dc082d14/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
----------------------------------------------------------------------
diff --cc jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
index 036e084,92c0adb..351623a
--- a/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
@@@ -550,8 -554,8 +554,8 @@@ public final class JenaRDF implements R
       *            {@link RDFSyntax} to convert
       * @return Matched {@link Lang}, otherwise {@link Optional#empty()}
       */
-     public Optional<Lang> asJenaLang(RDFSyntax rdfSyntax) {
+     public Optional<Lang> asJenaLang(final RDFSyntax rdfSyntax) {
 -        return Optional.ofNullable(RDFLanguages.contentTypeToLang(rdfSyntax.mediaType));
 +        return Optional.ofNullable(RDFLanguages.contentTypeToLang(rdfSyntax.mediaType()));
      }
  
      /**

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/dc082d14/simple/src/main/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParser.java
----------------------------------------------------------------------
diff --cc simple/src/main/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParser.java
index 62fe79c,1157dc5..a9af156
--- a/simple/src/main/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParser.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParser.java
@@@ -237,10 -237,10 +237,10 @@@ public abstract class AbstractRDFParser
      }
  
      @Override
-     public T contentType(RDFSyntax rdfSyntax) throws IllegalArgumentException {
-         AbstractRDFParser<T> c = clone();
+     public T contentType(final RDFSyntax rdfSyntax) throws IllegalArgumentException {
+         final AbstractRDFParser<T> c = clone();
          c.contentTypeSyntax = Optional.ofNullable(rdfSyntax);
 -        c.contentType = c.contentTypeSyntax.map(syntax -> syntax.mediaType);
 +        c.contentType = c.contentTypeSyntax.map(syntax -> syntax.mediaType());
          return c.asT();
      }
  


Mime
View raw message