[GitHub] [jena] afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-496561733
 
 
   If the query file is *.arq", it will be parsed are extended syntax.
   
   See jena-arq/testing/ARQ/GroupBy/count-01.arq, for example.
   
   For simplicity, the data file can be an empty graph and the data in VALUES.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
neumarcx commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r288149932
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,118 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+  count++ ;
+  collection.add(nv);
+}
+else
+{
+//ARQ.getExecLogger().warn("Evaluation error: median() on 
"+nv) ;
+throw new ExprEvalException("median: not a number: "+nv) ;
+}
+
+if ( DEBUG ) System.out.println("median: ("+count+")") ;
 
 Review comment:
   I've done the change for median. if you approve this change I will do the 
same for avg, max and min as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-496540717
 
 
   that's correct @afs thr syntax test is in place but I get an error (see at 
the top of this pull request) for the GroupBy evaluation test. Is there a 
special way to add ARQ tests to the jena/jena-arq/testing/ARQ/GroupBy similar 
to the syntax tests?
   
   And no type matching is not allowed here, it has to be a number. behaves 
similar to AVG, MIN, MAX etc.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #571: JENA-1714: Migrate 'migrate' packages

2019-05-28 Thread GitBox
afs opened a new pull request #571: JENA-1714: Migrate 'migrate' packages
URL: https://github.com/apache/jena/pull/571
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-496509838
 
 
   I don't see any evaluation tests, only syntax tests.
   
   Data can be provided by `VALUES ?x { 1 2 3 4 5 }` and `VALUES ?x { 1 2 3 4 5 
6 }`.
   
   See @rvesse comment:
   https://github.com/apache/jena/pull/568#issuecomment-493031741
   where it is noted that in Commons Median "the data must be at least 
partially ordered." What is the library expecting?
   
   Are cases like `VALUES ?x { "str1" 2 3 "string", "00"  6.e0}` going to be 
handled? (need a custom comparator).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
afs commented on a change in pull request #568: Add Aggregate Median to SPARQL 
ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r288091834
 
 

 ##
 File path: jena-arq/testing/ARQ/Syntax/syn-arq.sh
 ##
 @@ -328,3 +328,17 @@ WHERE
  GRAPH ?g { ?s ?p ?o. FILTER isIRI(?o) }
}
 EOF
+
+#median
+N=0
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-median-" $N arq) 
+
+SELECT median(?x)
 
 Review comment:
   This looks like an evaluation test, not a syntax test.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
ajs6f commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r288087992
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,118 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+  count++ ;
+  collection.add(nv);
+}
+else
+{
+//ARQ.getExecLogger().warn("Evaluation error: median() on 
"+nv) ;
+throw new ExprEvalException("median: not a number: "+nv) ;
+}
+
+if ( DEBUG ) System.out.println("median: ("+count+")") ;
 
 Review comment:
   You needn't (not your code) but if you have time, that would be nice. I am 
already looking at this so it's not more review.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
neumarcx commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r288081119
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,118 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+  count++ ;
+  collection.add(nv);
+}
+else
+{
+//ARQ.getExecLogger().warn("Evaluation error: median() on 
"+nv) ;
+throw new ExprEvalException("median: not a number: "+nv) ;
+}
+
+if ( DEBUG ) System.out.println("median: ("+count+")") ;
 
 Review comment:
   since this is also the case for Avg, Max and Min should that be changed as 
well?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
ajs6f commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r288079380
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,118 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+  count++ ;
+  collection.add(nv);
+}
+else
+{
+//ARQ.getExecLogger().warn("Evaluation error: median() on 
"+nv) ;
+throw new ExprEvalException("median: not a number: "+nv) ;
+}
+
+if ( DEBUG ) System.out.println("median: ("+count+")") ;
 
 Review comment:
   Just to be clear, you can use SLF4J to log at this point.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-28 Thread GitBox
ajs6f commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r288077331
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,118 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+  count++ ;
+  collection.add(nv);
+}
+else
+{
+//ARQ.getExecLogger().warn("Evaluation error: median() on 
"+nv) ;
+throw new ExprEvalException("median: not a number: "+nv) ;
+}
+
+if ( DEBUG ) System.out.println("median: ("+count+")") ;
 
 Review comment:
   This should use a proper method from the logging framework, not 
`System.out.println`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #570: JENA-1713: Switch off warning for NON_INITIAL_DOT_SEGMENT

2019-05-27 Thread GitBox
afs merged pull request #570: JENA-1713: Switch off warning for 
NON_INITIAL_DOT_SEGMENT
URL: https://github.com/apache/jena/pull/570
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #570: JENA-1713: Switch off warning for NON_INITIAL_DOT_SEGMENT

2019-05-25 Thread GitBox
afs opened a new pull request #570: JENA-1713: Switch off warning for 
NON_INITIAL_DOT_SEGMENT
URL: https://github.com/apache/jena/pull/570
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #569: POM maintenance

2019-05-23 Thread GitBox
afs merged pull request #569: POM maintenance
URL: https://github.com/apache/jena/pull/569
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #569: Pom maintenance

2019-05-23 Thread GitBox
afs opened a new pull request #569: Pom maintenance
URL: https://github.com/apache/jena/pull/569
 
 
   Covers JENA-1711 (jackson update) and JENA -1712 (use https for links).


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-05-21 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-494426066
 
 
   Merged to master!


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] asfgit merged pull request #557: JENA-664 GeoSPARQL Jena

2019-05-21 Thread GitBox
asfgit merged pull request #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-21 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-494415007
 
 
   @afs I think got this to work. did a git remote add upstream, git fetch 
upstream, git merge upstream/master, git commit and followed by a git push 
origin master. I think my local fork should now be up to date with the 
apache/jena.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-21 Thread GitBox
afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-494408445
 
 
   `git pull upstream master` (fetch only gets the changes and does not apply 
them).


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-21 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-494367891
 
 
   @afs trying to sync the fork with git fetch upstream first. but don't see 
your changes in the apache/jena repo yet being transferred to the neumarcx/jena 
fork.   Do I have to git reset the neumarcx/jena fork now?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-21 Thread GitBox
afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-494359631
 
 
   @neumarcx - I don't see any evaluation tests.
   
   Some tests with `VALUES ?x { 1 2 3 4 5 }` and `VALUES ?x { 1 2 3 4 5 6 }` 
