commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r999954 [13/27] - in /websites/production/commonsrdf/content: ./ apidocs/ apidocs/org/apache/commons/rdf/api/ apidocs/org/apache/commons/rdf/api/class-use/ apidocs/org/apache/commons/rdf/jena/ apidocs/org/apache/commons/rdf/jena/class-use/ ...
Date Wed, 26 Oct 2016 15:57:54 GMT
Modified: websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jena/impl/InternalJenaFactory.html
==============================================================================
--- websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jena/impl/InternalJenaFactory.html (original)
+++ websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jena/impl/InternalJenaFactory.html Wed Oct 26 15:57:51 2016
@@ -43,7 +43,7 @@
 <span class="sourceLineNo">035</span>import org.apache.commons.rdf.jena.JenaLiteral;<a name="line.35"></a>
 <span class="sourceLineNo">036</span>import org.apache.commons.rdf.jena.JenaQuad;<a name="line.36"></a>
 <span class="sourceLineNo">037</span>import org.apache.commons.rdf.jena.JenaRDFTerm;<a name="line.37"></a>
-<span class="sourceLineNo">038</span>import org.apache.commons.rdf.jena.JenaRDFTermFactory;<a name="line.38"></a>
+<span class="sourceLineNo">038</span>import org.apache.commons.rdf.jena.JenaFactory;<a name="line.38"></a>
 <span class="sourceLineNo">039</span>import org.apache.commons.rdf.jena.JenaTriple;<a name="line.39"></a>
 <span class="sourceLineNo">040</span>import org.apache.jena.graph.Node;<a name="line.40"></a>
 <span class="sourceLineNo">041</span>import org.apache.jena.graph.NodeFactory;<a name="line.41"></a>
@@ -57,7 +57,7 @@
 <span class="sourceLineNo">049</span> * &lt;p&gt;<a name="line.49"></a>
 <span class="sourceLineNo">050</span> * This class is deliberately an abstract class, as it is an internal helper<a name="line.50"></a>
 <span class="sourceLineNo">051</span> * which &lt;strong&gt;may change&lt;/strong&gt; in any minor version update; users should<a name="line.51"></a>
