Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 632BE200BA0 for ; Fri, 14 Oct 2016 14:48:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 61E3A160AFA; Fri, 14 Oct 2016 12:48:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5B44C160AD9 for ; Fri, 14 Oct 2016 14:48:11 +0200 (CEST) Received: (qmail 36946 invoked by uid 500); 14 Oct 2016 12:48:10 -0000 Mailing-List: contact commits-help@commonsrdf.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commonsrdf.incubator.apache.org Delivered-To: mailing list commits@commonsrdf.incubator.apache.org Received: (qmail 36937 invoked by uid 99); 14 Oct 2016 12:48:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2016 12:48:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2BD1B1806B5 for ; Fri, 14 Oct 2016 12:48:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 17DIUsrTxNoR for ; Fri, 14 Oct 2016 12:48:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id BD8D060D72 for ; Fri, 14 Oct 2016 12:48:06 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 41801E7BF9 for ; Fri, 14 Oct 2016 12:48:05 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 4001B3A0CBA for ; Fri, 14 Oct 2016 12:48:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r999421 [13/13] - 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: Fri, 14 Oct 2016 12:48:03 -0000 To: commits@commonsrdf.incubator.apache.org From: stain@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161014124805.4001B3A0CBA@svn01-us-west.apache.org> archived-at: Fri, 14 Oct 2016 12:48:12 -0000 Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/rdf4j/impl/AbstractRepositoryGraphLike.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/rdf4j/impl/AbstractRepositoryGraphLike.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/rdf4j/impl/AbstractRepositoryGraphLike.html Fri Oct 14 12:48:01 2016 @@ -28,63 +28,60 @@ 20 import java.util.Optional; 21 import java.util.UUID; 22 -23 import org.apache.commons.rdf.api.BlankNodeOrIRI; -24 import org.apache.commons.rdf.api.IRI; -25 import org.apache.commons.rdf.api.RDFTerm; -26 import org.apache.commons.rdf.api.TripleLike; -27 import org.apache.commons.rdf.rdf4j.RDF4JGraphLike; -28 import org.apache.commons.rdf.rdf4j.RDF4JTermFactory; -29 import org.eclipse.rdf4j.model.Model; -30 import org.eclipse.rdf4j.model.Statement; -31 import org.eclipse.rdf4j.repository.Repository; -32 import org.eclipse.rdf4j.repository.RepositoryConnection; +23 import org.apache.commons.rdf.api.TripleLike; +24 import org.apache.commons.rdf.rdf4j.RDF4JGraphLike; +25 import org.apache.commons.rdf.rdf4j.RDF4JTermFactory; +26 import org.eclipse.rdf4j.model.Model; +27 import org.eclipse.rdf4j.model.Statement; +28 import org.eclipse.rdf4j.repository.Repository; +29 import org.eclipse.rdf4j.repository.RepositoryConnection; +30 +31 abstract class AbstractRepositoryGraphLike<T extends TripleLike> +32 implements RDF4JGraphLike<T> { 33 -34 abstract class AbstractRepositoryGraphLike<T extends TripleLike<BlankNodeOrIRI, IRI, RDFTerm>> -35 implements RDF4JGraphLike<T> { -36 -37 protected final Repository repository; -38 protected final boolean includeInferred; -39 protected final boolean handleInitAndShutdown; -40 protected final RDF4JTermFactory rdf4jTermFactory; -41 protected final UUID salt; -42 -43 AbstractRepositoryGraphLike(Repository repository, UUID salt, boolean handleInitAndShutdown, boolean includeInferred) { -44 this.repository = repository; -45 this.salt = salt; -46 this.includeInferred = includeInferred; -47 this.handleInitAndShutdown = handleInitAndShutdown; -48 if (handleInitAndShutdown && !repository.isInitialized()) { -49 repository.initialize(); -50 } -51 rdf4jTermFactory = new RDF4JTermFactory(repository.getValueFactory(), salt); -52 } -53 -54 @Override -55 public void close() throws Exception { -56 if (handleInitAndShutdown) { -57 repository.shutDown(); -58 } -59 // else: repository was initialized outside, so we should not shut it -60 // down -61 } +34 protected final Repository repository; +35 protected final boolean includeInferred; +36 protected final boolean handleInitAndShutdown; +37 protected final RDF4JTermFactory rdf4jTermFactory; +38 protected final UUID salt; +39 +40 AbstractRepositoryGraphLike(Repository repository, UUID salt, boolean handleInitAndShutdown, boolean includeInferred) { +41 this.repository = repository; +42 this.salt = salt; +43 this.includeInferred = includeInferred; +44 this.handleInitAndShutdown = handleInitAndShutdown; +45 if (handleInitAndShutdown && !repository.isInitialized()) { +46 repository.initialize(); +47 } +48 rdf4jTermFactory = new RDF4JTermFactory(repository.getValueFactory(), salt); +49 } +50 +51 @Override +52 public void close() throws Exception { +53 if (handleInitAndShutdown) { +54 repository.shutDown(); +55 } +56 // else: repository was initialized outside, so we should not shut it +57 // down +58 } +59 +60 +61 protected abstract T asTripleLike(Statement s); 62 -63 -64 protected abstract T asTripleLike(Statement s); -65 -66 protected RepositoryConnection getRepositoryConnection() { -67 return repository.getConnection(); -68 } -69 -70 public Optional<Repository> asRepository() { -71 return Optional.of(repository); -72 } -73 -74 @Override -75 public Optional<Model> asModel() { -76 return Optional.empty(); -77 } -78 -79 } +63 protected RepositoryConnection getRepositoryConnection() { +64 return repository.getConnection(); +65 } +66 +67 public Optional<Repository> asRepository() { +68 return Optional.of(repository); +69 } +70 +71 @Override +72 public Optional<Model> asModel() { +73 return Optional.empty(); +74 } +75 +76 }