(the odd and even cases) in various orders should suffice.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-20 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-494123808
 
 
   thank you Andy. while you are in the Syntax testing section. I have noticed 
that syn.sh was not executable on checkout.  might be a good idea to chmod +x 
syn.sh by default.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-20 Thread GitBox
afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-494097841
 
 
   I've updated the syntax tests so that they are all script written and also 
fixed bit rot where the tests were right but the script to create them was 
wrong.  Committed to Jena master.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-20 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-494062956
 
 
   OK yes, looks like these tests haven't been touched for quite some time on 
syn.sh throwing errors for the bindings tests as mentioned in the README. But I 
did add a syntax check now for median() function


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-20 Thread GitBox
afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-493950749
 
 
   `syn-func.sh` and loaded with `source syn-func.sh` in `syn.sh`.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-18 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-493658989
 
 
   where do the fname and testGood commands come from?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-493518708
 
 
   The driver script is `syn.sh` - it sets the output directory by cd'ing into 
it and running the script:
   ```
   # ARQ
   (
   cd Syntax-ARQ
   clean 
   source ../syn-arq.sh 
   createManifest "Syntax-ARQ" ''
   )
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-493505146
 
 
   > Syntax test: the syntax manifest and target query files are generated from 
various "syn-*.sh" files. (But that is a bash shell script to be run.) Please 
add the tests for syntax (good and bad) to the end of "syn-arq.sh".
   > 
   > Evaluation tests: these go into `jena-arq/testing/ARQ/GroupBy`. It would 
be useful to have both with and without GROUP BY cases because the internal 
state management is special for "median".
   
   this is were I place the test initially but the test picked up the ARQ 
scripts with SPARQL 1.1 syntax and failed accordingly. Is it mandatory to run 
syn-arq.sh first? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
neumarcx commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r285185337
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,123 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+count++ ;
+if ( total == noValuesToMedian )
 
 Review comment:
   yes correct same is the case for avg and other aggregates. was wondering as 
well


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-493487384
 
 
   > One observation is that the Commons Math library used notes that for 
percentile based stats to be evaluated correctly the data should be at least 
partially ordered 
(http://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/descriptive/rank/Percentile.html).
 Since aggregation is computed prior to sorting in SPARQL there’s no guarantee 
that the accumulator will see the data in a sensible order and thus calculate a 
meaningful result.
   > 
   > Could do with some test cases to see what happens in the case of generated 
random data inputs and may need some refactoring to do internal sorting of the 
accumulated values prior to passing them to the Math library
   
   @rvesse worthwhile observation on Commons Math library, but by definition 
median is the middle in a sorted order. Same is the case for the Commons Math 
implementation here. The sort in the Commons Math library is certainly much 
more efficient than a standard sort on e.g. java.util.Arrays. In preliminary 
tests I tend run into heap space issues with sets +200m aggregate values in an 
array and for +1 billion values in settings with large Xmx allocation.  Do you 
see this being an issue for a general release in ARQ?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
neumarcx commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r285162989
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedianDistinct.java
 ##
 @@ -0,0 +1,119 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedianDistinct extends AggregatorBase
+{
+//  Median(DISTINCT expr)
+public AggMedianDistinct(Expr expr) { super("Median", true, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new 
AggMedianDistinct(expr.get(0)) ; }
+
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedianDistinct(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   {
+return HC_AggMedianDistinct ^ getExprList().hashCode() ;
+}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedianDistinct ) ) return false ;
+AggMedianDistinct a = (AggMedianDistinct)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+
+//  Accumulator
+class AccMedianDistinct extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedianDistinct(Expr expr) { super(expr, true) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( nv.isNumber() )
+{
+count++ ;
+if ( total == noValuesToMedian ) {
+total = nv ;
+}
+else {
+total = XSDFuncOp.numAdd(nv, total) ;
+}
+   
+collection.add(nv);
+}
+else
+throw new ExprEvalException("median: not a number: "+nv) ;
+
+if ( DEBUG ) System.out.println("median: ("+total+","+count+")") ;
+}
+
+@Override
+public NodeValue getAccValue()
+{
+if ( count == 0 ) return noValuesToMedian ;
+if ( super.errorCount != 0 )
+return null ;
+
+double[] arrDouble = new double[collection.size()];
+for(int i=0; i

[GitHub] [jena] afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
afs commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-493483043
 
 
   Syntax test: the syntax manifest and target query files are generated from 
various "syn-*.sh" files. (But that is a bash shell script to be run.) Please 
add the tests for syntax (good and bad) to the end of "syn-arq.sh".
   
   Evaluation tests: these go into `jena-arq/testing/ARQ/GroupBy`. It would be 
useful to have both with and without GROUP BY cases because the internal state 
management is special for "median".
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
afs commented on a change in pull request #568: Add Aggregate Median to SPARQL 
ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r285159993
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedianDistinct.java
 ##
 @@ -0,0 +1,119 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedianDistinct extends AggregatorBase
+{
+//  Median(DISTINCT expr)
+public AggMedianDistinct(Expr expr) { super("Median", true, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new 
AggMedianDistinct(expr.get(0)) ; }
+
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedianDistinct(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   {
+return HC_AggMedianDistinct ^ getExprList().hashCode() ;
+}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedianDistinct ) ) return false ;
+AggMedianDistinct a = (AggMedianDistinct)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+
+//  Accumulator
+class AccMedianDistinct extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedianDistinct(Expr expr) { super(expr, true) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( nv.isNumber() )
+{
+count++ ;
+if ( total == noValuesToMedian ) {
+total = nv ;
+}
+else {
+total = XSDFuncOp.numAdd(nv, total) ;
+}
+   
+collection.add(nv);
+}
+else
+throw new ExprEvalException("median: not a number: "+nv) ;
+
+if ( DEBUG ) System.out.println("median: ("+total+","+count+")") ;
+}
+
+@Override
+public NodeValue getAccValue()
+{
+if ( count == 0 ) return noValuesToMedian ;
+if ( super.errorCount != 0 )
+return null ;
+
+double[] arrDouble = new double[collection.size()];
+for(int i=0; i

[GitHub] [jena] afs commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
afs commented on a change in pull request #568: Add Aggregate Median to SPARQL 
ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r285159912
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,125 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+count++ ;
+if ( total == noValuesToMedian ) {
+   total = nv ;
+}
+else {
+total = XSDFuncOp.numAdd(nv, total) ;
+}
+   collection.add(nv);
+}
+else
+{
+//ARQ.getExecLogger().warn("Evaluation error: median() on 
"+nv) ;
+throw new ExprEvalException("median: not a number: "+nv) ;
+}
+
+if ( DEBUG ) System.out.println("median: ("+total+","+count+")") ;
+}
+
+@Override
+protected void accumulateError(Binding binding, FunctionEnv 
functionEnv)
+{}
+
+@Override
+public NodeValue getAccValue()
+{
+if ( count == 0 ) return noValuesToMedian ;
+if ( super.errorCount != 0 )
+//throw new ExprEvalException("median: error in group") ; 
+return null ;
+//NodeValue nvCount = NodeValue.makeInteger(count) ;
+
+double[] arrDouble = new double[collection.size()];
+for(int i=0; i

[GitHub] [jena] afs commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
afs commented on a change in pull request #568: Add Aggregate Median to SPARQL 
ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r285153474
 
 

 ##
 File path: jena-arq/pom.xml
 ##
 @@ -113,6 +113,12 @@
   commons-lang3
 
 
+
+  org.apache.commons
+  commons-math3
+  3.6
 
 Review comment:
   Version 3.6.1 is available.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-17 Thread GitBox
ajs6f commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r285133389
 
 

 ##
 File path: jena-arq/Grammar/sparql_11.jj
 ##
 @@ -1318,6 +1318,8 @@ Expr Aggregate() : { Aggregator agg = null ; String sep 
= null ;
 { agg = AggregatorFactory.createMax(distinct, expr) ; }
   | t =   (  { distinct = true ; } )? expr = 
Expression() 
 { agg = AggregatorFactory.createAvg(distinct, expr) ; }
+  | t =   (  { distinct = true ; } )? expr = 
Expression() 
 
 Review comment:
   Adding a commit to your branch in the repo from which you made the PR (looks 
like your own repo) will add the commit to the PR as well. The PR is 
essentially defined as being between the tips of the two branches between which 
you initiated it, in this case `apache:master` from `neumarcx:master`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-16 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-493263872
 
 
   Where is the best place for the ARQ median function test in the testing 
folder
   
   jena/jena-arq/testing/ARQ/Syntax?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-16 Thread GitBox
neumarcx commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r284931581
 
 

 ##
 File path: jena-arq/Grammar/sparql_11.jj
 ##
 @@ -1318,6 +1318,8 @@ Expr Aggregate() : { Aggregator agg = null ; String sep 
= null ;
 { agg = AggregatorFactory.createMax(distinct, expr) ; }
   | t =   (  { distinct = true ; } )? expr = 
Expression() 
 { agg = AggregatorFactory.createAvg(distinct, expr) ; }
+  | t =   (  { distinct = true ; } )? expr = 
Expression() 
 
 Review comment:
   thx rvesse, made the grammar changes in the fork. will this automatically 
update the PR as well?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] rvesse commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-16 Thread GitBox
rvesse commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-493031741
 
 
   One observation is that the Commons Math library used notes that for 
percentile based stats to be evaluated correctly the data should be at least 
partially ordered 
(http://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/descriptive/rank/Percentile.html).
 Since aggregation is computed prior to sorting in SPARQL there’s no guarantee 
that the accumulator will see the data in a sensible order and thus calculate a 
meaningful result. 
   
   Could do with some test cases to see what happens in the case of generated 
random data inputs and may need some refactoring to do internal sorting of the 
accumulated values prior to passing them to the Math library


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] rvesse commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-16 Thread GitBox
rvesse commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r284658058
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,123 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+count++ ;
+if ( total == noValuesToMedian )
+total = nv ;
+else
+total = XSDFuncOp.numAdd(nv, total) ;
+   collection.add(nv);
 
 Review comment:
   Couldn’t you just store the double values here?
   
   Also please use brackets here for the preceding if else as the current 
indentation makes this read odd


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] rvesse commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-16 Thread GitBox
rvesse commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r284659933
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,123 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+count++ ;
+if ( total == noValuesToMedian )
+total = nv ;
+else
+total = XSDFuncOp.numAdd(nv, total) ;
+   collection.add(nv);
+}
+else
+{
+//ARQ.getExecLogger().warn("Evaluation error: median() on 
"+nv) ;
+throw new ExprEvalException("median: not a number: "+nv) ;
+}
+
+if ( DEBUG ) System.out.println("median: ("+total+","+count+")") ;
+}
+
+@Override
+protected void accumulateError(Binding binding, FunctionEnv 
functionEnv)
+{}
+
+@Override
+public NodeValue getAccValue()
+{
+if ( count == 0 ) return noValuesToMedian ;
+if ( super.errorCount != 0 )
+//throw new ExprEvalException("median: error in group") ; 
+return null ;
+//NodeValue nvCount = NodeValue.makeInteger(count) ;
+
+double[] arrDouble = new double[collection.size()];
+for(int i=0; i

[GitHub] [jena] rvesse commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-16 Thread GitBox
rvesse commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r284656594
 
 

 ##
 File path: jena-arq/Grammar/sparql_11.jj
 ##
 @@ -1318,6 +1318,8 @@ Expr Aggregate() : { Aggregator agg = null ; String sep 
= null ;
 { agg = AggregatorFactory.createMax(distinct, expr) ; }
   | t =   (  { distinct = true ; } )? expr = 
Expression() 
 { agg = AggregatorFactory.createAvg(distinct, expr) ; }
+  | t =   (  { distinct = true ; } )? expr = 
Expression() 
 
 Review comment:
   Shouldn’t be included in the standard SPARQL 1.1 grammar, if properly 
#ifdef’d in `master.jj` this will be resolved when you regenerate the grammars


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] rvesse commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-16 Thread GitBox
rvesse commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r284656165
 
 

 ##
 File path: jena-arq/Grammar/master.jj
 ##
 @@ -2045,6 +2045,9 @@ Expr Aggregate() : { Aggregator agg = null ; String sep 
= null ;
   | t =   (  { distinct = true ; } )? expr = 
Expression() 
 { agg = AggregatorFactory.createAvg(distinct, expr) ; }
 
+  | t =   (  { distinct = true ; } )? expr = 
Expression() 
 
 Review comment:
   This should be fenced with an `#ifdef` so it is only incorporated into the 
