You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2015/04/28 11:05:05 UTC

[1/6] incubator-commonsrdf git commit: User guide: consistent variable names across

Repository: incubator-commonsrdf
Updated Branches:
  refs/heads/master f50f69b4e -> ac0e15210


User guide: consistent variable names across

See
https://gist.github.com/stain/3c310f87c4465541be66


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

Branch: refs/heads/master
Commit: ea87677814bfb0883e7f35684fb03e691bd705fe
Parents: f50f69b
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Apr 28 03:08:33 2015 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Apr 28 03:08:33 2015 +0100

----------------------------------------------------------------------
 src/site/markdown/userguide.md | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/ea876778/src/site/markdown/userguide.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/userguide.md b/src/site/markdown/userguide.md
index f365265..05ca8a5 100644
--- a/src/site/markdown/userguide.md
+++ b/src/site/markdown/userguide.md
@@ -122,7 +122,7 @@ _simple_ implementation, you can construct the
 import org.apache.commons.rdf.api.*;
 import org.apache.commons.rdf.simple.SimpleRDFTermFactory;
 // ...
-RDFTermFactory rdfTermFactory = new SimpleRDFTermFactory();
+RDFTermFactory factory = new SimpleRDFTermFactory();
 ```
 
 Using the factory you can construct
@@ -132,15 +132,15 @@ any [RDFTerm](apidocs/org/apache/commons/rdf/api/RDFTerm.html), e.g. to create a
 [Literal](apidocs/org/apache/commons/rdf/api/Literal.html):
 
 ```java
-BlankNode blankNode = factory.createBlankNode();
-IRI iri = factory.createIRI("http://example.com/name");
-Literal literal = factory.createLiteral("Alice");
+BlankNode aliceBlankNode = factory.createBlankNode();
+IRI nameIri = factory.createIRI("http://example.com/name");
+Literal aliceLiteral = factory.createLiteral("Alice");
 ```
 
 You can also create a stand-alone [Triple](apidocs/org/apache/commons/rdf/api/Triple.html):
 
 ```java
-Triple triple = factory.createTriple(blankNode, iri, literal);
+Triple triple = factory.createTriple(aliceBlankNode, nameIri, aliceLiteral);
 ```
 
 
@@ -197,6 +197,8 @@ places no such formal requirement on the `.toString()` method. Clients that
 rely on a canonical N-Triples-compatible string should instead use
 `ntriplesString()`._
 
+<!-- Not relevant here
+
 As an example of using `ntriplesString()`, here is how one could write a basic
 N-Triples-compatible serialization of a
 [Graph](apidocs/org/apache/commons/rdf/api/Graph.html):
@@ -220,6 +222,7 @@ Example output:
 > `_:ef136d20-f1ee-3830-a54b-cd5e489d50fb <http://example.com/name> "Alice" .`
 >
 > `<http://example.com/bob> <http://example.com/name> "Bob" .`
+-->
 
 ### IRI
 
@@ -307,7 +310,7 @@ to itself:
 
 ```java
 System.out.println(bnode.equals(bnode));
-System.out.println(bnode.equals(factory.createBlankNode()))
+System.out.println(bnode.equals(factory.createBlankNode()));
 ```
 
 > `true`
@@ -343,7 +346,7 @@ returns a `BlankNode` which are
 to the previous b1:
 
 ```java
-System.out.println(b1.equals(factory.createBlankNode("b1")))
+System.out.println(b1.equals(factory.createBlankNode("b1")));
 System.out.println(b1.equals(new SimpleRDFTermFactory().createBlankNode("b1")));
 ```
 
@@ -366,7 +369,7 @@ For that purpose, BlankNode exposes the
 method:
 
 ```java
-System.out.println(bnode.internalIdentifier())
+System.out.println(bnode.internalIdentifier());
 ```
 
 > `735d5e63-96a4-488b-8613-7037b82c74a5`