-<span class="sourceLineNo">052</span> * instead use {@link JenaRDFTermFactory}.<a name="line.52"></a>
+<span class="sourceLineNo">052</span> * instead use {@link JenaFactory}.<a name="line.52"></a>
 <span class="sourceLineNo">053</span> * &lt;p&gt;<a name="line.53"></a>
 <span class="sourceLineNo">054</span> * For the purpose of blank node identity, some of these methods require a<a name="line.54"></a>
 <span class="sourceLineNo">055</span> * {@link UUID} to use as a salt. See {@link BlankNode#uniqueReference()} for<a name="line.55"></a>
@@ -73,98 +73,98 @@
 <span class="sourceLineNo">065</span>        public JenaBlankNode createBlankNode(UUID salt) {<a name="line.65"></a>
 <span class="sourceLineNo">066</span>                return new JenaBlankNodeImpl(NodeFactory.createBlankNode(), salt);<a name="line.66"></a>
 <span class="sourceLineNo">067</span>        }<a name="line.67"></a>
-<span class="sourceLineNo">068</span>        public JenaDataset createDataset(UUID salt) {<a name="line.68"></a>
-<span class="sourceLineNo">069</span>                DatasetGraph dg = DatasetGraphFactory.createGeneral();<a name="line.69"></a>
-<span class="sourceLineNo">070</span>                // Or which createMethod() -- a bit confusing with lots of choice..<a name="line.70"></a>
-<span class="sourceLineNo">071</span>                return new JenaDatasetImpl(dg, salt);<a name="line.71"></a>
-<span class="sourceLineNo">072</span>        }<a name="line.72"></a>
-<span class="sourceLineNo">073</span><a name="line.73"></a>
-<span class="sourceLineNo">074</span>        public JenaGraph createGraph(UUID salt) {<a name="line.74"></a>
-<span class="sourceLineNo">075</span>                return new JenaGraphImpl(GraphFactory.createDefaultGraph(), salt);<a name="line.75"></a>
+<span class="sourceLineNo">068</span>        public JenaDataset createDataset(DatasetGraph datasetGraph, UUID salt) {<a name="line.68"></a>
+<span class="sourceLineNo">069</span>                return new JenaDatasetImpl(datasetGraph, salt);<a name="line.69"></a>
+<span class="sourceLineNo">070</span>        }<a name="line.70"></a>
+<span class="sourceLineNo">071</span><a name="line.71"></a>
+<span class="sourceLineNo">072</span>        public JenaDataset createDataset(UUID salt) {<a name="line.72"></a>
+<span class="sourceLineNo">073</span>                DatasetGraph dg = DatasetGraphFactory.createGeneral();<a name="line.73"></a>
+<span class="sourceLineNo">074</span>                // Or which createMethod() -- a bit confusing with lots of choice..<a name="line.74"></a>
+<span class="sourceLineNo">075</span>                return new JenaDatasetImpl(dg, salt);<a name="line.75"></a>
 <span class="sourceLineNo">076</span>        }<a name="line.76"></a>
 <span class="sourceLineNo">077</span><a name="line.77"></a>
-<span class="sourceLineNo">078</span>        public JenaIRI createIRI(String iriStr) {<a name="line.78"></a>
-<span class="sourceLineNo">079</span>                return new JenaIRIImpl(iriStr);<a name="line.79"></a>
+<span class="sourceLineNo">078</span>        public JenaGeneralizedQuadLike createGeneralizedQuad(org.apache.jena.sparql.core.Quad quad, UUID salt) {<a name="line.78"></a>
+<span class="sourceLineNo">079</span>                return new JenaGeneralizedQuadLikeImpl(quad, salt);<a name="line.79"></a>
 <span class="sourceLineNo">080</span>        }<a name="line.80"></a>
 <span class="sourceLineNo">081</span><a name="line.81"></a>
-<span class="sourceLineNo">082</span>        public JenaLiteral createLiteral(String lexStr) {<a name="line.82"></a>
-<span class="sourceLineNo">083</span>                return new JenaLiteralImpl(NodeFactory.createLiteral(lexStr));<a name="line.83"></a>
+<span class="sourceLineNo">082</span>        public JenaGeneralizedQuadLike createGeneralizedQuad(RDFTerm subject, RDFTerm predicate, RDFTerm object, RDFTerm graphName) {<a name="line.82"></a>
+<span class="sourceLineNo">083</span>                return new JenaGeneralizedQuadLikeImpl(subject, predicate, object, Optional.ofNullable(graphName));<a name="line.83"></a>
 <span class="sourceLineNo">084</span>        }<a name="line.84"></a>
 <span class="sourceLineNo">085</span><a name="line.85"></a>
-<span class="sourceLineNo">086</span>        public JenaLiteral createLiteralDT(String lexStr, String datatypeIRI) {<a name="line.86"></a>
-<span class="sourceLineNo">087</span>                return new JenaLiteralImpl(NodeFactory.createLiteral(lexStr, NodeFactory.getType(datatypeIRI)));<a name="line.87"></a>
+<span class="sourceLineNo">086</span>        public JenaGeneralizedTripleLike createGeneralizedTriple(org.apache.jena.graph.Triple triple, UUID salt) {<a name="line.86"></a>
+<span class="sourceLineNo">087</span>                return new JenaGeneralizedTripleLikeImpl(triple, salt);<a name="line.87"></a>
 <span class="sourceLineNo">088</span>        }<a name="line.88"></a>
 <span class="sourceLineNo">089</span><a name="line.89"></a>
-<span class="sourceLineNo">090</span>        public JenaLiteral createLiteralLang(String lexStr, String langTag) {<a name="line.90"></a>
-<span class="sourceLineNo">091</span>                return new JenaLiteralImpl(NodeFactory.createLiteral(lexStr, langTag));<a name="line.91"></a>
+<span class="sourceLineNo">090</span>        public JenaGeneralizedTripleLike createGeneralizedTriple(RDFTerm subject, RDFTerm predicate, RDFTerm object) {<a name="line.90"></a>
+<span class="sourceLineNo">091</span>                return new JenaGeneralizedTripleLikeImpl(subject, predicate, object);<a name="line.91"></a>
 <span class="sourceLineNo">092</span>        }<a name="line.92"></a>
 <span class="sourceLineNo">093</span><a name="line.93"></a>
-<span class="sourceLineNo">094</span>        public JenaTriple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {<a name="line.94"></a>
-<span class="sourceLineNo">095</span>                return new JenaTripleImpl(subject, predicate, object);<a name="line.95"></a>
+<span class="sourceLineNo">094</span>        public JenaGraph createGraph(Model model, UUID salt) {<a name="line.94"></a>
+<span class="sourceLineNo">095</span>                return new JenaGraphImpl(model, salt);<a name="line.95"></a>
 <span class="sourceLineNo">096</span>        }<a name="line.96"></a>
 <span class="sourceLineNo">097</span><a name="line.97"></a>
-<span class="sourceLineNo">098</span>        public JenaQuad createQuad(BlankNodeOrIRI subject, IRI predicate, RDFTerm object, BlankNodeOrIRI graphName) {<a name="line.98"></a>
-<span class="sourceLineNo">099</span>                return new JenaQuadImpl(subject, predicate, object, Optional.ofNullable(graphName));<a name="line.99"></a>
+<span class="sourceLineNo">098</span>        public JenaGraph createGraph(org.apache.jena.graph.Graph graph, UUID salt) {<a name="line.98"></a>
+<span class="sourceLineNo">099</span>                return new JenaGraphImpl(graph, salt);<a name="line.99"></a>
 <span class="sourceLineNo">100</span>        }<a name="line.100"></a>
 <span class="sourceLineNo">101</span><a name="line.101"></a>
-<span class="sourceLineNo">102</span>        public JenaGeneralizedTripleLike createGeneralizedTriple(RDFTerm subject, RDFTerm predicate, RDFTerm object) {<a name="line.102"></a>
-<span class="sourceLineNo">103</span>                return new JenaGeneralizedTripleLikeImpl(subject, predicate, object);<a name="line.103"></a>
+<span class="sourceLineNo">102</span>        public JenaGraph createGraph(UUID salt) {<a name="line.102"></a>
+<span class="sourceLineNo">103</span>                return new JenaGraphImpl(GraphFactory.createDefaultGraph(), salt);<a name="line.103"></a>
 <span class="sourceLineNo">104</span>        }<a name="line.104"></a>
 <span class="sourceLineNo">105</span><a name="line.105"></a>
-<span class="sourceLineNo">106</span>        public JenaGeneralizedQuadLike createGeneralizedQuad(RDFTerm subject, RDFTerm predicate, RDFTerm object, RDFTerm graphName) {<a name="line.106"></a>
-<span class="sourceLineNo">107</span>                return new JenaGeneralizedQuadLikeImpl(subject, predicate, object, Optional.ofNullable(graphName));<a name="line.107"></a>
+<span class="sourceLineNo">106</span>        public JenaIRI createIRI(String iriStr) {<a name="line.106"></a>
+<span class="sourceLineNo">107</span>                return new JenaIRIImpl(iriStr);<a name="line.107"></a>
 <span class="sourceLineNo">108</span>        }<a name="line.108"></a>
 <span class="sourceLineNo">109</span>        <a name="line.109"></a>
-<span class="sourceLineNo">110</span>        public JenaRDFTerm fromJena(Node node, UUID salt) throws ConversionException {<a name="line.110"></a>
-<span class="sourceLineNo">111</span>                if (! node.isConcrete()) {<a name="line.111"></a>
-<span class="sourceLineNo">112</span>                        throw new ConversionException("Node is not a concrete RDF Term: " + node); <a name="line.112"></a>
-<span class="sourceLineNo">113</span>                }<a name="line.113"></a>
-<span class="sourceLineNo">114</span>                if (node.isURI()) {<a name="line.114"></a>
-<span class="sourceLineNo">115</span>                        return new JenaIRIImpl(node);<a name="line.115"></a>
-<span class="sourceLineNo">116</span>                }<a name="line.116"></a>
-<span class="sourceLineNo">117</span>                if (node.isLiteral()) {<a name="line.117"></a>
-<span class="sourceLineNo">118</span>                        return new JenaLiteralImpl(node);<a name="line.118"></a>
-<span class="sourceLineNo">119</span>                }<a name="line.119"></a>
-<span class="sourceLineNo">120</span>                if (node.isBlank()) {<a name="line.120"></a>
-<span class="sourceLineNo">121</span>                        return new JenaBlankNodeImpl(node, salt);<a name="line.121"></a>
-<span class="sourceLineNo">122</span>                }<a name="line.122"></a>
-<span class="sourceLineNo">123</span>                if (node.equals(Node.ANY)) {<a name="line.123"></a>
-<span class="sourceLineNo">124</span>                        // NOTE: JenaAny no longer supported by Commons RDF<a name="line.124"></a>
-<span class="sourceLineNo">125</span>                        //return JenaAnyImpl.Singleton.instance;<a name="line.125"></a>
-<span class="sourceLineNo">126</span>                }<a name="line.126"></a>
-<span class="sourceLineNo">127</span>                if (node.isVariable()) {<a name="line.127"></a>
-<span class="sourceLineNo">128</span>                        // NOTE: JenaVariable no longer supported by Commons RDF<a name="line.128"></a>
-<span class="sourceLineNo">129</span>                        //return new JenaVariableImpl(node);<a name="line.129"></a>
-<span class="sourceLineNo">130</span>                }<a name="line.130"></a>
-<span class="sourceLineNo">131</span>                throw new ConversionException("Unrecognized node type: " + node);<a name="line.131"></a>
-<span class="sourceLineNo">132</span>        }<a name="line.132"></a>
-<span class="sourceLineNo">133</span><a name="line.133"></a>
-<span class="sourceLineNo">134</span>        public JenaGraph fromJena(org.apache.jena.graph.Graph graph, UUID salt) {<a name="line.134"></a>
-<span class="sourceLineNo">135</span>                return new JenaGraphImpl(graph, salt);<a name="line.135"></a>
-<span class="sourceLineNo">136</span>        }<a name="line.136"></a>
-<span class="sourceLineNo">137</span><a name="line.137"></a>
-<span class="sourceLineNo">138</span>        public JenaGraph fromJena(Model model, UUID salt) {<a name="line.138"></a>
-<span class="sourceLineNo">139</span>                return new JenaGraphImpl(model, salt);<a name="line.139"></a>
-<span class="sourceLineNo">140</span>        }<a name="line.140"></a>
-<span class="sourceLineNo">141</span><a name="line.141"></a>
-<span class="sourceLineNo">142</span>        public JenaDataset fromJena(DatasetGraph datasetGraph, UUID salt) {<a name="line.142"></a>
-<span class="sourceLineNo">143</span>                return new JenaDatasetImpl(datasetGraph, salt);<a name="line.143"></a>
-<span class="sourceLineNo">144</span>        }<a name="line.144"></a>
-<span class="sourceLineNo">145</span>        <a name="line.145"></a>
-<span class="sourceLineNo">146</span>        public JenaTriple fromJena(org.apache.jena.graph.Triple triple, UUID salt) {<a name="line.146"></a>
-<span class="sourceLineNo">147</span>                return new JenaTripleImpl(triple, salt);<a name="line.147"></a>
-<span class="sourceLineNo">148</span>        }<a name="line.148"></a>
-<span class="sourceLineNo">149</span><a name="line.149"></a>
-<span class="sourceLineNo">150</span>        public JenaGeneralizedTripleLike fromJenaGeneralized(org.apache.jena.graph.Triple triple, UUID salt) {<a name="line.150"></a>
-<span class="sourceLineNo">151</span>                return new JenaGeneralizedTripleLikeImpl(triple, salt);<a name="line.151"></a>
+<span class="sourceLineNo">110</span>        public JenaLiteral createLiteral(String lexStr) {<a name="line.110"></a>
+<span class="sourceLineNo">111</span>                return new JenaLiteralImpl(NodeFactory.createLiteral(lexStr));<a name="line.111"></a>
+<span class="sourceLineNo">112</span>        }<a name="line.112"></a>
+<span class="sourceLineNo">113</span><a name="line.113"></a>
+<span class="sourceLineNo">114</span>        public JenaLiteral createLiteralDT(String lexStr, String datatypeIRI) {<a name="line.114"></a>
+<span class="sourceLineNo">115</span>                return new JenaLiteralImpl(NodeFactory.createLiteral(lexStr, NodeFactory.getType(datatypeIRI)));<a name="line.115"></a>
+<span class="sourceLineNo">116</span>        }<a name="line.116"></a>
+<span class="sourceLineNo">117</span><a name="line.117"></a>
+<span class="sourceLineNo">118</span>        public JenaLiteral createLiteralLang(String lexStr, String langTag) {<a name="line.118"></a>
+<span class="sourceLineNo">119</span>                return new JenaLiteralImpl(NodeFactory.createLiteral(lexStr, langTag));<a name="line.119"></a>
+<span class="sourceLineNo">120</span>        }<a name="line.120"></a>
+<span class="sourceLineNo">121</span><a name="line.121"></a>
+<span class="sourceLineNo">122</span>        public JenaQuad createQuad(BlankNodeOrIRI subject, IRI predicate, RDFTerm object, BlankNodeOrIRI graphName) {<a name="line.122"></a>
+<span class="sourceLineNo">123</span>                return new JenaQuadImpl(subject, predicate, object, Optional.ofNullable(graphName));<a name="line.123"></a>
+<span class="sourceLineNo">124</span>        }<a name="line.124"></a>
+<span class="sourceLineNo">125</span>        <a name="line.125"></a>
+<span class="sourceLineNo">126</span>        public JenaQuad createQuad(org.apache.jena.sparql.core.Quad quad, UUID salt) {<a name="line.126"></a>
+<span class="sourceLineNo">127</span>                return new JenaQuadImpl(quad, salt);<a name="line.127"></a>
+<span class="sourceLineNo">128</span>        }<a name="line.128"></a>
+<span class="sourceLineNo">129</span><a name="line.129"></a>
+<span class="sourceLineNo">130</span>        public JenaRDFTerm createRDFTerm(Node node, UUID salt) throws ConversionException {<a name="line.130"></a>
+<span class="sourceLineNo">131</span>                if (! node.isConcrete()) {<a name="line.131"></a>
+<span class="sourceLineNo">132</span>                        throw new ConversionException("Node is not a concrete RDF Term: " + node); <a name="line.132"></a>
+<span class="sourceLineNo">133</span>                }<a name="line.133"></a>
+<span class="sourceLineNo">134</span>                if (node.isURI()) {<a name="line.134"></a>
+<span class="sourceLineNo">135</span>                        return new JenaIRIImpl(node);<a name="line.135"></a>
+<span class="sourceLineNo">136</span>                }<a name="line.136"></a>
+<span class="sourceLineNo">137</span>                if (node.isLiteral()) {<a name="line.137"></a>
+<span class="sourceLineNo">138</span>                        return new JenaLiteralImpl(node);<a name="line.138"></a>
+<span class="sourceLineNo">139</span>                }<a name="line.139"></a>
+<span class="sourceLineNo">140</span>                if (node.isBlank()) {<a name="line.140"></a>
+<span class="sourceLineNo">141</span>                        return new JenaBlankNodeImpl(node, salt);<a name="line.141"></a>
+<span class="sourceLineNo">142</span>                }<a name="line.142"></a>
+<span class="sourceLineNo">143</span>                if (node.equals(Node.ANY)) {<a name="line.143"></a>
+<span class="sourceLineNo">144</span>                        // NOTE: JenaAny no longer supported by Commons RDF<a name="line.144"></a>
+<span class="sourceLineNo">145</span>                        //return JenaAnyImpl.Singleton.instance;<a name="line.145"></a>
+<span class="sourceLineNo">146</span>                }<a name="line.146"></a>
+<span class="sourceLineNo">147</span>                if (node.isVariable()) {<a name="line.147"></a>
+<span class="sourceLineNo">148</span>                        // NOTE: JenaVariable no longer supported by Commons RDF<a name="line.148"></a>
+<span class="sourceLineNo">149</span>                        //return new JenaVariableImpl(node);<a name="line.149"></a>
+<span class="sourceLineNo">150</span>                }<a name="line.150"></a>
+<span class="sourceLineNo">151</span>                throw new ConversionException("Unrecognized node type: " + node);<a name="line.151"></a>
 <span class="sourceLineNo">152</span>        }<a name="line.152"></a>
 <span class="sourceLineNo">153</span><a name="line.153"></a>
-<span class="sourceLineNo">154</span>        public JenaGeneralizedQuadLike fromJenaGeneralized(org.apache.jena.sparql.core.Quad quad, UUID salt) {<a name="line.154"></a>
-<span class="sourceLineNo">155</span>                return new JenaGeneralizedQuadLikeImpl(quad, salt);<a name="line.155"></a>
+<span class="sourceLineNo">154</span>        public JenaTriple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {<a name="line.154"></a>
+<span class="sourceLineNo">155</span>                return new JenaTripleImpl(subject, predicate, object);<a name="line.155"></a>
 <span class="sourceLineNo">156</span>        }<a name="line.156"></a>
 <span class="sourceLineNo">157</span>        <a name="line.157"></a>
-<span class="sourceLineNo">158</span>        public JenaQuad fromJena(org.apache.jena.sparql.core.Quad quad, UUID salt) {<a name="line.158"></a>
-<span class="sourceLineNo">159</span>                return new JenaQuadImpl(quad, salt);<a name="line.159"></a>
+<span class="sourceLineNo">158</span>        public JenaTriple createTriple(org.apache.jena.graph.Triple triple, UUID salt) {<a name="line.158"></a>
+<span class="sourceLineNo">159</span>                return new JenaTripleImpl(triple, salt);<a name="line.159"></a>
 <span class="sourceLineNo">160</span>        }<a name="line.160"></a>
 <span class="sourceLineNo">161</span><a name="line.161"></a>
 <span class="sourceLineNo">162</span>}<a name="line.162"></a>

Added: websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdFactory.html
==============================================================================
--- websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdFactory.html (added)
+++ websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdFactory.html Wed Oct 26 15:57:51 2016
@@ -0,0 +1,378 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/**<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * or more contributor license agreements. See the NOTICE file<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * distributed with this work for additional information<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * regarding copyright ownership. The ASF licenses this file<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * to you under the Apache License, Version 2.0 (the<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * "License"); you may not use this file except in compliance<a name="line.7"></a>
+<span class="sourceLineNo">008</span> * with the License.  You may obtain a copy of the License at<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *     http://www.apache.org/licenses/LICENSE-2.0<a name="line.10"></a>
+<span class="sourceLineNo">011</span> *<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * Unless required by applicable law or agreed to in writing, software<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * See the License for the specific language governing permissions and<a name="line.15"></a>
+<span class="sourceLineNo">016</span> * limitations under the License.<a name="line.16"></a>
+<span class="sourceLineNo">017</span> */<a name="line.17"></a>
+<span class="sourceLineNo">018</span>package org.apache.commons.rdf.jsonldjava;<a name="line.18"></a>
+<span class="sourceLineNo">019</span><a name="line.19"></a>
+<span class="sourceLineNo">020</span>import java.nio.charset.StandardCharsets;<a name="line.20"></a>
+<span class="sourceLineNo">021</span>import java.util.Objects;<a name="line.21"></a>
+<span class="sourceLineNo">022</span>import java.util.UUID;<a name="line.22"></a>
+<span class="sourceLineNo">023</span><a name="line.23"></a>
+<span class="sourceLineNo">024</span>import org.apache.commons.rdf.api.BlankNode;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import org.apache.commons.rdf.api.BlankNodeOrIRI;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.commons.rdf.api.Dataset;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.commons.rdf.api.Graph;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.commons.rdf.api.IRI;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.commons.rdf.api.Literal;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.apache.commons.rdf.api.RDFTerm;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>import org.apache.commons.rdf.api.RDFTermFactory;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>import org.apache.commons.rdf.api.Triple;<a name="line.32"></a>
+<span class="sourceLineNo">033</span>import org.apache.commons.rdf.simple.Types;<a name="line.33"></a>
+<span class="sourceLineNo">034</span><a name="line.34"></a>
+<span class="sourceLineNo">035</span>import com.github.jsonldjava.core.RDFDataset;<a name="line.35"></a>
+<span class="sourceLineNo">036</span>import com.github.jsonldjava.core.RDFDataset.Node;<a name="line.36"></a>
+<span class="sourceLineNo">037</span><a name="line.37"></a>
+<span class="sourceLineNo">038</span>public final class JsonLdFactory implements RDFTermFactory {<a name="line.38"></a>
+<span class="sourceLineNo">039</span><a name="line.39"></a>
+<span class="sourceLineNo">040</span>        final String bnodePrefix;<a name="line.40"></a>
+<span class="sourceLineNo">041</span><a name="line.41"></a>
+<span class="sourceLineNo">042</span>        public JsonLdFactory() {<a name="line.42"></a>
+<span class="sourceLineNo">043</span>                // An "outside Graph" bnodePrefix<a name="line.43"></a>
+<span class="sourceLineNo">044</span>                this("urn:uuid:" + UUID.randomUUID() + "#b");<a name="line.44"></a>
+<span class="sourceLineNo">045</span>        }<a name="line.45"></a>
+<span class="sourceLineNo">046</span><a name="line.46"></a>
+<span class="sourceLineNo">047</span>        JsonLdFactory(String bnodePrefix) {<a name="line.47"></a>
+<span class="sourceLineNo">048</span>                this.bnodePrefix = Objects.requireNonNull(bnodePrefix);<a name="line.48"></a>
+<span class="sourceLineNo">049</span>        }<a name="line.49"></a>
+<span class="sourceLineNo">050</span><a name="line.50"></a>
+<span class="sourceLineNo">051</span>        /**<a name="line.51"></a>
+<span class="sourceLineNo">052</span>         * Adapt a JsonLd {@link RDFDataset} as a Commons RDF {@link Dataset}.<a name="line.52"></a>
+<span class="sourceLineNo">053</span>         * &lt;p&gt;<a name="line.53"></a>
+<span class="sourceLineNo">054</span>         * Changes to the Commons RDF {@link Dataset} are reflected in the JsonLd<a name="line.54"></a>
+<span class="sourceLineNo">055</span>         * {@link RDFDataset} and vice versa.<a name="line.55"></a>
+<span class="sourceLineNo">056</span>         * <a name="line.56"></a>
+<span class="sourceLineNo">057</span>         * @see #asGraph(RDFDataset)<a name="line.57"></a>
+<span class="sourceLineNo">058</span>         * @param rdfDataSet JsonLd {@link RDFDataset} to adapt<a name="line.58"></a>
+<span class="sourceLineNo">059</span>         * @return Adapted {@link Dataset}<a name="line.59"></a>
+<span class="sourceLineNo">060</span>         */<a name="line.60"></a>
+<span class="sourceLineNo">061</span>        public JsonLdDataset asDataset(RDFDataset rdfDataSet) {<a name="line.61"></a>
+<span class="sourceLineNo">062</span>                return new JsonLdDatasetImpl(rdfDataSet);<a name="line.62"></a>
+<span class="sourceLineNo">063</span>        }<a name="line.63"></a>
+<span class="sourceLineNo">064</span><a name="line.64"></a>
+<span class="sourceLineNo">065</span>        /**<a name="line.65"></a>
+<span class="sourceLineNo">066</span>         * Adapt a JsonLd {@link RDFDataset} as a Commons RDF {@link Graph}.<a name="line.66"></a>
+<span class="sourceLineNo">067</span>         * &lt;p&gt;<a name="line.67"></a>
+<span class="sourceLineNo">068</span>         * Only triples in the &lt;em&gt;default graph&lt;/em&gt; are included. To retrieve<a name="line.68"></a>
+<span class="sourceLineNo">069</span>         * any other graph, {@link #asDataset(RDFDataset)} together with <a name="line.69"></a>
+<span class="sourceLineNo">070</span>         * {@link Dataset#getGraph(BlankNodeOrIRI)}.  <a name="line.70"></a>
+<span class="sourceLineNo">071</span>         * &lt;p&gt;<a name="line.71"></a>
+<span class="sourceLineNo">072</span>         * Changes to the Commons RDF {@link Graph} are reflected in the JsonLd<a name="line.72"></a>
+<span class="sourceLineNo">073</span>         * {@link RDFDataset} and vice versa.<a name="line.73"></a>
+<span class="sourceLineNo">074</span>         * <a name="line.74"></a>
+<span class="sourceLineNo">075</span>         * @see #asDataset(RDFDataset)<a name="line.75"></a>
+<span class="sourceLineNo">076</span>         * @see #asUnionGraph(RDFDataset) <a name="line.76"></a>
+<span class="sourceLineNo">077</span>         * @param rdfDataSet JsonLd {@link RDFDataset} to adapt<a name="line.77"></a>
+<span class="sourceLineNo">078</span>         * @return Adapted {@link Graph} covering the &lt;em&gt;default graph&lt;/em&gt;<a name="line.78"></a>
+<span class="sourceLineNo">079</span>         */     <a name="line.79"></a>
+<span class="sourceLineNo">080</span>        public JsonLdGraph asGraph(RDFDataset rdfDataSet) {<a name="line.80"></a>
+<span class="sourceLineNo">081</span>                return new JsonLdGraphImpl(rdfDataSet);<a name="line.81"></a>
+<span class="sourceLineNo">082</span>        }<a name="line.82"></a>
+<span class="sourceLineNo">083</span><a name="line.83"></a>
+<span class="sourceLineNo">084</span>        public Node asJsonLdNode(RDFTerm term) {<a name="line.84"></a>
+<span class="sourceLineNo">085</span>                if (term instanceof JsonLdBlankNode) {<a name="line.85"></a>
+<span class="sourceLineNo">086</span>                        JsonLdBlankNode jsonLdBlankNode = (JsonLdBlankNode) term;<a name="line.86"></a>
+<span class="sourceLineNo">087</span>                        if (jsonLdBlankNode.uniqueReference().startsWith(bnodePrefix)) {<a name="line.87"></a>
+<span class="sourceLineNo">088</span>                                // Only return blank nodes 'as is' if they have the same prefix<a name="line.88"></a>
+<span class="sourceLineNo">089</span>                                return jsonLdBlankNode.asJsonLdNode();<a name="line.89"></a>
+<span class="sourceLineNo">090</span>                        }<a name="line.90"></a>
+<span class="sourceLineNo">091</span>                } else if (term instanceof JsonLdTerm) {<a name="line.91"></a>
+<span class="sourceLineNo">092</span>                        // non-Bnodes can always be return as-is<a name="line.92"></a>
+<span class="sourceLineNo">093</span>                        return ((JsonLdTerm) term).asJsonLdNode();<a name="line.93"></a>
+<span class="sourceLineNo">094</span>                }<a name="line.94"></a>
+<span class="sourceLineNo">095</span>                if (term instanceof IRI) {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>                        return new RDFDataset.IRI(((IRI) term).getIRIString());<a name="line.96"></a>
+<span class="sourceLineNo">097</span>                }<a name="line.97"></a>
+<span class="sourceLineNo">098</span>                if (term instanceof BlankNode) {<a name="line.98"></a>
+<span class="sourceLineNo">099</span>                        String ref = ((BlankNode) term).uniqueReference();<a name="line.99"></a>
+<span class="sourceLineNo">100</span>                        if (ref.startsWith(bnodePrefix)) {<a name="line.100"></a>
+<span class="sourceLineNo">101</span>                                // one of our own (but no longer a JsonLdBlankNode),<a name="line.101"></a>
+<span class="sourceLineNo">102</span>                                // we can recover the label after our unique prefix<a name="line.102"></a>
+<span class="sourceLineNo">103</span>                                return new RDFDataset.BlankNode(ref.replace(bnodePrefix, ""));<a name="line.103"></a>
+<span class="sourceLineNo">104</span>                        }<a name="line.104"></a>
+<span class="sourceLineNo">105</span>                        // The "foreign" unique reference might not be a valid bnode string,<a name="line.105"></a>
+<span class="sourceLineNo">106</span>                        // we'll convert to a UUID<a name="line.106"></a>
+<span class="sourceLineNo">107</span>                        UUID uuid = UUID.nameUUIDFromBytes(ref.getBytes(StandardCharsets.UTF_8));<a name="line.107"></a>
+<span class="sourceLineNo">108</span>                        return new RDFDataset.BlankNode("_:" + uuid);<a name="line.108"></a>
+<span class="sourceLineNo">109</span>                }<a name="line.109"></a>
+<span class="sourceLineNo">110</span>                if (term instanceof Literal) {<a name="line.110"></a>
+<span class="sourceLineNo">111</span>                        Literal literal = (Literal) term;<a name="line.111"></a>
+<span class="sourceLineNo">112</span>                        return new RDFDataset.Literal(literal.getLexicalForm(), literal.getDatatype().getIRIString(),<a name="line.112"></a>
+<span class="sourceLineNo">113</span>                                        literal.getLanguageTag().orElse(null));<a name="line.113"></a>
+<span class="sourceLineNo">114</span>                }<a name="line.114"></a>
+<span class="sourceLineNo">115</span>                throw new IllegalArgumentException("RDFTerm not instanceof IRI, BlankNode or Literal: " + term);<a name="line.115"></a>
+<span class="sourceLineNo">116</span>        }       <a name="line.116"></a>
+<span class="sourceLineNo">117</span><a name="line.117"></a>
+<span class="sourceLineNo">118</span>        /**<a name="line.118"></a>
+<span class="sourceLineNo">119</span>         * Adapt a Commons RDF {@link org.apache.commons.rdf.api.Quad} as a JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad}.<a name="line.119"></a>
+<span class="sourceLineNo">120</span>         * <a name="line.120"></a>
+<span class="sourceLineNo">121</span>         * @param quad Commons RDF {@link org.apache.commons.rdf.api.Quad}  to adapt<a name="line.121"></a>
+<span class="sourceLineNo">122</span>         * @return Adapted JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad}<a name="line.122"></a>
+<span class="sourceLineNo">123</span>         */<a name="line.123"></a>
+<span class="sourceLineNo">124</span>        public RDFDataset.Quad asJsonLdQuad(org.apache.commons.rdf.api.Quad quad) {<a name="line.124"></a>
+<span class="sourceLineNo">125</span>                BlankNodeOrIRI g = quad.getGraphName().orElse(null);            <a name="line.125"></a>
+<span class="sourceLineNo">126</span>                return createJsonLdQuad(g, quad.getSubject(), quad.getPredicate(), quad.getObject());<a name="line.126"></a>
+<span class="sourceLineNo">127</span>        }<a name="line.127"></a>
+<span class="sourceLineNo">128</span>        <a name="line.128"></a>
+<span class="sourceLineNo">129</span>        /**<a name="line.129"></a>
+<span class="sourceLineNo">130</span>         * Adapt a Commons RDF {@link Triple} as a JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad}.<a name="line.130"></a>
+<span class="sourceLineNo">131</span>         * <a name="line.131"></a>
+<span class="sourceLineNo">132</span>         * @param triple Commons RDF {@link Triple} to adapt<a name="line.132"></a>
+<span class="sourceLineNo">133</span>         * @return Adapted JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad}<a name="line.133"></a>
+<span class="sourceLineNo">134</span>         */<a name="line.134"></a>
+<span class="sourceLineNo">135</span>        public RDFDataset.Quad asJsonLdQuad(Triple triple) {<a name="line.135"></a>
+<span class="sourceLineNo">136</span>                return createJsonLdQuad(null, triple.getSubject(), triple.getPredicate(), triple.getObject());<a name="line.136"></a>
+<span class="sourceLineNo">137</span>        }<a name="line.137"></a>
+<span class="sourceLineNo">138</span><a name="line.138"></a>
+<span class="sourceLineNo">139</span>        /**<a name="line.139"></a>
+<span class="sourceLineNo">140</span>         * Adapt a JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad} as a Commons RDF<a name="line.140"></a>
+<span class="sourceLineNo">141</span>         * {@link org.apache.commons.rdf.api.Quad}.<a name="line.141"></a>
+<span class="sourceLineNo">142</span>         * &lt;p&gt;<a name="line.142"></a>
+<span class="sourceLineNo">143</span>         * The underlying JsonLd quad can be retrieved with<a name="line.143"></a>
+<span class="sourceLineNo">144</span>         * {@link JsonLdQuad#asJsonLdQuad()}.<a name="line.144"></a>
+<span class="sourceLineNo">145</span>         * <a name="line.145"></a>
+<span class="sourceLineNo">146</span>         * @param quad<a name="line.146"></a>
+<span class="sourceLineNo">147</span>         *            A JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad} to adapt<a name="line.147"></a>
+<span class="sourceLineNo">148</span>         * @return Adapted {@link JsonLdQuad}<a name="line.148"></a>
+<span class="sourceLineNo">149</span>         */<a name="line.149"></a>
+<span class="sourceLineNo">150</span>        public JsonLdQuad asQuad(final RDFDataset.Quad quad) {<a name="line.150"></a>
+<span class="sourceLineNo">151</span>                return new JsonLdQuadImpl(quad, bnodePrefix);<a name="line.151"></a>
+<span class="sourceLineNo">152</span>        }<a name="line.152"></a>
+<span class="sourceLineNo">153</span><a name="line.153"></a>
+<span class="sourceLineNo">154</span>        /**<a name="line.154"></a>
+<span class="sourceLineNo">155</span>         * Adapt a JsonLd {@link Node} as a Commons RDF {@link RDFTerm}.<a name="line.155"></a>
+<span class="sourceLineNo">156</span>         * &lt;p&gt;<a name="line.156"></a>
+<span class="sourceLineNo">157</span>         * The underlying node can be retrieved with<a name="line.157"></a>
+<span class="sourceLineNo">158</span>         * {@link JsonLdTerm#asJsonLdNode()}.<a name="line.158"></a>
+<span class="sourceLineNo">159</span>         * <a name="line.159"></a>
+<span class="sourceLineNo">160</span>         * @param node<a name="line.160"></a>
+<span class="sourceLineNo">161</span>         *            A JsonLd {@link Node} to adapt<a name="line.161"></a>
+<span class="sourceLineNo">162</span>         * @return Adapted {@link JsonLdTerm}<a name="line.162"></a>
+<span class="sourceLineNo">163</span>         */<a name="line.163"></a>
+<span class="sourceLineNo">164</span>        public JsonLdTerm asRDFTerm(final Node node) {<a name="line.164"></a>
+<span class="sourceLineNo">165</span>                return asRDFTerm(node, bnodePrefix);<a name="line.165"></a>
+<span class="sourceLineNo">166</span>        }<a name="line.166"></a>
+<span class="sourceLineNo">167</span><a name="line.167"></a>
+<span class="sourceLineNo">168</span>        /**<a name="line.168"></a>
+<span class="sourceLineNo">169</span>         * Adapt a JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad} as a Commons RDF<a name="line.169"></a>
+<span class="sourceLineNo">170</span>         * {@link org.apache.commons.rdf.api.Triple}.<a name="line.170"></a>
+<span class="sourceLineNo">171</span>         * &lt;p&gt;<a name="line.171"></a>
+<span class="sourceLineNo">172</span>         * The underlying JsonLd quad can be retrieved with<a name="line.172"></a>
+<span class="sourceLineNo">173</span>         * {@link JsonLdTriple#asJsonLdQuad()}.<a name="line.173"></a>
+<span class="sourceLineNo">174</span>         * <a name="line.174"></a>
+<span class="sourceLineNo">175</span>         * @param quad<a name="line.175"></a>
+<span class="sourceLineNo">176</span>         *            A JsonLd {@link com.github.jsonldjava.core.RDFDataset.Quad} to adapt<a name="line.176"></a>
+<span class="sourceLineNo">177</span>         * @return Adapted {@link JsonLdTriple}<a name="line.177"></a>
+<span class="sourceLineNo">178</span>         */<a name="line.178"></a>
+<span class="sourceLineNo">179</span>        public JsonLdTriple asTriple(final RDFDataset.Quad quad) {<a name="line.179"></a>
+<span class="sourceLineNo">180</span>                return new JsonLdTripleImpl(quad, bnodePrefix);<a name="line.180"></a>
+<span class="sourceLineNo">181</span>        }<a name="line.181"></a>
+<span class="sourceLineNo">182</span><a name="line.182"></a>
+<span class="sourceLineNo">183</span>        /**<a name="line.183"></a>
+<span class="sourceLineNo">184</span>         * Adapt a JsonLd {@link RDFDataset} as a Commons RDF {@link Graph}.<a name="line.184"></a>
+<span class="sourceLineNo">185</span>         * &lt;p&gt;<a name="line.185"></a>
+<span class="sourceLineNo">186</span>         * The graph can be seen as a &lt;em&gt;union graph&lt;/em&gt; as it will contains all the<a name="line.186"></a>
+<span class="sourceLineNo">187</span>         * triples across all the graphs of the underlying {@link RDFDataset}.<a name="line.187"></a>
+<span class="sourceLineNo">188</span>         * &lt;p&gt;<a name="line.188"></a>
+<span class="sourceLineNo">189</span>         * Note that some triple operations on a union graph <a name="line.189"></a>
+<span class="sourceLineNo">190</span>         * can be inefficient as they need to remove any duplicate<a name="line.190"></a>
+<span class="sourceLineNo">191</span>         * triples across the graphs.   <a name="line.191"></a>
+<span class="sourceLineNo">192</span>         * &lt;p&gt;<a name="line.192"></a>
+<span class="sourceLineNo">193</span>         * Changes to the Commons RDF {@link Graph} are reflected in the JsonLd<a name="line.193"></a>
+<span class="sourceLineNo">194</span>         * {@link RDFDataset} and vice versa. Triples removed from the graph are<a name="line.194"></a>
+<span class="sourceLineNo">195</span>         * removed from &lt;strong&gt;all&lt;/strong&gt; graphs, while triples added<a name="line.195"></a>
+<span class="sourceLineNo">196</span>         * are added to the &lt;em&gt;default graph&lt;/em&gt;.<a name="line.196"></a>
+<span class="sourceLineNo">197</span>         * <a name="line.197"></a>
+<span class="sourceLineNo">198</span>         * @param rdfDataSet JsonLd {@link RDFDataset} to adapt<a name="line.198"></a>
+<span class="sourceLineNo">199</span>         * @return Adapted {@link Dataset}<a name="line.199"></a>
+<span class="sourceLineNo">200</span>         */     <a name="line.200"></a>
+<span class="sourceLineNo">201</span>        public JsonLdUnionGraph asUnionGraph(RDFDataset rdfDataSet) {<a name="line.201"></a>
+<span class="sourceLineNo">202</span>                return new JsonLdUnionGraphImpl(rdfDataSet);<a name="line.202"></a>
+<span class="sourceLineNo">203</span>        }<a name="line.203"></a>
+<span class="sourceLineNo">204</span><a name="line.204"></a>
+<span class="sourceLineNo">205</span>        @Override<a name="line.205"></a>
+<span class="sourceLineNo">206</span>        public JsonLdBlankNode createBlankNode() {<a name="line.206"></a>
+<span class="sourceLineNo">207</span>                String id = "_:" + UUID.randomUUID().toString();<a name="line.207"></a>
+<span class="sourceLineNo">208</span>                return new JsonLdBlankNodeImpl(new RDFDataset.BlankNode(id), bnodePrefix);<a name="line.208"></a>
+<span class="sourceLineNo">209</span>        }<a name="line.209"></a>
+<span class="sourceLineNo">210</span><a name="line.210"></a>
+<span class="sourceLineNo">211</span>        @Override<a name="line.211"></a>
+<span class="sourceLineNo">212</span>        public JsonLdBlankNode createBlankNode(String name) {<a name="line.212"></a>
+<span class="sourceLineNo">213</span>                String id = "_:" + name;<a name="line.213"></a>
+<span class="sourceLineNo">214</span>                // TODO: Check if name is valid JSON-LD BlankNode identifier<a name="line.214"></a>
+<span class="sourceLineNo">215</span>                return new JsonLdBlankNodeImpl(new RDFDataset.BlankNode(id), bnodePrefix);<a name="line.215"></a>
+<span class="sourceLineNo">216</span>        }<a name="line.216"></a>
+<span class="sourceLineNo">217</span><a name="line.217"></a>
+<span class="sourceLineNo">218</span>        @Override<a name="line.218"></a>
+<span class="sourceLineNo">219</span>        public JsonLdDataset createDataset() {<a name="line.219"></a>
+<span class="sourceLineNo">220</span>                return new JsonLdDatasetImpl(bnodePrefix);<a name="line.220"></a>
+<span class="sourceLineNo">221</span>        }<a name="line.221"></a>
+<span class="sourceLineNo">222</span><a name="line.222"></a>
+<span class="sourceLineNo">223</span>        @Override<a name="line.223"></a>
+<span class="sourceLineNo">224</span>        public JsonLdGraph createGraph() {<a name="line.224"></a>
+<span class="sourceLineNo">225</span>                return new JsonLdGraphImpl(bnodePrefix);<a name="line.225"></a>
+<span class="sourceLineNo">226</span>        }<a name="line.226"></a>
+<span class="sourceLineNo">227</span><a name="line.227"></a>
+<span class="sourceLineNo">228</span>        @Override<a name="line.228"></a>
+<span class="sourceLineNo">229</span>        public JsonLdIRI createIRI(String iri) {<a name="line.229"></a>
+<span class="sourceLineNo">230</span>                return new JsonLdIRIImpl(iri);<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        }<a name="line.231"></a>
+<span class="sourceLineNo">232</span><a name="line.232"></a>
+<span class="sourceLineNo">233</span>        @Override<a name="line.233"></a>
+<span class="sourceLineNo">234</span>        public JsonLdLiteral createLiteral(String literal) {<a name="line.234"></a>
+<span class="sourceLineNo">235</span>                return new JsonLdLiteralImpl(new RDFDataset.Literal(literal, null, null));<a name="line.235"></a>
+<span class="sourceLineNo">236</span>        }<a name="line.236"></a>
+<span class="sourceLineNo">237</span><a name="line.237"></a>
+<span class="sourceLineNo">238</span>        @Override<a name="line.238"></a>
+<span class="sourceLineNo">239</span>        public JsonLdLiteral createLiteral(String literal, IRI dataType) {<a name="line.239"></a>
+<span class="sourceLineNo">240</span>                return new JsonLdLiteralImpl(new RDFDataset.Literal(literal, dataType.getIRIString(), null));<a name="line.240"></a>
+<span class="sourceLineNo">241</span>        }<a name="line.241"></a>
+<span class="sourceLineNo">242</span><a name="line.242"></a>
+<span class="sourceLineNo">243</span>        @Override<a name="line.243"></a>
+<span class="sourceLineNo">244</span>        public JsonLdLiteral createLiteral(String literal, String language) {<a name="line.244"></a>
+<span class="sourceLineNo">245</span>                return new JsonLdLiteralImpl(new RDFDataset.Literal(literal, Types.RDF_LANGSTRING.getIRIString(), language));<a name="line.245"></a>
+<span class="sourceLineNo">246</span>        }<a name="line.246"></a>
+<span class="sourceLineNo">247</span><a name="line.247"></a>
+<span class="sourceLineNo">248</span>        @Override<a name="line.248"></a>
+<span class="sourceLineNo">249</span>        public JsonLdQuad createQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object)<a name="line.249"></a>
+<span class="sourceLineNo">250</span>                        throws IllegalArgumentException, UnsupportedOperationException {<a name="line.250"></a>
+<span class="sourceLineNo">251</span>                return new JsonLdQuadImpl(createJsonLdQuad(graphName, subject, predicate, object), bnodePrefix);<a name="line.251"></a>
+<span class="sourceLineNo">252</span>        }<a name="line.252"></a>
+<span class="sourceLineNo">253</span><a name="line.253"></a>
+<span class="sourceLineNo">254</span>        @Override<a name="line.254"></a>
+<span class="sourceLineNo">255</span>        public JsonLdTriple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {<a name="line.255"></a>
+<span class="sourceLineNo">256</span>                return new JsonLdTripleImpl(createJsonLdQuad(null, subject, predicate, object), bnodePrefix);<a name="line.256"></a>
+<span class="sourceLineNo">257</span>        }<a name="line.257"></a>
+<span class="sourceLineNo">258</span><a name="line.258"></a>
+<span class="sourceLineNo">259</span>        String asJsonLdString(BlankNodeOrIRI blankNodeOrIRI) {<a name="line.259"></a>
+<span class="sourceLineNo">260</span>                if (blankNodeOrIRI == null) {<a name="line.260"></a>
+<span class="sourceLineNo">261</span>                        return null;<a name="line.261"></a>
+<span class="sourceLineNo">262</span>                }<a name="line.262"></a>
+<span class="sourceLineNo">263</span>                if (blankNodeOrIRI instanceof IRI) {<a name="line.263"></a>
+<span class="sourceLineNo">264</span>                        return ((IRI)blankNodeOrIRI).getIRIString();<a name="line.264"></a>
+<span class="sourceLineNo">265</span>                } else if (blankNodeOrIRI instanceof BlankNode) {<a name="line.265"></a>
+<span class="sourceLineNo">266</span>                        BlankNode blankNode = (BlankNode) blankNodeOrIRI;<a name="line.266"></a>
+<span class="sourceLineNo">267</span>                        String ref = blankNode.uniqueReference();<a name="line.267"></a>
+<span class="sourceLineNo">268</span>                        if (ref.startsWith(bnodePrefix)) { <a name="line.268"></a>
+<span class="sourceLineNo">269</span>                                // One of ours (but possibly not a JsonLdBlankNode) -  <a name="line.269"></a>
+<span class="sourceLineNo">270</span>                                // we can use the suffix directly<a name="line.270"></a>
+<span class="sourceLineNo">271</span>                                return ref.replace(bnodePrefix, "_:");<a name="line.271"></a>
+<span class="sourceLineNo">272</span>                        } else {<a name="line.272"></a>
+<span class="sourceLineNo">273</span>                                // Map to unique bnode identifier, e.g. _:0dbd92ee-ab1a-45e7-bba2-7ade54f87ec5<a name="line.273"></a>
+<span class="sourceLineNo">274</span>                                UUID uuid = UUID.nameUUIDFromBytes(ref.getBytes(StandardCharsets.UTF_8));<a name="line.274"></a>
+<span class="sourceLineNo">275</span>                                return "_:"+ uuid;<a name="line.275"></a>
+<span class="sourceLineNo">276</span>                        }<a name="line.276"></a>
+<span class="sourceLineNo">277</span>                } else {<a name="line.277"></a>
+<span class="sourceLineNo">278</span>                        throw new IllegalArgumentException("Expected a BlankNode or IRI, not: " + blankNodeOrIRI);<a name="line.278"></a>
+<span class="sourceLineNo">279</span>                }<a name="line.279"></a>
+<span class="sourceLineNo">280</span>        }<a name="line.280"></a>
+<span class="sourceLineNo">281</span><a name="line.281"></a>
+<span class="sourceLineNo">282</span>        JsonLdTerm asRDFTerm(final Node node, String blankNodePrefix) {<a name="line.282"></a>
+<span class="sourceLineNo">283</span>                if (node == null) {<a name="line.283"></a>
+<span class="sourceLineNo">284</span>                        return null; // e.g. default graph<a name="line.284"></a>
+<span class="sourceLineNo">285</span>                }<a name="line.285"></a>
+<span class="sourceLineNo">286</span>                if (node.isIRI()) {<a name="line.286"></a>
+<span class="sourceLineNo">287</span>                        return new JsonLdIRIImpl(node);<a name="line.287"></a>
+<span class="sourceLineNo">288</span>                } else if (node.isBlankNode()) {<a name="line.288"></a>
+<span class="sourceLineNo">289</span>                        return new JsonLdBlankNodeImpl(node, blankNodePrefix);<a name="line.289"></a>
+<span class="sourceLineNo">290</span>                } else if (node.isLiteral()) {<a name="line.290"></a>
+<span class="sourceLineNo">291</span>                        // TODO: Our own JsonLdLiteral<a name="line.291"></a>
+<span class="sourceLineNo">292</span>                        if (node.getLanguage() != null) {<a name="line.292"></a>
+<span class="sourceLineNo">293</span>                                return createLiteral(node.getValue(), node.getLanguage());<a name="line.293"></a>
+<span class="sourceLineNo">294</span>                        } else {<a name="line.294"></a>
+<span class="sourceLineNo">295</span>                                return createLiteral(node.getValue(), createIRI(node.getDatatype()));<a name="line.295"></a>
+<span class="sourceLineNo">296</span>                        }<a name="line.296"></a>
+<span class="sourceLineNo">297</span>                } else {<a name="line.297"></a>
+<span class="sourceLineNo">298</span>                        throw new IllegalArgumentException("Node is neither IRI, BlankNode nor Literal: " + node);<a name="line.298"></a>
+<span class="sourceLineNo">299</span>                }<a name="line.299"></a>
+<span class="sourceLineNo">300</span>        }<a name="line.300"></a>
+<span class="sourceLineNo">301</span><a name="line.301"></a>
+<span class="sourceLineNo">302</span>        RDFDataset.Quad createJsonLdQuad(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {<a name="line.302"></a>
+<span class="sourceLineNo">303</span>                return new RDFDataset.Quad(asJsonLdNode(subject), asJsonLdNode(predicate), asJsonLdNode(object), asJsonLdString(graphName));<a name="line.303"></a>
+<span class="sourceLineNo">304</span>        }<a name="line.304"></a>
+<span class="sourceLineNo">305</span><a name="line.305"></a>
+<span class="sourceLineNo">306</span>}<a name="line.306"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>
\ No newline at end of file

Modified: websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html
==============================================================================
--- websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html (original)
+++ websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html Wed Oct 26 15:57:51 2016
@@ -80,7 +80,7 @@
 <span class="sourceLineNo">072</span>         */<a name="line.72"></a>
 <span class="sourceLineNo">073</span>        final String bnodePrefix;<a name="line.73"></a>
 <span class="sourceLineNo">074</span><a name="line.74"></a>
-<span class="sourceLineNo">075</span>        final JsonLdRDFTermFactory factory;<a name="line.75"></a>
+<span class="sourceLineNo">075</span>        final JsonLdFactory factory;<a name="line.75"></a>
 <span class="sourceLineNo">076</span><a name="line.76"></a>
 <span class="sourceLineNo">077</span>        /**<a name="line.77"></a>
 <span class="sourceLineNo">078</span>         * The underlying JSON-LD {@link RDFDataset}.<a name="line.78"></a>
@@ -97,7 +97,7 @@
 <span class="sourceLineNo">089</span>        AbstractJsonLdGraphLike(RDFDataset rdfDataSet, String bnodePrefix) {<a name="line.89"></a>
 <span class="sourceLineNo">090</span>                this.rdfDataSet = Objects.requireNonNull(rdfDataSet);<a name="line.90"></a>
 <span class="sourceLineNo">091</span>                this.bnodePrefix = Objects.requireNonNull(bnodePrefix);<a name="line.91"></a>
-<span class="sourceLineNo">092</span>                this.factory = new JsonLdRDFTermFactory(bnodePrefix);<a name="line.92"></a>
+<span class="sourceLineNo">092</span>                this.factory = new JsonLdFactory(bnodePrefix);<a name="line.92"></a>
 <span class="sourceLineNo">093</span>        }<a name="line.93"></a>
 <span class="sourceLineNo">094</span>        <a name="line.94"></a>
 <span class="sourceLineNo">095</span>        AbstractJsonLdGraphLike(String bnodePrefix) {<a name="line.95"></a>
@@ -169,8 +169,8 @@
 <span class="sourceLineNo">161</span>         * Convert JsonLd Quad to a Commons RDF {@link Triple} or {@link org.apache.commons.rdf.api.Quad}<a name="line.161"></a>
 <span class="sourceLineNo">162</span>         * <a name="line.162"></a>
 <span class="sourceLineNo">163</span>         * <a name="line.163"></a>
-<span class="sourceLineNo">164</span>         * @see JsonLdRDFTermFactory#asTriple(Quad)<a name="line.164"></a>
-<span class="sourceLineNo">165</span>         * @see JsonLdRDFTermFactory#asQuad(Quad)<a name="line.165"></a>
+<span class="sourceLineNo">164</span>         * @see JsonLdFactory#asTriple(Quad)<a name="line.164"></a>
+<span class="sourceLineNo">165</span>         * @see JsonLdFactory#asQuad(Quad)<a name="line.165"></a>
 <span class="sourceLineNo">166</span>         * @param jsonldQuad jsonld quad to convert<a name="line.166"></a>
 <span class="sourceLineNo">167</span>         * @return converted {@link TripleLike}<a name="line.167"></a>
 <span class="sourceLineNo">168</span>         */<a name="line.168"></a>

Modified: websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.html
==============================================================================
--- websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.html (original)
+++ websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.html Wed Oct 26 15:57:51 2016
@@ -40,7 +40,7 @@
 <span class="sourceLineNo">032</span>                <a name="line.32"></a>
 <span class="sourceLineNo">033</span>                // Note: We always pass the blankNodePrefix and don't rely on the internal<a name="line.33"></a>
 <span class="sourceLineNo">034</span>                // blankNodePrefix in this static factory<a name="line.34"></a>
-<span class="sourceLineNo">035</span>                private static JsonLdRDFTermFactory rdfTermFactory = new JsonLdRDFTermFactory();<a name="line.35"></a>
+<span class="sourceLineNo">035</span>                private static JsonLdFactory rdfTermFactory = new JsonLdFactory();<a name="line.35"></a>
 <span class="sourceLineNo">036</span>                <a name="line.36"></a>
 <span class="sourceLineNo">037</span>                private final Quad quad;<a name="line.37"></a>
 <span class="sourceLineNo">038</span>                private String blankNodePrefix;<a name="line.38"></a>

Modified: websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdTripleLike.html
==============================================================================
--- websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdTripleLike.html (original)
+++ websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/JsonLdTripleLike.html Wed Oct 26 15:57:51 2016
@@ -6,20 +6,37 @@
 </head>
 <body>
 <div class="sourceContainer">
-<pre><span class="sourceLineNo">001</span>package org.apache.commons.rdf.jsonldjava;<a name="line.1"></a>
-<span class="sourceLineNo">002</span><a name="line.2"></a>
-<span class="sourceLineNo">003</span>import org.apache.commons.rdf.api.TripleLike;<a name="line.3"></a>
-<span class="sourceLineNo">004</span><a name="line.4"></a>
-<span class="sourceLineNo">005</span>public interface JsonLdTripleLike extends TripleLike {<a name="line.5"></a>
-<span class="sourceLineNo">006</span><a name="line.6"></a>
-<span class="sourceLineNo">007</span>        /**<a name="line.7"></a>
-<span class="sourceLineNo">008</span>         * Return the underlying JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}<a name="line.8"></a>
-<span class="sourceLineNo">009</span>         * <a name="line.9"></a>
-<span class="sourceLineNo">010</span>         * @return The JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}<a name="line.10"></a>
-<span class="sourceLineNo">011</span>         */<a name="line.11"></a>
-<span class="sourceLineNo">012</span>        public com.github.jsonldjava.core.RDFDataset.Quad asJsonLdQuad();<a name="line.12"></a>
-<span class="sourceLineNo">013</span><a name="line.13"></a>
-<span class="sourceLineNo">014</span>}<a name="line.14"></a>
+<pre><span class="sourceLineNo">001</span>/**<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * or more contributor license agreements. See the NOTICE file<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * distributed with this work for additional information<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * regarding copyright ownership. The ASF licenses this file<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * to you under the Apache License, Version 2.0 (the<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * "License"); you may not use this file except in compliance<a name="line.7"></a>
+<span class="sourceLineNo">008</span> * with the License.  You may obtain a copy of the License at<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *     http://www.apache.org/licenses/LICENSE-2.0<a name="line.10"></a>
+<span class="sourceLineNo">011</span> *<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * Unless required by applicable law or agreed to in writing, software<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * See the License for the specific language governing permissions and<a name="line.15"></a>
+<span class="sourceLineNo">016</span> * limitations under the License.<a name="line.16"></a>
+<span class="sourceLineNo">017</span> */<a name="line.17"></a>
+<span class="sourceLineNo">018</span>package org.apache.commons.rdf.jsonldjava;<a name="line.18"></a>
+<span class="sourceLineNo">019</span><a name="line.19"></a>
+<span class="sourceLineNo">020</span>import org.apache.commons.rdf.api.TripleLike;<a name="line.20"></a>
+<span class="sourceLineNo">021</span><a name="line.21"></a>
+<span class="sourceLineNo">022</span>public interface JsonLdTripleLike extends TripleLike {<a name="line.22"></a>
+<span class="sourceLineNo">023</span><a name="line.23"></a>
+<span class="sourceLineNo">024</span>        /**<a name="line.24"></a>
+<span class="sourceLineNo">025</span>         * Return the underlying JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}<a name="line.25"></a>
+<span class="sourceLineNo">026</span>         * <a name="line.26"></a>
+<span class="sourceLineNo">027</span>         * @return The JsonLD {@link com.github.jsonldjava.core.RDFDataset.Quad}<a name="line.27"></a>
+<span class="sourceLineNo">028</span>         */<a name="line.28"></a>
+<span class="sourceLineNo">029</span>        public com.github.jsonldjava.core.RDFDataset.Quad asJsonLdQuad();<a name="line.29"></a>
+<span class="sourceLineNo">030</span><a name="line.30"></a>
+<span class="sourceLineNo">031</span>}<a name="line.31"></a>
 
 
 

Modified: websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/experimental/JsonLdParser.html
==============================================================================
--- websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/experimental/JsonLdParser.html (original)
+++ websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/jsonldjava/experimental/JsonLdParser.html Wed Oct 26 15:57:51 2016
@@ -40,7 +40,7 @@
 <span class="sourceLineNo">032</span>import org.apache.commons.rdf.api.RDFSyntax;<a name="line.32"></a>
 <span class="sourceLineNo">033</span>import org.apache.commons.rdf.jsonldjava.JsonLdDataset;<a name="line.33"></a>
 <span class="sourceLineNo">034</span>import org.apache.commons.rdf.jsonldjava.JsonLdGraph;<a name="line.34"></a>
-<span class="sourceLineNo">035</span>import org.apache.commons.rdf.jsonldjava.JsonLdRDFTermFactory;<a name="line.35"></a>
+<span class="sourceLineNo">035</span>import org.apache.commons.rdf.jsonldjava.JsonLdFactory;<a name="line.35"></a>
 <span class="sourceLineNo">036</span>import org.apache.commons.rdf.simple.experimental.AbstractRDFParser;<a name="line.36"></a>
 <span class="sourceLineNo">037</span><a name="line.37"></a>
 <span class="sourceLineNo">038</span>import com.github.jsonldjava.core.JsonLdError;<a name="line.38"></a>
@@ -52,8 +52,8 @@
 <span class="sourceLineNo">044</span>public class JsonLdParser extends AbstractRDFParser&lt;JsonLdParser&gt; {<a name="line.44"></a>
 <span class="sourceLineNo">045</span><a name="line.45"></a>
 <span class="sourceLineNo">046</span>        @Override<a name="line.46"></a>
-<span class="sourceLineNo">047</span>        protected JsonLdRDFTermFactory createRDFTermFactory() {<a name="line.47"></a>
-<span class="sourceLineNo">048</span>                return new JsonLdRDFTermFactory();<a name="line.48"></a>
+<span class="sourceLineNo">047</span>        protected JsonLdFactory createRDFTermFactory() {<a name="line.47"></a>
+<span class="sourceLineNo">048</span>                return new JsonLdFactory();<a name="line.48"></a>
 <span class="sourceLineNo">049</span>        }<a name="line.49"></a>
 <span class="sourceLineNo">050</span><a name="line.50"></a>
 <span class="sourceLineNo">051</span>        @Override<a name="line.51"></a>
@@ -113,7 +113,7 @@
 <span class="sourceLineNo">105</span>                                // otherwise we have to merge as normal<a name="line.105"></a>
 <span class="sourceLineNo">106</span>                        }                       <a name="line.106"></a>
 <span class="sourceLineNo">107</span>                        // TODO: Modify JsonLdProcessor to have an actual triple callback<a name="line.107"></a>
-<span class="sourceLineNo">108</span>                        Graph parsedGraph = getJsonLdRDFTermFactory().asGraph(rdfDataset);                      <a name="line.108"></a>
+<span class="sourceLineNo">108</span>                        Graph parsedGraph = getJsonLdFactory().asGraph(rdfDataset);                     <a name="line.108"></a>
 <span class="sourceLineNo">109</span>                        // sequential() as we don't know if destination is thread safe :-/<a name="line.109"></a>
 <span class="sourceLineNo">110</span>                        parsedGraph.stream().sequential().forEach(intoGraph::add);<a name="line.110"></a>
 <span class="sourceLineNo">111</span>                } else if (getTargetDataset().isPresent()) {<a name="line.111"></a>
@@ -127,19 +127,19 @@
 <span class="sourceLineNo">119</span>                                // otherwise we have to merge.. but also avoid duplicate triples, <a name="line.119"></a>
 <span class="sourceLineNo">120</span>                                // map blank nodes etc, so we'll fall back to normal Dataset appending.<a name="line.120"></a>
 <span class="sourceLineNo">121</span>                        }       <a name="line.121"></a>
-<span class="sourceLineNo">122</span>                        Dataset fromDataset = getJsonLdRDFTermFactory().asDataset(rdfDataset);<a name="line.122"></a>
+<span class="sourceLineNo">122</span>                        Dataset fromDataset = getJsonLdFactory().asDataset(rdfDataset);<a name="line.122"></a>
 <span class="sourceLineNo">123</span>                        // .sequential() as we don't know if destination is thread-safe :-/                     <a name="line.123"></a>
 <span class="sourceLineNo">124</span>                        fromDataset.stream().sequential().forEach(intoDataset::add);<a name="line.124"></a>
 <span class="sourceLineNo">125</span>                } else {        <a name="line.125"></a>
-<span class="sourceLineNo">126</span>                        Dataset fromDataset = getJsonLdRDFTermFactory().asDataset(rdfDataset);<a name="line.126"></a>
+<span class="sourceLineNo">126</span>                        Dataset fromDataset = getJsonLdFactory().asDataset(rdfDataset);<a name="line.126"></a>
 <span class="sourceLineNo">127</span>                        // No need for .sequential() here<a name="line.127"></a>
 <span class="sourceLineNo">128</span>                        fromDataset.stream().forEach(getTarget());<a name="line.128"></a>
 <span class="sourceLineNo">129</span>                }<a name="line.129"></a>
 <span class="sourceLineNo">130</span>        }<a name="line.130"></a>
 <span class="sourceLineNo">131</span>        <a name="line.131"></a>
-<span class="sourceLineNo">132</span>        private JsonLdRDFTermFactory getJsonLdRDFTermFactory() {<a name="line.132"></a>
-<span class="sourceLineNo">133</span>                if (getRdfTermFactory().isPresent() &amp;&amp; getRdfTermFactory().get() instanceof JsonLdRDFTermFactory) {<a name="line.133"></a>
-<span class="sourceLineNo">134</span>                        return (JsonLdRDFTermFactory) getRdfTermFactory().get();<a name="line.134"></a>
+<span class="sourceLineNo">132</span>        private JsonLdFactory getJsonLdFactory() {<a name="line.132"></a>
+<span class="sourceLineNo">133</span>                if (getRdfTermFactory().isPresent() &amp;&amp; getRdfTermFactory().get() instanceof JsonLdFactory) {<a name="line.133"></a>
+<span class="sourceLineNo">134</span>                        return (JsonLdFactory) getRdfTermFactory().get();<a name="line.134"></a>
 <span class="sourceLineNo">135</span>                }<a name="line.135"></a>
 <span class="sourceLineNo">136</span>                return createRDFTermFactory();          <a name="line.136"></a>
 <span class="sourceLineNo">137</span>        }<a name="line.137"></a>

Modified: websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/rdf4j/ClosableIterable.html
==============================================================================
--- websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/rdf4j/ClosableIterable.html (original)
+++ websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/rdf4j/ClosableIterable.html Wed Oct 26 15:57:51 2016
@@ -6,28 +6,45 @@
 </head>
 <body>
 <div class="sourceContainer">
-<pre><span class="sourceLineNo">001</span>package org.apache.commons.rdf.rdf4j;<a name="line.1"></a>
-<span class="sourceLineNo">002</span><a name="line.2"></a>
-<span class="sourceLineNo">003</span>/**<a name="line.3"></a>
-<span class="sourceLineNo">004</span> * An {@link Iterable} which should be {@link #close()}d after use.<a name="line.4"></a>
-<span class="sourceLineNo">005</span> * &lt;p&gt;<a name="line.5"></a>
-<span class="sourceLineNo">006</span> * A good pattern to use this iterator is with an outer try-with-resources<a name="line.6"></a>
-<span class="sourceLineNo">007</span> * block: <a name="line.7"></a>
-<span class="sourceLineNo">008</span> * &lt;code&gt;<a name="line.8"></a>
-<span class="sourceLineNo">009</span> * for (ClosableIterable&amp;lt;Triple&amp;gt; triples : graph.iterate()) {<a name="line.9"></a>
-<span class="sourceLineNo">010</span> *     for (Triple t : triples) {<a name="line.10"></a>
-<span class="sourceLineNo">011</span> *       return t; // OK to terminate for-loop early<a name="line.11"></a>
-<span class="sourceLineNo">012</span> *     }<a name="line.12"></a>
-<span class="sourceLineNo">013</span> * }<a name="line.13"></a>
-<span class="sourceLineNo">014</span> * &lt;/code&gt; <a name="line.14"></a>
-<span class="sourceLineNo">015</span> * The above will ensure that underlying resources are closed even if<a name="line.15"></a>
-<span class="sourceLineNo">016</span> * the iteration does not exhaust all triples.<a name="line.16"></a>
-<span class="sourceLineNo">017</span> *<a name="line.17"></a>
-<span class="sourceLineNo">018</span> * @param &lt;T&gt; type of elements returned by the iterator <a name="line.18"></a>
-<span class="sourceLineNo">019</span> */<a name="line.19"></a>
-<span class="sourceLineNo">020</span>public interface ClosableIterable&lt;T&gt; extends Iterable&lt;T&gt;, AutoCloseable {<a name="line.20"></a>
-<span class="sourceLineNo">021</span><a name="line.21"></a>
-<span class="sourceLineNo">022</span>}<a name="line.22"></a>
+<pre><span class="sourceLineNo">001</span>/**<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * or more contributor license agreements. See the NOTICE file<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * distributed with this work for additional information<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * regarding copyright ownership. The ASF licenses this file<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * to you under the Apache License, Version 2.0 (the<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * "License"); you may not use this file except in compliance<a name="line.7"></a>
+<span class="sourceLineNo">008</span> * with the License.  You may obtain a copy of the License at<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *     http://www.apache.org/licenses/LICENSE-2.0<a name="line.10"></a>
+<span class="sourceLineNo">011</span> *<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * Unless required by applicable law or agreed to in writing, software<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * See the License for the specific language governing permissions and<a name="line.15"></a>
+<span class="sourceLineNo">016</span> * limitations under the License.<a name="line.16"></a>
+<span class="sourceLineNo">017</span> */<a name="line.17"></a>
+<span class="sourceLineNo">018</span>package org.apache.commons.rdf.rdf4j;<a name="line.18"></a>
+<span class="sourceLineNo">019</span><a name="line.19"></a>
+<span class="sourceLineNo">020</span>/**<a name="line.20"></a>
+<span class="sourceLineNo">021</span> * An {@link Iterable} which should be {@link #close()}d after use.<a name="line.21"></a>
+<span class="sourceLineNo">022</span> * &lt;p&gt;<a name="line.22"></a>
+<span class="sourceLineNo">023</span> * A good pattern to use this iterator is with an outer try-with-resources<a name="line.23"></a>
+<span class="sourceLineNo">024</span> * block: <a name="line.24"></a>
+<span class="sourceLineNo">025</span> * &lt;code&gt;<a name="line.25"></a>
+<span class="sourceLineNo">026</span> * for (ClosableIterable&amp;lt;Triple&amp;gt; triples : graph.iterate()) {<a name="line.26"></a>
+<span class="sourceLineNo">027</span> *     for (Triple t : triples) {<a name="line.27"></a>
+<span class="sourceLineNo">028</span> *       return t; // OK to terminate for-loop early<a name="line.28"></a>
+<span class="sourceLineNo">029</span> *     }<a name="line.29"></a>
+<span class="sourceLineNo">030</span> * }<a name="line.30"></a>
+<span class="sourceLineNo">031</span> * &lt;/code&gt; <a name="line.31"></a>
+<span class="sourceLineNo">032</span> * The above will ensure that underlying resources are closed even if<a name="line.32"></a>
+<span class="sourceLineNo">033</span> * the iteration does not exhaust all triples.<a name="line.33"></a>
+<span class="sourceLineNo">034</span> *<a name="line.34"></a>
+<span class="sourceLineNo">035</span> * @param &lt;T&gt; type of elements returned by the iterator <a name="line.35"></a>
+<span class="sourceLineNo">036</span> */<a name="line.36"></a>
+<span class="sourceLineNo">037</span>public interface ClosableIterable&lt;T&gt; extends Iterable&lt;T&gt;, AutoCloseable {<a name="line.37"></a>
+<span class="sourceLineNo">038</span><a name="line.38"></a>
+<span class="sourceLineNo">039</span>}<a name="line.39"></a>
 
 
 

Modified: websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.html
==============================================================================
--- websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.html (original)
+++ websites/production/commonsrdf/content/apidocs/src-html/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.html Wed Oct 26 15:57:51 2016
@@ -35,7 +35,7 @@
 <span class="sourceLineNo">027</span> * The underlying RDF4J {@link BNode} instance can <a name="line.27"></a>
 <span class="sourceLineNo">028</span> * be retrieved with {@link #asValue()}.<a name="line.28"></a>
 <span class="sourceLineNo">029</span> * <a name="line.29"></a>
-<span class="sourceLineNo">030</span> * @see RDF4JTermFactory#createBlankNode() <a name="line.30"></a>
+<span class="sourceLineNo">030</span> * @see RDF4JFactory#createBlankNode() <a name="line.30"></a>
 <span class="sourceLineNo">031</span> */<a name="line.31"></a>
 <span class="sourceLineNo">032</span>public interface RDF4JBlankNode extends RDF4JBlankNodeOrIRI, BlankNode {<a name="line.32"></a>
 <span class="sourceLineNo">033</span>        <a name="line.33"></a>



Mime
View raw message