ARQ syntax


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] rvesse commented on a change in pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-16 Thread GitBox
rvesse commented on a change in pull request #568: Add Aggregate Median to 
SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#discussion_r284658880
 
 

 ##
 File path: 
jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggMedian.java
 ##
 @@ -0,0 +1,123 @@
+/*
+ * 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.sparql.expr.aggregate;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+import org.apache.commons.math3.stat.descriptive.rank.Median;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.engine.binding.Binding ;
+import org.apache.jena.sparql.expr.Expr ;
+import org.apache.jena.sparql.expr.ExprEvalException ;
+import org.apache.jena.sparql.expr.ExprList ;
+import org.apache.jena.sparql.expr.NodeValue ;
+import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp ;
+import org.apache.jena.sparql.function.FunctionEnv ;
+
+public class AggMedian extends AggregatorBase
+{
+//  MEDIAN(?var)
+public AggMedian(Expr expr) { super("MEDIAN", false, expr) ; } 
+@Override
+public Aggregator copy(ExprList expr) { return new AggMedian(expr.get(0)) 
; }
+
+// XQuery/XPath Functions&Operators suggests zero
+// SQL suggests null.
+private static final NodeValue noValuesToMedian = NodeValue.nvZERO ; // 
null 
+
+@Override
+public Accumulator createAccumulator()
+{ 
+return new AccMedian(getExpr()) ;
+}
+
+@Override
+public Node getValueEmpty() { return 
NodeValue.toNode(noValuesToMedian) ; } 
+
+@Override
+public int hashCode()   { return HC_AggMedian ^ getExprList().hashCode() ; 
}
+
+@Override
+public boolean equals(Aggregator other, boolean bySyntax) {
+if ( other == null ) return false ;
+if ( this == other ) return true ;
+if ( ! ( other instanceof AggMedian ) ) return false ;
+AggMedian a = (AggMedian)other ;
+return exprList.equals(a.exprList, bySyntax) ;
+}
+
+//  Accumulator
+private static class AccMedian extends AccumulatorExpr
+{
+// Non-empty case but still can be nothing because the expression may 
be undefined.
+private NodeValue total = noValuesToMedian ;
+private int count = 0 ;
+ArrayList collection=new ArrayList(); 
+
+static final boolean DEBUG = false ;
+
+public AccMedian(Expr expr) { super(expr, false) ; }
+
+@Override
+protected void accumulate(NodeValue nv, Binding binding, FunctionEnv 
functionEnv)
+{ 
+if ( DEBUG ) System.out.println("median: "+nv) ;
+
+if ( nv.isNumber() )
+{
+count++ ;
+if ( total == noValuesToMedian )
 
 Review comment:
Not sure why `total` is being calculated at all since it is only used in 
debug output which is disabled by default?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-15 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-492696407
 
 
   can you ignore the test case and the last PR update and succesfully build?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-15 Thread GitBox
neumarcx commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-492690620
 
 
   OK, I don't but the error looks good. median should not pass on SPARQL1.1. 
just updated PR. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-15 Thread GitBox
ajs6f commented on issue #568: Add Aggregate Median to SPARQL ARQ syntax
URL: https://github.com/apache/jena/pull/568#issuecomment-492664185
 
 
   @neumarcx I'm getting a test error trying to build this. Are you seeing what 
I show below?
   ```
   ...
   [INFO] Running org.apache.jena.sparql.TC_Scripted
   org.apache.jena.query.QueryParseException: Lexical error at line 4, column 
15.  Encountered: "(" (40), after : "median"
at 
org.apache.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:109)
at 
org.apache.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:52)
at org.apache.jena.sparql.lang.SPARQLParser.parse(SPARQLParser.java:34)
at org.apache.jena.query.QueryFactory.parse(QueryFactory.java:147)
at org.apache.jena.query.QueryFactory.create(QueryFactory.java:79)
at org.apache.jena.query.QueryFactory.read(QueryFactory.java:220)
at org.apache.jena.query.QueryFactory.read(QueryFactory.java:199)
at 
org.apache.jena.sparql.junit.EarlTestCase.queryFromTestItem(EarlTestCase.java:63)
at 
org.apache.jena.sparql.junit.QueryTest.runTestForReal(QueryTest.java:183)
at 
org.apache.jena.sparql.junit.EarlTestCase.runTest(EarlTestCase.java:88)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at 
org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
   [ERROR] Tests run: 1033, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
3.684 s <<< FAILURE! - in org.apache.jena.sparql.TC_Scripted
   [ERROR] Median - 1 - median[?v](org.apache.jena.sparql.junit.QueryTest)  
Time elapsed: 0.05 s  <<< FAILURE!
   junit.framework.AssertionFailedError: Parse failure: Lexical error at line 
4, column 15.  Encountered: "(" (40), after : "median"
at 
org.apache.jena.sparql.junit.QueryTest.runTestForReal(QueryTest.java:188)
   
   [INFO] Running org.apache.jena.web.TS_Web
   ...
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] neumarcx opened a new pull request #568: Add Aggregate Median to SPARQL ARQ syntax

2019-05-15 Thread GitBox
neumarcx opened a new pull request #568: Add Aggregate Median to SPARQL ARQ 
syntax
URL: https://github.com/apache/jena/pull/568
 
 
   this adds aggregate MEDIAN as keyword to the SPARQL ARQ syntax


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-05-08 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-490459291
 
 
   I've merged the PR onto to working branch 
[geosparql](https://github.com/apache/jena/tree/geosparql) with most of the 
post-merge changes applied.
   
   Outstanding:
   
   1. Sort out a NOTICE file for the inclusions in shared jena-fuseki-geosparql.
   2. Put module jena-fuseki-geosparql under jena-fuseki2/
   3. Repackage as `org.apache.jena.fuseki.geosparql`
   4. Merge to master (which will make this PR go to "merged")
   5. Get the tests to work under java11 and/or skip for Java11 for now.
   
   Thank you to @galbiston for the contribution so far and his patience while 
getting this into the codebase.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-05-07 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-490167509
 
 
   @galbiston - Thanks. The license text was passing the RAT checks but there 
was extra wording like "Copyright the authors". Not wrong, but a variation.  
Copyright and IP is best done cleanly at the start rather than treat like 
software and "can fix later".


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] galbiston commented on issue #557: JENA-664 GeoSPARQL Jena

2019-05-06 Thread GitBox
galbiston commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-489695240
 
 
   Apologies for the license issue. I thought I'd tidied them all up. I've also 
removed the lines of test name output, removed the commented out test results 
and renamed the Fuseki GeoSPARQL packages to the suggested form.
   
   Thanks,
   
   Greg


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #567: JENA-1709: Password file implies logged-in users

2019-05-02 Thread GitBox
afs merged pull request #567: JENA-1709: Password file implies logged-in users
URL: https://github.com/apache/jena/pull/567
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #562: JENA-1695: Modular storage interface and framework

2019-05-02 Thread GitBox
afs merged pull request #562:  JENA-1695: Modular storage interface and 
framework 
URL: https://github.com/apache/jena/pull/562
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] rvesse commented on a change in pull request #567: JENA-1709: Password file implies logged-in users

2019-05-02 Thread GitBox
rvesse commented on a change in pull request #567: JENA-1709: Password file 
implies logged-in users
URL: https://github.com/apache/jena/pull/567#discussion_r280333708
 
 

 ##
 File path: 
jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
 ##
 @@ -735,13 +748,10 @@ private void buildFinish() {
 /** Do some checking to make sure setup is consistent. */ 
 private void validate() {
 if ( ! hasAuthenticationHandler ) {
-if ( hasAuthenticationUse ) {
-Fuseki.configLog.warn("'allowedUsers' is set but there is 
no authentication setup (e.g. password file)");
-}
-
-if ( hasDataAccessControl ) {
-Fuseki.configLog.warn("Data-level access control is 
configured but there is no authentication setup (e.g. password file)");
-}
+if ( authenticateUser )
+Fuseki.configLog.warn("Authetication iof users required 
(e.g. 'allowedUsers' is set) but there is no authentication setup (e.g. 
password file)");
 
 Review comment:
   Typo - `iof`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #567: JENA-1709: Password file implies logged-in users

2019-05-01 Thread GitBox
afs opened a new pull request #567: JENA-1709: Password file implies logged-in 
users
URL: https://github.com/apache/jena/pull/567
 
 
   and some other minor fixes and log warnings.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #546: JENA-1687: refine NodeFactory return types

2019-04-30 Thread GitBox
afs commented on issue #546: JENA-1687: refine NodeFactory return types
URL: https://github.com/apache/jena/pull/546#issuecomment-487892216
 
 
   Thanks!


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] jmkeil commented on issue #546: JENA-1687: refine NodeFactory return types

2019-04-30 Thread GitBox
jmkeil commented on issue #546: JENA-1687: refine NodeFactory return types
URL: https://github.com/apache/jena/pull/546#issuecomment-487882901
 
 
   Yes. The change is unnecessary.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] jmkeil closed pull request #546: JENA-1687: refine NodeFactory return types

2019-04-30 Thread GitBox
jmkeil closed pull request #546: JENA-1687: refine NodeFactory return types
URL: https://github.com/apache/jena/pull/546
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #561: JENA-1572: Remove L&N in modules that don't need them

2019-04-30 Thread GitBox
afs merged pull request #561: JENA-1572: Remove L&N in modules that don't need 
them
URL: https://github.com/apache/jena/pull/561
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #546: JENA-1687: refine NodeFactory return types

2019-04-30 Thread GitBox
afs commented on issue #546: JENA-1687: refine NodeFactory return types
URL: https://github.com/apache/jena/pull/546#issuecomment-487873750
 
 
   Given the other PRs and discussion on 
[JENA-1687](https://issues.apache.org/jira/browse/JENA-1687), I don't think we 
should make the change from the top class (in effect, the interface) and the 
specific concrete implementations.
   
   Thank you to @jmkeil for suggesting it and making sure we do think about 
issues.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs edited a comment on issue #547: JENA-1688: add methods Node#asBlank, Node#asConcret, Node#asLiteral, Node#asURI, Node#asVariable

2019-04-30 Thread GitBox
afs edited a comment on issue #547: JENA-1688: add methods Node#asBlank, 
Node#asConcret, Node#asLiteral, Node#asURI, Node#asVariable
URL: https://github.com/apache/jena/pull/547#issuecomment-476405301
 
 
   This seem related to PR#546 and the discussion on 
[JENA-1687](https://issues.apache.org/jira/browse/JENA-1687).
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #566: Update maven-bundle-plugin

2019-04-30 Thread GitBox
afs merged pull request #566: Update maven-bundle-plugin
URL: https://github.com/apache/jena/pull/566
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-28 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487384847
 
 
   @galbiston -- Sorry - I've missed something.
   
   Some of the files have the Apache License for contributed software, (example 
`GeoSPARQLConfig.java`) and some have different wording. It is better practice 
for the contributor to change things to do with license and copyright.
   
   Here is a perl script removes any existing headers and puts in the 
appropriate one.
   
   https://gist.github.com/afs/c32177d0614553edee4f0e5ae319fb48
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-27 Thread GitBox
desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487301304
 
 
   About precision, note that `Math.sin`, `cos` _etc._ are not fully 
deterministic even in Java. The specification said only that the result must be 
within 1 or 2 ULP from the real answer. There is variations depending on the 
platform or Java version. Furthermore many map projection formulas are only 
approximations (some have no exact mathematical solution), so the numerical 
output may vary in future Apache SIS versions depending on improvements or 
refactoring done on those calculations.
   
   As a general rule it is safe to compare with a one centimetre precision 
(this is the precision reported in EPSG guidance notes for the published 
formulas). In practice the precision is often better, but not guaranteed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-27 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487297031
 
 
   ## Status (2019-04-27)
   
   ### Next
   
   I've made some changes locally and got the build to work with tests.
   
   All the changes are detailed below.  If the changes are OK, I can merge the 
PR and apply them.
   
   There is still some possible clearing up but the only necessary step before 
release is the L&N for the shared Fuseki server.
   
   ### Details
   
   The parent POM has some stray formatting.
   
    Module: jena-geosparql
   
   Some line ends need fixing - they are windows style (when using a diff, this 
shows up).
   
   Surefire plugin configuration is for another way to run tests but for this 
module runs no tests. The automatic test determination works fine for 
jena-geosparql.
   
   Delete output in tests such as "System.out.println" and companion 
"//System.out.println".
   
   Add dependencies:
   ```
 
 
   org.apache.sis.non-free
   sis-embedded-data
   0.8
   runtime
 
   
 
   javax.xml.bind
   jaxb-api
   2.3.1
 
   ```
   
   Then
   
   mvn8 clean test -Drat.skip=true
   
   passes. (mvn8 is my script to run mvn with OpenJDK 8)
   
    RAT Legal Check
   
   Add to the parent POM:
   
   **/geosparql_vocab_all_v1_0_1_updated.rdf
   Delete logback*.xml
   
   then 
   
   mvn8 clean test
   
   passes.
   
    Java11
   
   maven with OpenJDK11 : has problems which look like a precison/length change 
somewhere in
   the depths.
   
   `BufferFFTest` does some comparison of quite large objects, too big to
   describe here.
   
   There are some tests on `LatLonPoint` like:
   
   GreatCirclePointDistanceTest.testGetPoint_3args_East:185
   expected:  
   but was:  
   
   The test uses `assertEquals(Object,Object)`, no precision factor
   considered as is available with `assertEquals(double, double, delta)`.
   Something for later.
   
    Module jena-fuseki-geosparql
   
   Worked first time!
   
   There will be a bit of L&N work for `geosparql_vocab_all_v1_0_1_updated.rdf`.
   
   I think it would be better placed as: 
   
  /jena-fuseki2/jena-fuseki-geosparql
   
   but still run from the top POM (not in jena-fuseki2/pom.xml for now).
   
   A better Java package name would be to put in the Fuseki family:
   
   `package org.apache.jena.jena_fuseki_geosparql`
   ==>
   `package org.apache.jena.fuseki.geosparql`
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487110358
 
 
   "mvn clean test" takes 12s.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487099217
 
 
   Cool, then we can build it once and pass the location around via a Maven 
property.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487098680
 
 
   The performance interrogation was because SIS may try to create the EPSG 
geodetic database in that directory (depending if 
`org.apache.sis.non-free:sis-epsg` is found on the classpath and the database 
does not already exist), which may take 10~30 seconds.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f edited a comment on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
ajs6f edited a comment on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487095451
 
 
   @desruisseaux We have I/O tests that take five minutes to run-- I'm not sure 
that making a few empty directories is going to change our build time very 
much, but if it does, we can build an `SIS_DATA` directory once in the main 
GeoSPARQL module and pass that location into the submodules via a Maven 
property.
   
   As for the ENV var point, that's fairly trivial: 
   ```
   
   maven-surefire-plugin
   
 
   ${project.build.directory}/SIS_DATA
   ```
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487095451
 
 
   @desruisseaux We have I/O tests that take five minutes to run-- I'm not sure 
that making a few empty directories is going to change our build time very 
much, but if it does, we can build an `SIS_DATA` directory once in the main 
GeoSPARQL module and pass that location into the submodules via a Maven 
property.
   
   As for the ENV var point, that's fairly trivial: 
   ```
   
   maven-surefire-plugin
   
 
   SIS_DATA
   
${project.build.directory}/SIS_DATA
   ```
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487092706
 
 
   `SIS_DATA` is an environment variable, while Maven Surefire 
`` is (in my understanding) for Java properties. 
Another issue is that pointing to `${project.build.directory}/SIS_DATA` implies 
that the actual directory change for each Maven module, which may be a 
performance concern in database is recreated each time.
   
   I have not found an ideal solution yet. The way I handle that in Apache SIS 
is to make tests that depends on `SIS_DATA` optional, with a JUnit `assumeTrue` 
statement at the beginning of those tests. That way, those tests are reported 
as skipped by Surefire or Jenkins.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487088627
 
 
   @afs Can we not use some Maven for that? We could put an empty `SIS_DATA` 
directory in `src/test/resources` and then:
   ```
   
   
 
   src/test/resources/SIS_DATA
 
   
   …
   
 
   maven-surefire-plugin
   
 
   SIS_DATA
   
${project.build.directory}/SIS_DATA
   ```
   ?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs edited a comment on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs edited a comment on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487086401
 
 
   @ajs6f - create an empty test directory, point `SIS_DATA` to it.  However, 
it takes some fixing to get the module running at the moment.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487086401
 
 
   @ajs6f - create an empty test directory, point `SIS_DATA` to it.  However, 
it takes some fixing to get the module at the moment.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487081192
 
 
   @desruisseaux - perfect! Thank you.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487079821
 
 
   @afs No, sorry, I meant to ask you to point me at what we want to run 
_before_ the tests: the setup step.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487079179
 
 
   > @afs  Can you point me at what we actually want to run? 
   
   The tests are in src/test as usual and run with surefire finding \@Test. It 
is not urgent at this point; it is just a warning (I hope!).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487078186
 
 
   Actually, while preparing the email to OGC, I found answer to the question 
in their [legal FAQ](http://www.opengeospatial.org/ogc/legalfaq#DTD). Quoting 
them:
   
   > **Is a schema or document definition (DTD) covered by the document or 
software terms?**
   > Schemas (and DTDs) are frequently part of our specifications and seemingly 
fall under the document copyright terms. However, as long as you do not use the 
same formal namespace or public identifier to identify that modified OGC 
schema/DTD (which might confuse applications), you may treat the schema/DTD 
under the software terms. This means that you are permitted to make a 
derivative or modified OGC schema/DTD, but even under the software terms you 
are obligated to include/retain the OGC copyright notice. We further appreciate 
a couple sentences regarding who made the modifications, when, and what changes 
were made in the original DTD -- a common software documentation practice.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487070553
 
 
   @afs Can you point me at what we actually want to run? Are we talking about 
setting up some of these GIS reference databases like the stuff in `SIS_DATA`, 
or something else?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487070583
 
 
   @desruisseaux, if you could ask OGC that would be great. It makes sense to 
restrict documents that are the definitive specifications (as do most standards 
organisations in some way of other). Reference data can be the same. This 
vocabulary / ontology file is more about defined terms for interoperability.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487069142
 
 
   @ajs6f It is currently working by surefire finding the tests so there is no 
place to add a suite-wide step.  If we add such as step with `RunWith` / 
`SuiteClasses` we can code with \@BeforeClass (or the other ways).
   
   I don't think it needs clearing between tests but I'm not completely sure of 
that.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
desruisseaux commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487064619
 
 
   Hello @afs . The question about the exact license governing the RDF file is 
a good one. I confirm that OGC "Software" license is BSD-like and classified as 
category A for inclusion in Apache software. But I don't know if 
`geosparql_vocab_all_v1_0_1_updated.rdf` is under "Software" or "Document" 
license. I can ask to OGC if desired.
   
   About logging mentioned earlier in this thread, is `org.slf4j:jul-to-slf4j` 
satisfying? Apache SIS has a mechanism for redirecting logging to SLF4J, but if 
JUL work well I could deprecate (and remove later) the SIS mechanism and 
replace by a documentation mentioning JUL.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487061029
 
 
   @afs This PR is so big I cannot even load the list of files in Github's 
browser. Since we are still using JUnit 4 we can write a 
[`Rule`](https://junit.org/junit4/javadoc/4.12/index.html?org/junit/Rule.html) 
or 
[`@ClassRule`](https://junit.org/junit4/javadoc/4.12/index.html?org/junit/ClassRule.html)
 (`static` version) to manage the timing and state of setup ourselves. A 
`@ClassRule` on the suite itself would be what we want to run a few lines of 
code before and after the complete lineup of tests. Is that what you are asking 
about? Or something more granular?
   
   If you can give me the names of some tests, I could pull this branch locally 
and start poking around.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs edited a comment on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs edited a comment on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487046910
 
 
   Next issue:  `geosparql_vocab_all_v1_0_1_updated.rdf`
   
   It references the OGC license for documents 
http://www.opengeospatial.org/legal/ 
   But is it "document" or "software"? 
   
   An OGC "Document" has no right to modify and so is not open source.
   OGC "Software" does not have that restriction (whether the erst of the 
license is OK, I haven't gone into in depth.)
   
   I suspect that it is considered part of the "GeoSPARQL 1.0 is an OGC 
Standard.", so its a document.
   
   @desruisseaux - is that correct?
   
   ---
   
   I did find that if I removed it from `GeoSPARQLOperations`, then recursively 
all methods that got broken by that, it was only the `DatasetOperations.setup` 
call to `GeoSPARQLOperations.applyInferencing` was not available.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487046910
 
 
   Next issue:  `geosparql_vocab_all_v1_0_1_updated.rdf`
   
   It references the OGC license for documents 
http://www.opengeospatial.org/legal/ 
   But is it "document" or "software"? 
   
   An OGC "Document" has no right to modify and so is not open source.
   OGC "Software" does not have that restriction (whether the erst of the 
license is OK, I haven't gone into in depth.)
   
   I suspect that it is considered part of the "GeoSPARQL 1.0 is an OGC 
Standard.", so its a document.
   
   @desruisseaux - is that correct?
   
   ---
   
   I did find that if I removed it from `GeoSPARQLOperations`, then recursive 
all methods that got broken by that, the only the `DatasetOperations.setup` 
call to `GeoSPARQLOperations.applyInferencing` was not available.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs edited a comment on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs edited a comment on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487025047
 
 
   
   > Set the SIS_DATA environment variable to the path of an initially empty 
directory (preferred choice). 
   
   Ignoring that, and running with a java8 JDK works with the 3 warnings, which 
is fine by me.
   
   Where does SIS_DATA setting happen in the gradle setup? I seems to need a 
real directory. My gradle foo ran out and I could not find the setting.
   
   @ajs6f Is there a way to have a few lines of java run before all the tests 
as it is currently setup or do we need to do the 
   
   @RunWith(Suite.class)
   @SuiteClasses({Test1.class, Test2.class})
   
   thing?
   
   I still have a lesser java8/java11 problem.  After adding a dependency in 
`javax.xml.bin.jaxb-api:2.3.1`, I still get 10 test failures. 
   
   `[ERROR]   GreatCircleGeomFFTest.testExec_query:212 
expected:<[344.2664230368865e0^^http://www.w3.org/2001/XMLSchema#double]> but 
was:<[344.26642303688686e0^^http://www.w3.org/2001/XMLSchema#double]>
   `
   which looks like a double precision/length issue.
   
   That is not blocking for merging.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-26 Thread GitBox
afs commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-487025047
 
 
   I'm using this in the POM for the tests:
   ```
   
 
   org.apache.sis.non-free
   sis-embedded-data
   0.8
   test
 
   ```
   and then 
   
   > Set the SIS_DATA environment variable to the path of an initially empty 
directory (preferred choice). 
   
   applies. 
   
   Where does SIS_DATA setting happen in the gradle setup?  My gradle foo ran 
out and I could not find it.
   
   I tried exporting it in the shell - it works when I use a Java8 JDK, and 
fails for Java11 (compiling for Java8).
   
   @ajs6f Is there a way to have a few lines of java run before all the tests 
as it is current setup or do we need to do the 
   
   @RunWith(Suite.class)
   @SuiteClasses({Test1.class, Test2.class})
   
   thing?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #566: Update maven-bundle-plugin

2019-04-26 Thread GitBox
afs opened a new pull request #566: Update maven-bundle-plugin
URL: https://github.com/apache/jena/pull/566
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #564: JENA-1708: Remove unused javadoc artifact depedencies

2019-04-26 Thread GitBox
afs merged pull request #564: JENA-1708: Remove unused javadoc artifact 
depedencies
URL: https://github.com/apache/jena/pull/564
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #565: Update javadoc configuration to support jdk11 builds

2019-04-26 Thread GitBox
afs merged pull request #565: Update javadoc configuration to support jdk11 
builds
URL: https://github.com/apache/jena/pull/565
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] acoburn opened a new pull request #565: Update javadoc configuration to support jdk11 builds

2019-04-25 Thread GitBox
acoburn opened a new pull request #565: Update javadoc configuration to support 
jdk11 builds
URL: https://github.com/apache/jena/pull/565
 
 
   This updates the javadoc configuration so that JDK11-based builds will 
succeed at the javadoc stage. As with the current maven configuration, the Java 
source is set to be Java8.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-25 Thread GitBox
ajs6f commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-486723449
 
 
   Hello, @galbiston-- can you explain a bit what you mean by "I don't think 
there is an equivalent for Maven for test only." Are we trying to put resources 
on the classpath only for the test phases, or have them available in some other 
way for just those phases, or am I misunderstanding what you mean?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #564: JENA-1708: Remove unused javadoc artifact depedencies

2019-04-25 Thread GitBox
afs opened a new pull request #564: JENA-1708: Remove unused javadoc artifact 
depedencies
URL: https://github.com/apache/jena/pull/564
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #560: JENA-1706: Handle "QueryParser"; suppress logging WARN

2019-04-25 Thread GitBox
afs merged pull request #560: JENA-1706: Handle "QueryParser"; suppress logging 
WARN
URL: https://github.com/apache/jena/pull/560
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #560: JENA-1706: Handle "QueryParser"; suppress logging WARN

2019-04-25 Thread GitBox
afs commented on issue #560: JENA-1706: Handle "QueryParser"; suppress logging 
WARN
URL: https://github.com/apache/jena/pull/560#issuecomment-486602867
 
 
   This follows on from #536.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs merged pull request #563: JENA-1707: Skip building modules unless java8

2019-04-25 Thread GitBox
afs merged pull request #563: JENA-1707: Skip building modules unless java8
URL: https://github.com/apache/jena/pull/563
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs commented on issue #563: JENA-1707: Skip building modules unless java8

2019-04-25 Thread GitBox
afs commented on issue #563: JENA-1707: Skip building modules unless java8
URL: https://github.com/apache/jena/pull/563#issuecomment-486601549
 
 
   HADOOP-15338
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] galbiston commented on issue #557: JENA-664 GeoSPARQL Jena

2019-04-24 Thread GitBox
galbiston commented on issue #557: JENA-664 GeoSPARQL Jena
URL: https://github.com/apache/jena/pull/557#issuecomment-486419457
 
 
   I had the SIS_DATA dependency resolved in Gradle for testing both modules by 
"testImplementation "org.apache.sis.non-free:sis-embedded-data:$sisVersion". I 
don't think there is an equivalent for Maven for test only. Due to the 
licensing conflict between EPSG and AL2 I didn't include it as a non-test 
dependency.
   
   The other two warnings are to do with precision in transformations from the 
UK's OSGB36 to WGS84. OSGB36 was just an arbritary choice to use a planar 
coordinate system and conversions from WGS84. I can change the relevant test 
data to one of the main coordinate reference systems and it should make the 
warnings go away. There will just be this underlying configuration of the 
Apache SIS framework.
   
   I asked Martin Desruisseaux from Apache SIS about the warnings and his 
response is below.
   
   "For the warning that you get, actually I should improve the error message. 
I presume that the “OSTN15_NTv2_OSGBtoETRS.gsb” datum shift file is not present 
on your system, so the error message should be "Can not find 
OSTN15_NTv2_OSGBtoETRS.gsb datum shift file". In such case Apache SIS will use 
a less accurate fallback (more on it later).
   
   The SIS_DATA environment variable is used not only for the EPSG database, 
but also for all other kind of data that SIS may need, including datum shift 
files. The EPSG embedded database is more convenient, but does not provide any 
datum shift files yet. We may include some datum shift files in 
sis-embedded-data in the future, but I don't think we could include all of them 
for space (and sometime licensing) reasons. Note also that I noticed that the 
embedded Derby database in a compressed JAR file is at least 5 times slower 
than a Derby database as ordinary files in a directory.
   
   If you want to give a try to SIS_DATA, you can create a DatumChanges 
sub-directory in the SIS_DATA directory and put the OSTN15_NTv2_OSGBtoETRS.gsb 
file there (we can download it from internet). You may also opportunistically 
replace sis-embedded-data module by sis-epsg for better performances (it will 
create the Derby database in that directory). If you prefer to keep 
sis-embedded-data for convenience, then you can ignore those warnings. SIS 
could be improved for making those warnings less disruptive to the users, but 
we have not determined yet how. In any case, I recommend to take a look at the 
output of System.out.println(theCoordinateOperation) and check in particular 
the value inside OperationAccuracy[...] element. The value will be different 
depending if the datum shift file has been found or not; it is up to the 
application to decide if the reported accuracy if sufficient for their needs."


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #563: JENA-1707: Skip building modules unless java8

2019-04-24 Thread GitBox
afs opened a new pull request #563: JENA-1707: Skip building modules unless 
java8
URL: https://github.com/apache/jena/pull/563
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #562: JENA-1695: Modular storage interface and framework

2019-04-24 Thread GitBox
afs opened a new pull request #562:  JENA-1695: Modular storage interface and 
framework 
URL: https://github.com/apache/jena/pull/562
 
 
   JENA-1695: Modular storage interface and framework 
   
   This is the first of two pull requests.
   
   This is the framework and adjusting the code base to align to clear up and 
put in any general fixes found. 
   
   TDB2 is not changed to use the framework, and this PR only has only 
alignment changes.
   
   The second pull request to follow after this is merged switches TDB2 to use 
the jena-db-storage framework.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jena] afs opened a new pull request #561: JENA-1572: Remove L&N in modules that don't need them

2019-04-24 Thread GitBox
afs opened a new pull request #561: JENA-1572: Remove L&N in modules that don't 
need them
URL: https://github.com/apache/jena/pull/561
 
 
   Work in JENA-1572.
   
   This removes LICENSE and NOTICE files that arne't needed for a modules 
source code.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


<    5   6   7   8   9   10   11   12   13   >