@@ -455,8 +458,8 @@ first create the datatype `IRI` and pass it to the expanded
 
 ```java
 IRI xsdDouble = factory.createIRI("http://www.w3.org/2001/XMLSchema#double");
-Literal typedLiteral = factory.createLiteral("13.37", xsdDouble);
-System.out.println(typedLiteral.ntriplesString());
+Literal literalDouble = factory.createLiteral("13.37", xsdDouble);
+System.out.println(literalDouble.ntriplesString());
 ```
 
 > `"13.37"^^<http://www.w3.org/2001/XMLSchema#double>`
@@ -472,7 +475,7 @@ XML Schema datatypes like `xsd:dateTime` and `xsd:float`. Using `Types`,
 the above example can be simplified to:
 
 ```java
-Literal typedLiteral = factory.createLiteral("13.37", Types.XSD_DOUBLE);
+Literal literalDouble2 = factory.createLiteral("13.37", Types.XSD_DOUBLE);
 ```
 
 As the constants in `Types` are all instances of `IRI`, they can 
@@ -652,8 +655,9 @@ _subject/predicate/object_ form of
 
 ```java
 IRI bob = factory.createIRI("http://example.com/bob");
+IRI nameIri = factory.createIRI("http://example.com/name");
 Literal bobName = factory.createLiteral("Bob");
-graph.add(bob, iri, bobName);
+graph.add(bob, nameIRI, bobName);
 ```
 
 It is not necessary to check if a triple already exist in the graph, as the
@@ -676,7 +680,7 @@ can be used without needing to create a `Triple` first, and also
 allow `null` as a wildcard parameters:
 
 ```java
-System.out.println(graph.contains(null, iri, bobName));
+System.out.println(graph.contains(null, nameIri, bobName));
 ```
 > `true`
 
