[jira] [Commented] (JENA-1491) Migrate FindBugs to StopBugs
[ https://issues.apache.org/jira/browse/JENA-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16377347#comment-16377347 ] ASF GitHub Bot commented on JENA-1491: -- Github user asfgit closed the pull request at: https://github.com/apache/jena/pull/363 > Migrate FindBugs to StopBugs > > > Key: JENA-1491 > URL: https://issues.apache.org/jira/browse/JENA-1491 > Project: Apache Jena > Issue Type: Task > Components: Build >Affects Versions: Jena 3.6.0 >Reporter: A. Soroka >Assignee: A. Soroka >Priority: Trivial > Fix For: Jena 3.7.0 > > > FindBugs is moribund: > [https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2016-November/004321.html] > but the work of that project continues in the much livelier SpotBugs project: > [https://spotbugs.github.io/] > We just need to make a few small Maven tweaks to switch over. He wrote > hopefully. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (JENA-1491) Migrate FindBugs to StopBugs
[ https://issues.apache.org/jira/browse/JENA-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16377345#comment-16377345 ] ASF subversion and git services commented on JENA-1491: --- Commit 8cc26701f842584c16d2120f2e0013e24482c1cc in jena's branch refs/heads/master from [~ajs6f] [ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=8cc2670 ] JENA-1491: Migrate FindBugs to StopBugs > Migrate FindBugs to StopBugs > > > Key: JENA-1491 > URL: https://issues.apache.org/jira/browse/JENA-1491 > Project: Apache Jena > Issue Type: Task > Components: Build >Affects Versions: Jena 3.6.0 >Reporter: A. Soroka >Assignee: A. Soroka >Priority: Trivial > Fix For: Jena 3.7.0 > > > FindBugs is moribund: > [https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2016-November/004321.html] > but the work of that project continues in the much livelier SpotBugs project: > [https://spotbugs.github.io/] > We just need to make a few small Maven tweaks to switch over. He wrote > hopefully. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] jena pull request #363: JENA-1491: Migrate FindBugs to StopBugs
Github user asfgit closed the pull request at: https://github.com/apache/jena/pull/363 ---
[GitHub] jena pull request #366: JENA-1494: Reader properties
Github user afs commented on a diff in the pull request: https://github.com/apache/jena/pull/366#discussion_r170642885 --- Diff: jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java --- @@ -116,17 +154,29 @@ public void parse() { arp.getHandlers().setErrorHandler(rslt) ; arp.getHandlers().setNamespaceHandler(rslt) ; +// ARPOptions. +ARPOptions arpOptions = arp.getOptions() ; if ( RiotUniformCompatibility ) { -ARPOptions options = arp.getOptions() ; // Convert some warnings to errors for compatible behaviour for all parsers. for ( int code : additionalErrors ) -options.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ; -arp.setOptionsWith(options) ; +arpOptions.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ; } if ( JenaRuntime.isRDF11 ) arp.getOptions().setIRIFactory(IRIResolver.iriFactory()); +if ( context != null ) { +try { +@SuppressWarnings("unchecked") +Map p = (Map)(context.get(SysRIOT.sysRdfReaderProperties)) ; +if ( p != null ) +p.forEach((k,v) -> oneProperty(arpOptions, k, v)) ; +} catch (Throwable ex) { +Log.warn(AdapterRDFWriter.class, "Problem setting properties", ex); --- End diff -- Will revise. The important item being covered is the class cast (maybe it should throw a meaningful exception?) If `oneProperty` throws an exception, it can propagate as normal. ---
[jira] [Commented] (JENA-1494) Allow setting of RDF/XML Reader properties when using RIOT.
[ https://issues.apache.org/jira/browse/JENA-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16377095#comment-16377095 ] ASF GitHub Bot commented on JENA-1494: -- Github user afs commented on a diff in the pull request: https://github.com/apache/jena/pull/366#discussion_r170642885 --- Diff: jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java --- @@ -116,17 +154,29 @@ public void parse() { arp.getHandlers().setErrorHandler(rslt) ; arp.getHandlers().setNamespaceHandler(rslt) ; +// ARPOptions. +ARPOptions arpOptions = arp.getOptions() ; if ( RiotUniformCompatibility ) { -ARPOptions options = arp.getOptions() ; // Convert some warnings to errors for compatible behaviour for all parsers. for ( int code : additionalErrors ) -options.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ; -arp.setOptionsWith(options) ; +arpOptions.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ; } if ( JenaRuntime.isRDF11 ) arp.getOptions().setIRIFactory(IRIResolver.iriFactory()); +if ( context != null ) { +try { +@SuppressWarnings("unchecked") +Map p = (Map)(context.get(SysRIOT.sysRdfReaderProperties)) ; +if ( p != null ) +p.forEach((k,v) -> oneProperty(arpOptions, k, v)) ; +} catch (Throwable ex) { +Log.warn(AdapterRDFWriter.class, "Problem setting properties", ex); --- End diff -- Will revise. The important item being covered is the class cast (maybe it should throw a meaningful exception?) If `oneProperty` throws an exception, it can propagate as normal. > Allow setting of RDF/XML Reader properties when using RIOT. > --- > > Key: JENA-1494 > URL: https://issues.apache.org/jira/browse/JENA-1494 > Project: Apache Jena > Issue Type: Improvement > Components: RIOT >Affects Versions: Jena 3.6.0 >Reporter: Andy Seaborne >Assignee: Andy Seaborne >Priority: Major > Fix For: Jena 3.7.0 > > > RIOT does not currently have a mechanism for setting the ARP (Jena's RDF/XML > parser) properties. Of all the parsers, only ARP has properties to set. The > RIOT/ARP bridge , {{ReaderRIOTRDFXML}}, has no mechanism for passing > property/value settings to ARP. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (JENA-1490) Working with Blank Nodes with Fuseki
[ https://issues.apache.org/jira/browse/JENA-1490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16377001#comment-16377001 ] ASF GitHub Bot commented on JENA-1490: -- Github user rvesse commented on a diff in the pull request: https://github.com/apache/jena/pull/365#discussion_r170621100 --- Diff: jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionRemoteBuilder.java --- @@ -0,0 +1,324 @@ +/* + * 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 org.apache.jena.rdfconnection; + +import static java.util.Objects.requireNonNull; + +import java.util.Objects; +import java.util.function.Function; + +import org.apache.http.client.HttpClient; +import org.apache.http.protocol.HttpContext; +import org.apache.jena.riot.*; +import org.apache.jena.sparql.core.Transactional; +import org.apache.jena.sparql.core.TransactionalLock; +import org.apache.jena.sparql.engine.http.QueryEngineHTTP; + +public class RDFConnectionRemoteBuilder { +/*package*/ static String SameAsDestination = ""; + +protected Transactional txnLifecycle = TransactionalLock.createMRPlusSW(); +protected HttpClienthttpClient= null; +protected HttpContext httpContext = null; +protected Stringdestination = null; + +protected StringsQuery= SameAsDestination; +protected StringsUpdate = SameAsDestination; +protected StringsGSP = SameAsDestination; + +protected StringqueryURL = null; +protected StringupdateURL = null; +protected StringgspURL= null; + +// On-the-wire settings. +protected RDFFormat outputQuads= RDFFormat.NQUADS; +protected RDFFormat outputTriples = RDFFormat.NTRIPLES; + +protected StringacceptGraph= WebContent.defaultGraphAcceptHeader; +protected StringacceptDataset = WebContent.defaultDatasetAcceptHeader; + +protected StringacceptSelectResult = QueryEngineHTTP.defaultSelectHeader(); +protected StringacceptAskResult= QueryEngineHTTP.defaultAskHeader(); +// All-purpose head that works for any query type (but is quite long!) +protected StringacceptSparqlResults = acceptSelectResult+","+acceptGraph; +// Whether to parse SPARQL Queries and Updates for checkign purposes. +protected boolean parseCheckQueries = true; +protected boolean parseCheckUpdates = true; + +RDFConnectionRemoteBuilder() { +// Default settings are the meber declarations. +} + +RDFConnectionRemoteBuilder(RDFConnectionRemote base) { +Objects.requireNonNull(base); +txnLifecycle = base.txnLifecycle; +if ( txnLifecycle == null ) +txnLifecycle = TransactionalLock.createMRPlusSW(); +httpClient = base.httpClient; +httpContext = base.httpContext; +destination = base.destination; +sQuery = base.svcQuery; +sUpdate = base.svcUpdate; +sGSP= base.svcGraphStore; +outputQuads = base.outputQuads; +outputTriples = base.outputTriples; + +acceptGraph = base.acceptGraph; +acceptDataset = base.acceptDataset; + +acceptSelectResult = base.acceptSelectResult; +acceptAskResult = base.acceptAskResult; +parseCheckQueries = base.parseCheckQueries; +parseCheckUpdates = base.parseCheckUpdates; +} + +/** URL of the remote SPARQL endpoint. + * For Fuseki, this is the URL of the dataset e.g. http:/localhost:3030/dataset + */ +public RDFCo
[GitHub] jena pull request #365: JENA-1490: Handle blank nodes client-server when usi...
Github user rvesse commented on a diff in the pull request: https://github.com/apache/jena/pull/365#discussion_r170621100 --- Diff: jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionRemoteBuilder.java --- @@ -0,0 +1,324 @@ +/* + * 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 org.apache.jena.rdfconnection; + +import static java.util.Objects.requireNonNull; + +import java.util.Objects; +import java.util.function.Function; + +import org.apache.http.client.HttpClient; +import org.apache.http.protocol.HttpContext; +import org.apache.jena.riot.*; +import org.apache.jena.sparql.core.Transactional; +import org.apache.jena.sparql.core.TransactionalLock; +import org.apache.jena.sparql.engine.http.QueryEngineHTTP; + +public class RDFConnectionRemoteBuilder { +/*package*/ static String SameAsDestination = ""; + +protected Transactional txnLifecycle = TransactionalLock.createMRPlusSW(); +protected HttpClienthttpClient= null; +protected HttpContext httpContext = null; +protected Stringdestination = null; + +protected StringsQuery= SameAsDestination; +protected StringsUpdate = SameAsDestination; +protected StringsGSP = SameAsDestination; + +protected StringqueryURL = null; +protected StringupdateURL = null; +protected StringgspURL= null; + +// On-the-wire settings. +protected RDFFormat outputQuads= RDFFormat.NQUADS; +protected RDFFormat outputTriples = RDFFormat.NTRIPLES; + +protected StringacceptGraph= WebContent.defaultGraphAcceptHeader; +protected StringacceptDataset = WebContent.defaultDatasetAcceptHeader; + +protected StringacceptSelectResult = QueryEngineHTTP.defaultSelectHeader(); +protected StringacceptAskResult= QueryEngineHTTP.defaultAskHeader(); +// All-purpose head that works for any query type (but is quite long!) +protected StringacceptSparqlResults = acceptSelectResult+","+acceptGraph; +// Whether to parse SPARQL Queries and Updates for checkign purposes. +protected boolean parseCheckQueries = true; +protected boolean parseCheckUpdates = true; + +RDFConnectionRemoteBuilder() { +// Default settings are the meber declarations. +} + +RDFConnectionRemoteBuilder(RDFConnectionRemote base) { +Objects.requireNonNull(base); +txnLifecycle = base.txnLifecycle; +if ( txnLifecycle == null ) +txnLifecycle = TransactionalLock.createMRPlusSW(); +httpClient = base.httpClient; +httpContext = base.httpContext; +destination = base.destination; +sQuery = base.svcQuery; +sUpdate = base.svcUpdate; +sGSP= base.svcGraphStore; +outputQuads = base.outputQuads; +outputTriples = base.outputTriples; + +acceptGraph = base.acceptGraph; +acceptDataset = base.acceptDataset; + +acceptSelectResult = base.acceptSelectResult; +acceptAskResult = base.acceptAskResult; +parseCheckQueries = base.parseCheckQueries; +parseCheckUpdates = base.parseCheckUpdates; +} + +/** URL of the remote SPARQL endpoint. + * For Fuseki, this is the URL of the dataset e.g. http:/localhost:3030/dataset + */ +public RDFConnectionRemoteBuilder destination(String destination) { +Objects.requireNonNull(destination); +this.destination = destination; +return this; +} + +/** Name of the SPARQL query service. +
[jira] [Commented] (JENA-1494) Allow setting of RDF/XML Reader properties when using RIOT.
[ https://issues.apache.org/jira/browse/JENA-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16376988#comment-16376988 ] ASF GitHub Bot commented on JENA-1494: -- Github user rvesse commented on a diff in the pull request: https://github.com/apache/jena/pull/366#discussion_r170616197 --- Diff: jena-arq/src/main/java/org/apache/jena/riot/SysRIOT.java --- @@ -50,14 +51,20 @@ /** * Context key for old style RDFWriter properties. The value of this in a * {@link Context} must be a {@code Map}. The entries of the - * map are used to set writer properties before the Jena legalacy + * map are used to set writer properties before the Jena legacy * {@link RDFWriter} is called. Only has any effect on RDF/XML and * RDF/XML-ABBREV. */ - -/** Context key for old style RDFWriter properties */ public static final Symbol sysRdfWriterProperties = Symbol.create(riotBase+"rdfWriter_properties") ; - + +/** + * Context key for old style RDFReader properties. The value of this in a + * {@link Context} must be a {@code Map}. The entries of the + * map are used to set reader properties before the Jena legalacy --- End diff -- Typo - `legalacy` > Allow setting of RDF/XML Reader properties when using RIOT. > --- > > Key: JENA-1494 > URL: https://issues.apache.org/jira/browse/JENA-1494 > Project: Apache Jena > Issue Type: Improvement > Components: RIOT >Affects Versions: Jena 3.6.0 >Reporter: Andy Seaborne >Assignee: Andy Seaborne >Priority: Major > Fix For: Jena 3.7.0 > > > RIOT does not currently have a mechanism for setting the ARP (Jena's RDF/XML > parser) properties. Of all the parsers, only ARP has properties to set. The > RIOT/ARP bridge , {{ReaderRIOTRDFXML}}, has no mechanism for passing > property/value settings to ARP. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (JENA-1494) Allow setting of RDF/XML Reader properties when using RIOT.
[ https://issues.apache.org/jira/browse/JENA-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16376989#comment-16376989 ] ASF GitHub Bot commented on JENA-1494: -- Github user rvesse commented on a diff in the pull request: https://github.com/apache/jena/pull/366#discussion_r170616897 --- Diff: jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java --- @@ -116,17 +154,29 @@ public void parse() { arp.getHandlers().setErrorHandler(rslt) ; arp.getHandlers().setNamespaceHandler(rslt) ; +// ARPOptions. +ARPOptions arpOptions = arp.getOptions() ; if ( RiotUniformCompatibility ) { -ARPOptions options = arp.getOptions() ; // Convert some warnings to errors for compatible behaviour for all parsers. for ( int code : additionalErrors ) -options.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ; -arp.setOptionsWith(options) ; +arpOptions.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ; } if ( JenaRuntime.isRDF11 ) arp.getOptions().setIRIFactory(IRIResolver.iriFactory()); +if ( context != null ) { +try { +@SuppressWarnings("unchecked") +Map p = (Map)(context.get(SysRIOT.sysRdfReaderProperties)) ; +if ( p != null ) +p.forEach((k,v) -> oneProperty(arpOptions, k, v)) ; +} catch (Throwable ex) { +Log.warn(AdapterRDFWriter.class, "Problem setting properties", ex); --- End diff -- Should this message more clearly state that some/all properties may have been ignored? > Allow setting of RDF/XML Reader properties when using RIOT. > --- > > Key: JENA-1494 > URL: https://issues.apache.org/jira/browse/JENA-1494 > Project: Apache Jena > Issue Type: Improvement > Components: RIOT >Affects Versions: Jena 3.6.0 >Reporter: Andy Seaborne >Assignee: Andy Seaborne >Priority: Major > Fix For: Jena 3.7.0 > > > RIOT does not currently have a mechanism for setting the ARP (Jena's RDF/XML > parser) properties. Of all the parsers, only ARP has properties to set. The > RIOT/ARP bridge , {{ReaderRIOTRDFXML}}, has no mechanism for passing > property/value settings to ARP. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] jena pull request #366: JENA-1494: Reader properties
Github user rvesse commented on a diff in the pull request: https://github.com/apache/jena/pull/366#discussion_r170616197 --- Diff: jena-arq/src/main/java/org/apache/jena/riot/SysRIOT.java --- @@ -50,14 +51,20 @@ /** * Context key for old style RDFWriter properties. The value of this in a * {@link Context} must be a {@code Map}. The entries of the - * map are used to set writer properties before the Jena legalacy + * map are used to set writer properties before the Jena legacy * {@link RDFWriter} is called. Only has any effect on RDF/XML and * RDF/XML-ABBREV. */ - -/** Context key for old style RDFWriter properties */ public static final Symbol sysRdfWriterProperties = Symbol.create(riotBase+"rdfWriter_properties") ; - + +/** + * Context key for old style RDFReader properties. The value of this in a + * {@link Context} must be a {@code Map}. The entries of the + * map are used to set reader properties before the Jena legalacy --- End diff -- Typo - `legalacy` ---
[GitHub] jena pull request #366: JENA-1494: Reader properties
Github user rvesse commented on a diff in the pull request: https://github.com/apache/jena/pull/366#discussion_r170616897 --- Diff: jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderRIOTRDFXML.java --- @@ -116,17 +154,29 @@ public void parse() { arp.getHandlers().setErrorHandler(rslt) ; arp.getHandlers().setNamespaceHandler(rslt) ; +// ARPOptions. +ARPOptions arpOptions = arp.getOptions() ; if ( RiotUniformCompatibility ) { -ARPOptions options = arp.getOptions() ; // Convert some warnings to errors for compatible behaviour for all parsers. for ( int code : additionalErrors ) -options.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ; -arp.setOptionsWith(options) ; +arpOptions.setErrorMode(code, ARPErrorNumbers.EM_ERROR) ; } if ( JenaRuntime.isRDF11 ) arp.getOptions().setIRIFactory(IRIResolver.iriFactory()); +if ( context != null ) { +try { +@SuppressWarnings("unchecked") +Map p = (Map)(context.get(SysRIOT.sysRdfReaderProperties)) ; +if ( p != null ) +p.forEach((k,v) -> oneProperty(arpOptions, k, v)) ; +} catch (Throwable ex) { +Log.warn(AdapterRDFWriter.class, "Problem setting properties", ex); --- End diff -- Should this message more clearly state that some/all properties may have been ignored? ---
CMS diff: Reasoners and rule engines: Jena inference support
Clone URL (Committers only): https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://jena.apache.org/documentation%2Finference%2Findex.mdtext Nicoletta Fornara forn...@usi.ch Index: trunk/content/documentation/inference/index.mdtext === --- trunk/content/documentation/inference/index.mdtext (revision 1825335) +++ trunk/content/documentation/inference/index.mdtext (working copy) @@ -1780,7 +1780,9 @@ Remove the statement (triple) which caused the n'th body term of this (forward-only) rule to match. Remove will propagate the change to other consequent rules including the firing rule (which must -thus be guarded by some other clauses). Drop will silently remove the +thus be guarded by some other clauses). +In particular, if the removed statement (triple) appears in the body of a rule that already fired, the consequences of such rule are retracted from the deducted model. +Drop will silently remove the triple(s) from the graph but not fire any rules as a consequence. These are clearly non-monotonic operations and, in particular, the behaviour of a rule set in which different rules both drop and create the