@@ -768,7 +772,7 @@ can be used without needing to construct a `Triple` first. It also
 allow `null` as a wildcard pattern:
 
 ```java
-graph.remove(null, iri, null);
+graph.remove(null, nameIri, null);
 ```
 
 To remove all triples, use [clear](apidocs/org/apache/commons/rdf/api/Graph.html#clear--):


[6/6] incubator-commonsrdf git commit: Link to complete example

Posted by st...@apache.org.
Link to complete example


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

Branch: refs/heads/master
Commit: ac0e1521015b973335eed9162b64c88c68f8d784
Parents: 7045a2c
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Apr 28 10:03:40 2015 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Apr 28 10:04:27 2015 +0100

----------------------------------------------------------------------
 src/site/markdown/userguide.md | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/ac0e1521/src/site/markdown/userguide.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/userguide.md b/src/site/markdown/userguide.md
index 1a493b0..f3bd0c3 100644
--- a/src/site/markdown/userguide.md
+++ b/src/site/markdown/userguide.md
@@ -46,6 +46,7 @@ Commons RDF [API](apidocs/).
 * [Mutability and thread safety](#Mutability_and_thread_safety)
 * [Implementations](#Implementations)
     * [Cross-compatibility](#Cross-compatibility)
+* [Complete example](#Complete_example)
 
 ## Introduction
 
@@ -913,3 +914,13 @@ special care should be taken for cross-interoperability within hashing data
 structures like `HashMap`. See
 [COMMONSRDF-14](https://issues.apache.org/jira/browse/COMMONSRDF-14)
 
+# Complete example
+
+The complete source code for the examples used in this user guide can be
+browsed in
+[UserGuideTest.java](https://github.com/apache/incubator-commonsrdf/blob/master/examples/src/example/UserGuideTest.java)
+within the
+[examples](https://github.com/apache/incubator-commonsrdf/tree/master/examples)
+folder of the
+Commons RDF source code repository.
+


[3/6] incubator-commonsrdf git commit: Source code of examples from User guide

Posted by st...@apache.org.
Source code of examples from User guide

See
http://mail-archives.apache.org/mod_mbox/commonsrdf-dev/201504.mbox/%3CCAOfJQJ0ifthZMeFna6jMPCcZGdaGaKVwc2djuJMi02Vz1odPvg%40mail.gmail.com%3E

NOT part of the build as it should not be released
to Maven Central.  Also non-Apache groupId, package etc.
as it is just an example.

TODO: Some kind of way to include the <module> in the <profile>
when it is NOT the -Papache-release profile? Would be great
if the <version> were automatically maintained or at least
the test regularly run in development build.


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

Branch: refs/heads/master
Commit: d57f8ce11c5a9042f697365ed9921beff50cc3ef
Parents: f60969b
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Apr 28 09:57:53 2015 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Apr 28 09:57:53 2015 +0100

----------------------------------------------------------------------
 examples/README.md                      |  36 +++++
 examples/pom.xml                        |  80 ++++++++++
 examples/src/example/UserGuideTest.java | 219 +++++++++++++++++++++++++++
 3 files changed, 335 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/d57f8ce1/examples/README.md
----------------------------------------------------------------------
diff --git a/examples/README.md b/examples/README.md
new file mode 100644
index 0000000..6d970e4
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,36 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+# Examples of using Commons RDF
+
+[UserGuideTest.java](src/example/UserGuideTest.java) contains the source code
+of the examples in the 
+[Commons RDF user guide](http://commonsrdf.incubator.apache.org/userguide.html).
+
+## Usage
+
+Update [pom.xml](pom.xml) to the latest versions of `commons-rdf-api`
+and `commons-rdf-simple`.
+
+Ensure you have Java 8 installed and configured as `JAVA_HOME`.
+
+Use [Apache Maven 3](http://maven.apache.org/download.cgi) and run:
+
+    mvn clean install

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/d57f8ce1/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
new file mode 100644
index 0000000..9ed3b90
--- /dev/null
+++ b/examples/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <!-- NOTE: Deliberately not using parent pom and separate groupId/artifactId
+    
+    This module should not be built as part of a release.  
+    -->
+    
+    <groupId>com.example</groupId> <!--  Change to your groupId -->
+    <artifactId>commons-rdf-examples</artifactId> <!-- Change to your artifactId -->
+    <version>0.1-SNAPSHOT</version>
+
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+    <build>
+      <!-- simplify folder structure for this example -
+           real projects should use regular
+           src/main/java
+           src/test/java
+      -->
+      <testSourceDirectory>src</testSourceDirectory>
+      <sourceDirectory>src-2</sourceDirectory> <!-- not used -->
+    </build>
+
+
+    <dependencies>
+    	<dependency>
+    		<groupId>org.apache.commons</groupId>
+    		<artifactId>commons-rdf-api</artifactId>
+        <!-- update to latest version -->
+    		<version>0.1-incubating-SNAPSHOT</version>
+    	</dependency>
+    	<dependency>
+    		<groupId>org.apache.commons</groupId>
+    		<artifactId>commons-rdf-simple</artifactId>
+        <!-- update to latest version -->
+    		<version>0.1.0-incubating-SNAPSHOT</version>
+    	</dependency>
+    	<dependency>
+    		<groupId>junit</groupId>
+    		<artifactId>junit</artifactId>
+    		<version>4.12</version>
+    		<scope>test</scope>
+    	</dependency>
+    </dependencies>
+    <repositories>
+      <!-- Only needed if testing -SNAPSHOT release of commons-rdf -->
+    	<repository>
+    		<id>apache.snapshots</id>
+    		<name>Apache Snapshot Repository</name>
+    		<url>http://repository.apache.org/snapshots</url>
+    		<releases>
+    			<enabled>false</enabled>
+    		</releases>
+    	</repository>
+    </repositories>
+    <name>Commons RDF: Examples</name>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/d57f8ce1/examples/src/example/UserGuideTest.java
----------------------------------------------------------------------
diff --git a/examples/src/example/UserGuideTest.java b/examples/src/example/UserGuideTest.java
new file mode 100644
index 0000000..1bf80d8
--- /dev/null
+++ b/examples/src/example/UserGuideTest.java
@@ -0,0 +1,219 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package example;
+
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.commons.rdf.api.BlankNode;
+import org.apache.commons.rdf.api.BlankNodeOrIRI;
+import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.IRI;
+import org.apache.commons.rdf.api.Literal;
+import org.apache.commons.rdf.api.RDFTerm;
+import org.apache.commons.rdf.api.RDFTermFactory;
+import org.apache.commons.rdf.api.Triple;
+import org.apache.commons.rdf.simple.SimpleRDFTermFactory;
+import org.apache.commons.rdf.simple.Types;
+import org.junit.Before;
+import org.junit.Test;
+
+public class UserGuideTest {
+
+	private RDFTermFactory factory;
+
+	@Before
+	public void factory() {
+		factory = new SimpleRDFTermFactory();
+	}
+
+	@Test
+	public void creating() throws Exception {
+		BlankNode aliceBlankNode = factory.createBlankNode();
+		IRI nameIri = factory.createIRI("http://example.com/name");
+		Literal aliceLiteral = factory.createLiteral("Alice");
+		Triple triple = factory.createTriple(aliceBlankNode, nameIri, aliceLiteral);
+
+		System.out.println(aliceBlankNode.ntriplesString());
+		System.out.println(nameIri.ntriplesString());
+		System.out.println(aliceLiteral.ntriplesString());
+
+	}
+
+	@Test
+	public void ntriples() throws Exception {
+		IRI iri = factory.createIRI("http://example.com/alice");
+		System.out.println(iri.getIRIString());
+
+		IRI iri2 = factory.createIRI("http://example.com/alice");
+		System.out.println(iri.equals(iri2));
+
+		IRI iri3 = factory.createIRI("http://example.com/alice/./");
+		System.out.println(iri.equals(iri3));
+
+		System.out.println(iri.equals("http://example.com/alice"));
+		System.out.println(iri.equals(factory.createLiteral("http://example.com/alice")));
+
+	}
+
+	@Test
+	public void blanknode() throws Exception {
+		BlankNode bnode = factory.createBlankNode();
+		System.out.println(bnode.equals(bnode));
+		System.out.println(bnode.equals(factory.createBlankNode()));
+
+		BlankNode b1 = factory.createBlankNode("b1");
+
+		System.out.println(b1.ntriplesString());
+
+		System.out.println(b1.equals(factory.createBlankNode("b1")));
+		System.out.println(b1.equals(new SimpleRDFTermFactory().createBlankNode("b1")));
+
+		System.out.println(bnode.internalIdentifier());
+	}
+
+	@Test
+	public void literal() throws Exception {
+		Literal literal = factory.createLiteral("Hello world!");
+		System.out.println(literal.ntriplesString());
+
+		String lexical = literal.getLexicalForm();
+		System.out.println(lexical);
+
+		IRI datatype = literal.getDatatype();
+		System.out.println(datatype.ntriplesString());
+
+		IRI xsdDouble = factory.createIRI("http://www.w3.org/2001/XMLSchema#double");
+		Literal literalDouble = factory.createLiteral("13.37", xsdDouble);
+		System.out.println(literalDouble.ntriplesString());
+
+		Literal literalDouble2 = factory.createLiteral("13.37", Types.XSD_DOUBLE);
+
+		System.out.println(literal.getDatatype().equals(Types.XSD_STRING));
+
+		Literal inSpanish = factory.createLiteral("¡Hola, Mundo!", "es");
+		System.out.println(inSpanish.ntriplesString());
+		System.out.println(inSpanish.getLexicalForm());
+		System.out.println(inSpanish.getDatatype().ntriplesString());
+
+		Optional<String> tag = inSpanish.getLanguageTag();
+		if (tag.isPresent()) {
+		    System.out.println(tag.get());
+		}
+
+		System.out.println(literal.getLanguageTag().isPresent());
+		System.out.println(literalDouble.getLanguageTag().isPresent());
+	}
+
+	@Test
+	public void triple() throws Exception {
+		BlankNodeOrIRI subject = factory.createBlankNode();
+		IRI predicate = factory.createIRI("http://example.com/says");
+		RDFTerm object = factory.createLiteral("Hello");
+		Triple triple = factory.createTriple(subject, predicate, object);
+
+		BlankNodeOrIRI subj = triple.getSubject();
+		System.out.println(subj.ntriplesString());
+
+		IRI pred = triple.getPredicate();
+		System.out.println(pred.getIRIString());
+
+		RDFTerm obj = triple.getObject();
+		System.out.println(obj.ntriplesString());
+
+		if (subj instanceof IRI) {
+		    String s = ((IRI) subj).getIRIString();
+		    System.out.println(s);
+		}
+		// ..
+		if (obj instanceof Literal) {
+		    IRI type = ((Literal) obj).getDatatype();
+		    System.out.println(type);
+		}
+
+		System.out.println(triple.equals(factory.createTriple(subj, pred, obj)));
+	}
+
+
+	@Test
+	public void graph() throws Exception {
+		IRI nameIri = factory.createIRI("http://example.com/name");
+		BlankNode aliceBlankNode = factory.createBlankNode();
+		Literal aliceLiteral = factory.createLiteral("Alice");
+		Triple triple = factory.createTriple(aliceBlankNode, nameIri, aliceLiteral);
+
+		Graph graph = factory.createGraph();
+
+		graph.add(triple);
+
+		IRI bob = factory.createIRI("http://example.com/bob");
+		Literal bobName = factory.createLiteral("Bob");
+		graph.add(bob, nameIri, bobName);
+
+
+		System.out.println(graph.contains(triple));
+
+
+		System.out.println(graph.contains(null, nameIri, bobName));
+
+		System.out.println(graph.size());
+
+		for (Triple t : graph.iterate()) {
+			System.out.println(t.getObject());
+		}
+
+
+		for (Triple t : graph.iterate(null, null, bobName)) {
+			System.out.println(t.getPredicate());
+		}
+
+		Stream<RDFTerm> subjects = graph.getTriples().map(t -> t.getObject());
+		String s = subjects.map(RDFTerm::ntriplesString).collect(Collectors.joining(" "));
+		System.out.println(s);
+
+		Stream<? extends Triple> namedB = graph.getTriples(null, nameIri,null).
+				filter(t -> t.getObject().ntriplesString().contains("B"));
+		System.out.println(namedB.map(t -> t.getSubject()).findAny().get());
+
+		graph.remove(triple);
+		System.out.println(graph.contains(triple));
+
+		graph.remove(null, nameIri, null);
+
+		graph.clear();
+		System.out.println(graph.contains(null, null, null));
+
+
+	}
+
+
+    public static String tripleAsString(Triple t) {
+        return t.getSubject().ntriplesString() + " "
+                + t.getPredicate().ntriplesString() + " " +
+                t.getObject().ntriplesString() + " .";
+    }
+
+	public static void writeGraph(Graph graph, Path graphFile) throws Exception {
+        Stream<CharSequence> stream = graph.getTriples().map(UserGuideTest::tripleAsString);
+        Files.write(graphFile, stream::iterator, Charset.forName("UTF-8"));
+	}
+}


[5/6] incubator-commonsrdf git commit: Posted by st...@apache.org.
<?xml header line of pom.xml


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

Branch: refs/heads/master
Commit: 7045a2c1b3ec225936ddd68aeebab3b059470b46
Parents: 35e31d6
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Apr 28 10:00:35 2015 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Apr 28 10:00:35 2015 +0100

----------------------------------------------------------------------
 api/pom.xml    | 1 +
 simple/pom.xml | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/7045a2c1/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index 4b2fb10..6544b28 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
     Licensed to the Apache Software Foundation (ASF) under one

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/7045a2c1/simple/pom.xml
----------------------------------------------------------------------
diff --git a/simple/pom.xml b/simple/pom.xml
index 2d08ca9..50c9ca0 100644
--- a/simple/pom.xml
+++ b/simple/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
     Licensed to the Apache Software Foundation (ASF) under one


[2/6] incubator-commonsrdf git commit: Apache headers in website

Posted by st...@apache.org.
Apache headers in website

.. keep mvn apache-rat:check happy


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

Branch: refs/heads/master
Commit: f60969bee834cb76b8d3a69b6ef1a4b56fb71347
Parents: ea87677
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Apr 28 09:56:54 2015 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Apr 28 09:57:16 2015 +0100

----------------------------------------------------------------------
 SITE.md                              | 20 ++++++++++++++++++++
 src/site/markdown/contributing.md    | 20 ++++++++++++++++++++
 src/site/markdown/download.md        | 20 ++++++++++++++++++++
 src/site/markdown/implementations.md | 20 ++++++++++++++++++++
 src/site/markdown/index.md           | 20 ++++++++++++++++++++
 src/site/markdown/userguide.md       | 20 ++++++++++++++++++++
 6 files changed, 120 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f60969be/SITE.md
----------------------------------------------------------------------
diff --git a/SITE.md b/SITE.md
index 519d110..7bf2d51 100644
--- a/SITE.md
+++ b/SITE.md
@@ -1,3 +1,23 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
 # Commons RDF Site
 
 Some common tasks:

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f60969be/src/site/markdown/contributing.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/contributing.md b/src/site/markdown/contributing.md
index e8ed082..0f649ff 100644
--- a/src/site/markdown/contributing.md
+++ b/src/site/markdown/contributing.md
@@ -1,3 +1,23 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
 # Contribute
 
 Contributions to this project will be gratefully received.

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f60969be/src/site/markdown/download.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/download.md b/src/site/markdown/download.md
index 978cf33..7159257 100644
--- a/src/site/markdown/download.md
+++ b/src/site/markdown/download.md
@@ -1,3 +1,23 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
 # Download Commons RDF
 
 Nothing to see here for now...

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f60969be/src/site/markdown/implementations.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/implementations.md b/src/site/markdown/implementations.md
index fea7840..0b52e3b 100644
--- a/src/site/markdown/implementations.md
+++ b/src/site/markdown/implementations.md
@@ -1,3 +1,23 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
 # Implementations
 
 As a set of Java interfaces, Commons RDF must be used with one or more

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f60969be/src/site/markdown/index.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md
index 99f5a2c..ec09f14 100644
--- a/src/site/markdown/index.md
+++ b/src/site/markdown/index.md
@@ -1,3 +1,23 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
 # Apache Commons RDF (incubating)
 
 <div class="alert alert-info" role="alert">

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f60969be/src/site/markdown/userguide.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/userguide.md b/src/site/markdown/userguide.md
index 05ca8a5..1a493b0 100644
--- a/src/site/markdown/userguide.md
+++ b/src/site/markdown/userguide.md
@@ -1,3 +1,23 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
 # User Guide
 
 This page shows some examples of a client using the Commons RDF API.


[4/6] incubator-commonsrdf git commit: apache-rat -- don't bail out over Eclipse files

Posted by st...@apache.org.
apache-rat -- don't bail out over Eclipse files

.. as they might appear within examples/
if imported manually


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

Branch: refs/heads/master
Commit: 35e31d63f0ac5b453fc77d92be333c5c509c59bd
Parents: d57f8ce
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Apr 28 09:59:52 2015 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Apr 28 09:59:52 2015 +0100

----------------------------------------------------------------------
 pom.xml | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/35e31d63/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 22f2f6a..c7b4994 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
     Licensed to the Apache Software Foundation (ASF) under one
@@ -400,6 +401,10 @@
                     <configuration>
                         <excludes combine.children="append">
                             <exclude>.travis.yml</exclude>
+                            <!-- Eclipse files in examples/ -->
+                            <exclude>examples/.settings/**</exclude>
+                            <exclude>examples/.project</exclude>
+                            <exclude>examples/.classpath</exclude>
                         </excludes>
                     </configuration>
                 </plugin>