You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/04/23 21:56:44 UTC
[28/51] [partial] jena git commit: Rename com.hp.hpl.jena.* as
org.apache.jena.*
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Cast.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Cast.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Cast.java
deleted file mode 100644
index 3c8f305..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Cast.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.ARQNotImplemented ;
-
-
-public class E_Cast extends ExprFunction2
-{
- // See E_StrDatatype
- private static final String symbol = "cast" ;
-
- private E_Cast(Expr expr1, Expr expr2)
- {
- super(expr1, expr2, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- if ( ! x.isString() ) throw new ExprEvalException("cast: arg 2 is not a string: "+x) ;
- if ( ! y.isIRI() ) throw new ExprEvalException("cast: arg 2 is not a URI: "+y) ;
-
- String lex = x.getString() ;
- y.asNode().getURI() ;
-
- throw new ARQNotImplemented() ;
- }
-
- @Override
- public Expr copy(Expr arg1, Expr arg2)
- { return new E_Cast(arg1, arg2) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Coalesce.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Coalesce.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Coalesce.java
deleted file mode 100644
index 05d98a9..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Coalesce.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import java.util.List ;
-
-import com.hp.hpl.jena.sparql.ARQInternalErrorException ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-/** SPARQL coalesce special form. */
-
-public class E_Coalesce extends ExprFunctionN
-{
- private static final String name = Tags.tagCoalesce ;
-
- public E_Coalesce(ExprList args)
- {
- super(name, args) ;
- }
-
- @Override
- public NodeValue evalSpecial(Binding binding, FunctionEnv env)
- {
- for ( Expr expr : super.getArgs() )
- {
- try {
- NodeValue nv = expr.eval(binding, env) ;
- return nv ;
- } catch (ExprEvalException ex) {}
- }
- throw new ExprEvalException("COALESCE: no value") ;
- }
-
- @Override
- public Expr copy(ExprList newArgs)
- {
- return new E_Coalesce(newArgs) ;
- }
-
- @Override
- public NodeValue eval(List<NodeValue> args)
- { throw new ARQInternalErrorException() ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Conditional.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Conditional.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Conditional.java
deleted file mode 100644
index ea64948..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Conditional.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.ARQInternalErrorException ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-/** IF(expr, expr, expr) */
-
-public class E_Conditional extends ExprFunction3
-{
- private static final String functionName = Tags.tagIf ;
-
- private final Expr condition ;
- private final Expr thenExpr ;
- private final Expr elseExpr ;
-
- public E_Conditional(Expr condition, Expr thenExpr, Expr elseExpr)
- {
- // Don't let the parent eval the theEpxr or ifExpr.
- super(condition, thenExpr, elseExpr, functionName) ;
- // Better names,
- this.condition = condition ;
- this.thenExpr = thenExpr ;
- this.elseExpr = elseExpr ;
- }
-
- @Override
- public Expr copy(Expr arg1, Expr arg2, Expr arg3)
- {
- return new E_Conditional(arg1, arg2, arg3) ;
- }
-
- /** Special form evaluation (example, don't eval the arguments first) */
- @Override
- protected NodeValue evalSpecial(Binding binding, FunctionEnv env)
- {
- NodeValue nv = condition.eval(binding, env) ;
- if ( condition.isSatisfied(binding, env) )
- return thenExpr.eval(binding, env) ;
- else
- return elseExpr.eval(binding, env) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y, NodeValue z)
- {
- throw new ARQInternalErrorException() ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Datatype.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Datatype.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Datatype.java
deleted file mode 100644
index 611e411..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Datatype.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeFunctions ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_Datatype extends ExprFunction1
-{
- private static final String symbol = Tags.tagDatatype ;
-
- public E_Datatype(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return NodeFunctions.datatype(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_Datatype(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeDay.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeDay.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeDay.java
deleted file mode 100644
index c25e47b..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeDay.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_DateTimeDay extends ExprFunction1
-{
- private static final String symbol = Tags.tagDay ;
-
- public E_DateTimeDay(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.getDay(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_DateTimeDay(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeHours.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeHours.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeHours.java
deleted file mode 100644
index 72888af..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeHours.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_DateTimeHours extends ExprFunction1
-{
- private static final String symbol = Tags.tagHours ;
-
- public E_DateTimeHours(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.getHours(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_DateTimeHours(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeMinutes.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeMinutes.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeMinutes.java
deleted file mode 100644
index c65c3b8..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeMinutes.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_DateTimeMinutes extends ExprFunction1
-{
- private static final String symbol = Tags.tagMinutes ;
-
- public E_DateTimeMinutes(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.getMinutes(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_DateTimeMinutes(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeMonth.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeMonth.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeMonth.java
deleted file mode 100644
index 144903f..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeMonth.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_DateTimeMonth extends ExprFunction1
-{
- private static final String symbol = Tags.tagMonth ;
-
- public E_DateTimeMonth(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.getMonth(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_DateTimeMonth(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeSeconds.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeSeconds.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeSeconds.java
deleted file mode 100644
index ddb0c79..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeSeconds.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_DateTimeSeconds extends ExprFunction1
-{
- private static final String symbol = Tags.tagSeconds ;
-
- public E_DateTimeSeconds(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.getSeconds(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_DateTimeSeconds(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeTZ.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeTZ.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeTZ.java
deleted file mode 100644
index a47f748..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeTZ.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_DateTimeTZ extends ExprFunction1
-{
- private static final String symbol = Tags.tagTZ ;
-
- public E_DateTimeTZ(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.dtGetTZ(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_DateTimeTZ(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeTimezone.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeTimezone.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeTimezone.java
deleted file mode 100644
index 78a5fe3..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeTimezone.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_DateTimeTimezone extends ExprFunction1
-{
- private static final String symbol = Tags.tagTimezone ;
-
- public E_DateTimeTimezone(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.dtGetTimezone(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_DateTimeTimezone(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeYear.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeYear.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeYear.java
deleted file mode 100644
index b5e4a16..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_DateTimeYear.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_DateTimeYear extends ExprFunction1
-{
- private static final String symbol = Tags.tagYear ;
-
- public E_DateTimeYear(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.getYear(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_DateTimeYear(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Divide.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Divide.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Divide.java
deleted file mode 100644
index 13d9234..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Divide.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.query.ARQ ;
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeValueOps ;
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_Divide extends ExprFunction2
-{
- private static final String functionName = Tags.tagDivide ;
- private static final String symbol = Tags.symDiv ;
-
- public E_Divide(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- if ( ARQ.isStrictMode() )
- return XSDFuncOp.numDivide(x, y) ;
-
- return NodeValueOps.divisionNV(x, y) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_Divide(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Equals.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Equals.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Equals.java
deleted file mode 100644
index 6ea2c28..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Equals.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_Equals extends ExprFunction2
-{
- private static final String functionName = Tags.tagEQ ;
- private static final String symbol = Tags.symEQ ;
-
- public E_Equals(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- // Note: notSameValueAs means "known to be different"
- // sameValueAs means "know to be the same value"
- // so they are not opposites
-
- boolean b = NodeValue.sameAs(x, y) ;
- return NodeValue.booleanReturn(b) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_Equals(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Exists.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Exists.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Exists.java
deleted file mode 100644
index 3f3f99d..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Exists.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.algebra.Algebra ;
-import com.hp.hpl.jena.sparql.algebra.Op ;
-import com.hp.hpl.jena.sparql.core.Substitute ;
-import com.hp.hpl.jena.sparql.engine.QueryIterator ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.graph.NodeTransform ;
-import com.hp.hpl.jena.sparql.graph.NodeTransformLib ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-import com.hp.hpl.jena.sparql.syntax.Element ;
-
-public class E_Exists extends ExprFunctionOp
-{
- private static final String symbol = Tags.tagExists ;
-
- public E_Exists(Op op)
- {
- this(null, op) ;
- }
-
- public E_Exists(Element elt)
- {
- this(elt, Algebra.compile(elt)) ;
- }
-
- public E_Exists(Element el, Op op)
- {
- super(symbol, el, op) ;
- }
-
- @Override
- public Expr copySubstitute(Binding binding)
- {
- Op op2 = Substitute.substitute(getGraphPattern(), binding) ;
- return new E_Exists(getElement(), op2) ;
- }
-
- @Override
- public Expr applyNodeTransform(NodeTransform nodeTransform)
- {
- Op op2 = NodeTransformLib.transform(nodeTransform, getGraphPattern()) ;
- return new E_Exists(getElement(), op2) ;
- }
-
-
- @Override
- protected NodeValue eval(Binding binding, QueryIterator qIter, FunctionEnv env)
- {
- boolean b = qIter.hasNext() ;
- return NodeValue.booleanReturn(b) ;
- }
-
- @Override
- public int hashCode()
- {
- return symbol.hashCode() ^ getGraphPattern().hashCode() ;
- }
-
- @Override
- public boolean equals(Object other)
- {
- if ( this == other ) return true ;
-
- if ( ! ( other instanceof E_Exists ) )
- return false ;
-
- E_Exists ex = (E_Exists)other ;
- return this.getGraphPattern().equals(ex.getGraphPattern()) ;
- }
-
- @Override
- public ExprFunctionOp copy(ExprList args, Op x) { return new E_Exists(x) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Function.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Function.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Function.java
deleted file mode 100644
index 52962c5..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Function.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import java.util.List ;
-
-import com.hp.hpl.jena.query.ARQ ;
-import com.hp.hpl.jena.sparql.ARQInternalErrorException ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.function.Function ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.function.FunctionFactory ;
-import com.hp.hpl.jena.sparql.function.FunctionRegistry ;
-import com.hp.hpl.jena.sparql.serializer.SerializationContext ;
-import com.hp.hpl.jena.sparql.util.Context ;
-import com.hp.hpl.jena.sparql.util.FmtUtils ;
-
-/** SPARQL filter function */
-
-public class E_Function extends ExprFunctionN
-{
- private static final String name = "function" ;
- public static boolean WarnOnUnknownFunction = true ;
- private String functionIRI ;
-
- // Only set after a copySubstitute has been done by PlanFilter.
- // at which point this instance if not part of the query abstract syntax.
- private Function function = null ;
- private boolean functionBound = false ;
-
- public E_Function(String functionIRI, ExprList args)
- {
- super(name, args) ;
- this.functionIRI = functionIRI ;
- }
-
- @Override
- public String getFunctionIRI() { return functionIRI ; }
-
- // The Function subsystem takes over evaluation via SpecialForms.
- // This is merely to allow "function" to behave as special forms
- // (this is discouraged).
- // Doing the function call in evalSpecial maintains the old
- // interface to functions.
-
- @Override
- public NodeValue evalSpecial(Binding binding, FunctionEnv env)
- {
- // Only needed because some tests call straight in.
- // Otherwise, the buildFunction() calls should have done everything
- if ( ! functionBound )
- buildFunction(env.getContext()) ;
- if ( function == null )
- throw new ExprEvalException("URI <"+getFunctionIRI()+"> not bound") ;
- NodeValue r = function.exec(binding, args, getFunctionIRI(), env) ;
- return r ;
- }
-
- @Override
- public NodeValue eval(List<NodeValue> args)
- {
- // For functions, we delay argument evaluation to the "Function" heierarchy
- // so applications can add their own functional forms.
- throw new ARQInternalErrorException() ;
- }
-
- public void buildFunction(Context cxt)
- {
- try { bindFunction(cxt) ; }
- catch (ExprException ex)
- {
- if ( WarnOnUnknownFunction )
- ARQ.getExecLogger().warn("URI <"+functionIRI+"> has no registered function factory") ;
- }
- }
-
- private void bindFunction(Context cxt)
- {
- if ( functionBound )
- return ;
-
- FunctionRegistry registry = chooseRegistry(cxt) ;
- FunctionFactory ff = registry.get(functionIRI) ;
-
- if ( ff == null )
- {
- functionBound = true ;
- throw new ExprEvalException("URI <"+functionIRI+"> not found as a function") ;
- }
- function = ff.create(functionIRI) ;
- function.build(functionIRI, args) ;
- functionBound = true ;
- }
-
- private FunctionRegistry chooseRegistry(Context context)
- {
- FunctionRegistry registry = FunctionRegistry.get(context) ;
- if ( registry == null )
- registry = FunctionRegistry.get() ;
- return registry ;
- }
-
- @Override
- public String getFunctionPrintName(SerializationContext cxt)
- {
- return FmtUtils.stringForURI(functionIRI, cxt) ;
- }
-
- @Override
- public String getFunctionName(SerializationContext cxt)
- {
- return FmtUtils.stringForURI(functionIRI, cxt) ;
- }
-
-
- @Override
- public Expr copy(ExprList newArgs)
- {
- return new E_Function(getFunctionIRI(), newArgs) ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_FunctionDynamic.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_FunctionDynamic.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_FunctionDynamic.java
deleted file mode 100644
index f3160d6..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_FunctionDynamic.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-
-public class E_FunctionDynamic extends E_Call
-{
- public E_FunctionDynamic(Expr function, ExprList args)
- {
- this(concatArgs(function, args)) ;
- }
-
- public E_FunctionDynamic(ExprList args)
- {
- super(args) ;
- }
-
- private static ExprList concatArgs(Expr expr, ExprList args)
- {
- args = ExprList.copy(args) ;
- args.getList().add(0, expr) ;
- return args ;
- }
-
- @Override
- public Expr copy(ExprList newArgs) { return new E_FunctionDynamic(newArgs) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_GreaterThan.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_GreaterThan.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_GreaterThan.java
deleted file mode 100644
index ee2a635..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_GreaterThan.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_GreaterThan extends ExprFunction2
-{
- private static final String functionName = Tags.tagGT ;
- private static final String symbol = Tags.symGT ;
-
- public E_GreaterThan(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- int r = NodeValue.compare(x, y) ;
- return NodeValue.booleanReturn( r == Expr.CMP_GREATER ) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_GreaterThan(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_GreaterThanOrEqual.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_GreaterThanOrEqual.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_GreaterThanOrEqual.java
deleted file mode 100644
index d4c52d3..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_GreaterThanOrEqual.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_GreaterThanOrEqual extends ExprFunction2
-{
- private static final String functionName = Tags.tagGE ;
- private static final String symbol = Tags.symGE ;
-
- public E_GreaterThanOrEqual(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- int r = NodeValue.compare(x, y) ;
- return NodeValue.booleanReturn( r == Expr.CMP_GREATER || r == Expr.CMP_EQUAL ) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_GreaterThanOrEqual(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IRI.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IRI.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IRI.java
deleted file mode 100644
index b92e48e..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IRI.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.query.Query ;
-import com.hp.hpl.jena.sparql.ARQConstants ;
-import com.hp.hpl.jena.sparql.ARQInternalErrorException ;
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeFunctions ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_IRI extends ExprFunction1
-{
- private static final String symbol = Tags.tagIri ;
-
- public E_IRI(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- public E_IRI(Expr expr, String altSymbol)
- {
- super(expr, altSymbol) ;
- }
-
- // Use the hook to get the env.
- @Override
- public NodeValue eval(NodeValue v, FunctionEnv env)
- {
- String baseIRI = null ;
- if ( env.getContext() != null )
- {
- Query query = (Query)env.getContext().get(ARQConstants.sysCurrentQuery) ;
- if ( query != null )
- baseIRI = query.getBaseURI() ;
- }
- return NodeFunctions.iri(v, baseIRI) ;
- }
-
- @Override
- public Expr copy(Expr expr) { return new E_IRI(expr) ; }
-
- @Override
- public NodeValue eval(NodeValue v)
- {
- throw new ARQInternalErrorException("Should not be called") ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsBlank.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsBlank.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsBlank.java
deleted file mode 100644
index 25443b0..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsBlank.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeFunctions ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_IsBlank extends ExprFunction1
-{
- private static final String symbol = Tags.tagIsBlank ;
-
- public E_IsBlank(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return NodeFunctions.isBlank(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_IsBlank(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsIRI.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsIRI.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsIRI.java
deleted file mode 100644
index a3d7ad7..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsIRI.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeFunctions ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_IsIRI extends ExprFunction1
-{
- private static final String symbol = Tags.tagIsIRI ;
-
- public E_IsIRI(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- public E_IsIRI(Expr expr, String altSymbol)
- {
- super(expr, altSymbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return NodeFunctions.isIRI(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_IsIRI(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsLiteral.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsLiteral.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsLiteral.java
deleted file mode 100644
index b6ab14a..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsLiteral.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-
-public class E_IsLiteral extends ExprFunction1
-{
- private static final String symbol = Tags.tagIsLiteral ;
-
- public E_IsLiteral(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v)
- {
- if ( v.isLiteral() )
- return NodeValue.TRUE ;
- return NodeValue.FALSE ;
- }
-
- @Override
- public Expr copy(Expr expr) { return new E_IsLiteral(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsNumeric.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsNumeric.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsNumeric.java
deleted file mode 100644
index 9831c56..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsNumeric.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-
-public class E_IsNumeric extends ExprFunction1
-{
- private static final String symbol = Tags.tagIsNumeric ;
-
- public E_IsNumeric(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v)
- {
- if ( v.isNumber() )
- return NodeValue.TRUE ;
- return NodeValue.FALSE ;
- }
-
- @Override
- public Expr copy(Expr expr) { return new E_IsNumeric(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsURI.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsURI.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsURI.java
deleted file mode 100644
index 35aebbc..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_IsURI.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeFunctions ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_IsURI extends E_IsIRI
-{
- // "isURI" is another name for "isIRI" -- we try to keep the parse name.
-
- private static final String symbol = Tags.tagIsURI ;
-
- public E_IsURI(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return NodeFunctions.isURI(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_IsURI(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Lang.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Lang.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Lang.java
deleted file mode 100644
index c5048ad..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Lang.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeFunctions ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_Lang extends ExprFunction1
-{
- private static final String symbol = Tags.tagLang ;
-
- public E_Lang(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return NodeFunctions.lang(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_Lang(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LangMatches.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LangMatches.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LangMatches.java
deleted file mode 100644
index 6143928..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LangMatches.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeFunctions ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_LangMatches extends ExprFunction2
-{
- private static final String symbol = Tags.tagLangMatches ;
-
- public E_LangMatches(Expr expr1, Expr expr2)
- {
- super(expr1, expr2, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue lang, NodeValue pattern)
- {
- return NodeFunctions.langMatches(lang, pattern) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_LangMatches(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LessThan.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LessThan.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LessThan.java
deleted file mode 100644
index 57839b0..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LessThan.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_LessThan extends ExprFunction2
-{
- private static final String functionName = Tags.tagLT ;
- private static final String symbol = Tags.symLT ;
-
- public E_LessThan(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- int r = NodeValue.compare(x, y) ;
- return NodeValue.booleanReturn( r == Expr.CMP_LESS ) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_LessThan(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LessThanOrEqual.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LessThanOrEqual.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LessThanOrEqual.java
deleted file mode 100644
index 2a6dcb2..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LessThanOrEqual.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_LessThanOrEqual extends ExprFunction2
-{
- private static final String functionName = Tags.tagLE ;
- private static final String symbol = Tags.symLE ;
-
- public E_LessThanOrEqual(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- int r = NodeValue.compare(x, y) ;
- return NodeValue.booleanReturn( r == Expr.CMP_LESS || r == Expr.CMP_EQUAL ) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_LessThanOrEqual(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalAnd.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalAnd.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalAnd.java
deleted file mode 100644
index 6a3f1f4..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalAnd.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_LogicalAnd extends ExprFunction2
-{
- // See logical OR
- private static final String functionName = Tags.tagAnd ;
- private static final String symbol = Tags.symAnd ;
-
- public E_LogicalAnd(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- // Special : does not evaluate RHS if LHS means it is unnecessary.
- @Override
- public NodeValue evalSpecial(Binding binding, FunctionEnv env)
- {
- ExprEvalException error = null ;
- try {
- NodeValue x = getArg1().eval(binding, env) ;
-
- if ( ! XSDFuncOp.booleanEffectiveValue(x) )
- return NodeValue.FALSE ;
- } catch (ExprEvalException eee)
- {
- // RHS Must be true else error.
- error = eee ;
- }
-
- // LHS was false or error.
-
- try {
- NodeValue y = getArg2().eval(binding, env) ;
-
- if ( ! XSDFuncOp.booleanEffectiveValue(y) )
- return NodeValue.FALSE ;
-
- // RHS is true but was there an error earlier?
- if ( error != null )
- throw error ;
-
- return NodeValue.TRUE ;
- } catch (ExprEvalException eee)
- {
- // LHS an error, RHS was not false => error
- // Throw the first
- if ( error != null )
- throw error ;
- // RHS was true - throw this error.
- throw eee ;
- }
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- // Evaluation only happens as part of copySubstitute.
- // Proper evaluation is a special form as above.
-
- if ( ! x.isBoolean() )
- throw new ExprEvalException("Not a boolean: "+x) ;
- if ( ! y.isBoolean() )
- throw new ExprEvalException("Not a boolean: "+y) ;
-
- boolean boolX = x.getBoolean() ;
- boolean boolY = y.getBoolean() ;
- return NodeValue.makeBoolean( boolX && boolY ) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_LogicalAnd(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalNot.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalNot.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalNot.java
deleted file mode 100644
index 179e484..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalNot.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_LogicalNot extends ExprFunction1
-{
- // See logicalOR for truth table.
-
- // Errors propage as normal.
- private static final String functionName = Tags.tagNot ;
- private static final String symbol = Tags.symNot ;
-
- public E_LogicalNot(Expr expr)
- {
- super(expr, functionName, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v)
- {
- return XSDFuncOp.not(v) ;
- }
-
- @Override
- public Expr copy(Expr expr) { return new E_LogicalNot(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalOr.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalOr.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalOr.java
deleted file mode 100644
index 9c93697..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_LogicalOr.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-/*
- Logical OR and AND is special with respect to handling errors truth table.
-
- A B | NOT A A && B A || B
- -------------------------------------
- E E | E E E
- E T | E E T
- E F | E F E
- T E | F E T
- T T | F T T
- T F | F F T
- F E | T F E
- F T | T F T
- F F | T F F
-*/
-
-public class E_LogicalOr extends ExprFunction2
-{
-
- private static final String functionName = Tags.tagOr ;
- private static final String symbol = Tags.symOr ;
-
- public E_LogicalOr(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- @Override
- public NodeValue evalSpecial(Binding binding, FunctionEnv env)
- {
- ExprEvalException error = null ;
- try {
- NodeValue x = getArg1().eval(binding, env) ;
-
- if ( XSDFuncOp.booleanEffectiveValue(x) )
- return NodeValue.TRUE ;
- } catch (ExprEvalException eee)
- {
- // RHS Must be true else error.
- error = eee ;
- }
-
- // LHS was false or error.
-
- try {
- NodeValue y = getArg2().eval(binding, env) ;
-
- if ( XSDFuncOp.booleanEffectiveValue(y) )
- return NodeValue.TRUE ;
-
- // RHS is false but was there an error earlier?
- if ( error != null )
- throw error ;
-
- return NodeValue.FALSE ;
- } catch (ExprEvalException eee)
- {
- // LHS an error, RHS was not true => error
- // Throw the first
- if ( error != null )
- throw error ;
- // RHS was false - throw this error.
- throw eee ;
- }
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- // Evaluation only happens as part of copySubstitute.
- // Proper evaluation is a special form as above.
-
- if ( ! x.isBoolean() )
- throw new ExprEvalException("Not a boolean: "+x) ;
- if ( ! y.isBoolean() )
- throw new ExprEvalException("Not a boolean: "+y) ;
-
- boolean boolX = x.getBoolean() ;
- boolean boolY = y.getBoolean() ;
- return NodeValue.makeBoolean( boolX || boolY ) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_LogicalOr(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_MD5.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_MD5.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_MD5.java
deleted file mode 100644
index 5e66fa3..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_MD5.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import java.util.Locale ;
-
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_MD5 extends ExprDigest
-{
- private static final String symbol = Tags.tagMD5.toUpperCase(Locale.ROOT) ;
-
- public E_MD5(Expr expr)
- {
- super(expr, symbol, "MD5") ;
- }
-
- @Override
- public Expr copy(Expr expr) { return new E_MD5(expr) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Multiply.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Multiply.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Multiply.java
deleted file mode 100644
index bb3c880..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Multiply.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.query.ARQ ;
-import com.hp.hpl.jena.sparql.expr.nodevalue.NodeValueOps ;
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_Multiply extends ExprFunction2
-{
- private static final String functionName = Tags.tagMultiply ;
- private static final String symbol = Tags.symMult ;
-
- public E_Multiply(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y) {
- if ( ARQ.isStrictMode() )
- return XSDFuncOp.numMultiply(x, y) ;
-
- return NodeValueOps.multiplicationNV(x, y) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_Multiply(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotEquals.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotEquals.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotEquals.java
deleted file mode 100644
index b18b861..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotEquals.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_NotEquals extends ExprFunction2
-{
- private static final String functionName = Tags.tagNE ;
- private static final String symbol = Tags.symNE ;
-
- public E_NotEquals(Expr left, Expr right)
- {
- super(left, right, functionName, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue x, NodeValue y)
- {
- // Note: notSameValueAs means "known to be different"
- // sameValueAs means "know to be the same value"
- // so they are not opposites
-
- boolean b = NodeValue.notSameAs(x, y) ;
- return NodeValue.booleanReturn(b) ;
- }
-
- @Override
- public Expr copy(Expr e1, Expr e2) { return new E_NotEquals(e1 , e2 ) ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotExists.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotExists.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotExists.java
deleted file mode 100644
index ecd4fc7..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotExists.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.algebra.Algebra ;
-import com.hp.hpl.jena.sparql.algebra.Op ;
-import com.hp.hpl.jena.sparql.core.Substitute ;
-import com.hp.hpl.jena.sparql.engine.QueryIterator ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.graph.NodeTransform ;
-import com.hp.hpl.jena.sparql.graph.NodeTransformLib ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-import com.hp.hpl.jena.sparql.syntax.Element ;
-
-public class E_NotExists extends ExprFunctionOp
-{
- // Translated to "(not (exists (...)))"
- private static final String symbol = Tags.tagNotExists ;
-
- public E_NotExists(Op op)
- {
- this(null, op) ;
- }
-
- public E_NotExists(Element elt)
- {
- this(elt, Algebra.compile(elt)) ;
- }
-
- public E_NotExists(Element el, Op op)
- {
- super(symbol, el, op) ;
- }
-
- @Override
- public Expr copySubstitute(Binding binding)
- {
- Op op2 = Substitute.substitute(getGraphPattern(), binding) ;
- return new E_NotExists(getElement(), op2) ;
- }
-
- @Override
- public Expr applyNodeTransform(NodeTransform nodeTransform)
- {
- Op op2 = NodeTransformLib.transform(nodeTransform, getGraphPattern()) ;
- return new E_NotExists(getElement(), op2) ;
- }
-
- @Override
- protected NodeValue eval(Binding binding, QueryIterator qIter, FunctionEnv env)
- {
- boolean b = qIter.hasNext() ;
- return NodeValue.booleanReturn(!b) ;
- }
-
- @Override
- public int hashCode()
- {
- return symbol.hashCode() ^ getGraphPattern().hashCode() ;
- }
-
- @Override
- public boolean equals(Object other)
- {
- if ( this == other ) return true ;
-
- if ( ! ( other instanceof E_NotExists ) )
- return false ;
-
- E_NotExists ex = (E_NotExists)other ;
- return this.getGraphPattern().equals(ex.getGraphPattern()) ;
- }
-
- @Override
- public ExprFunctionOp copy(ExprList args, Op x) { return new E_NotExists(x) ; }
-
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotOneOf.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotOneOf.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotOneOf.java
deleted file mode 100644
index f8b03bb..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NotOneOf.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import java.util.List ;
-
-import com.hp.hpl.jena.sparql.ARQInternalErrorException ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.function.FunctionEnv ;
-import com.hp.hpl.jena.sparql.sse.Tags;
-
-public class E_NotOneOf extends E_OneOfBase
-{
- private static final String functionName = Tags.tagNotIn ;
-
- public E_NotOneOf(Expr expr, ExprList args)
- {
- super(functionName, expr, args) ;
- }
-
- protected E_NotOneOf(ExprList args)
- {
- super(functionName, args) ;
- }
-
- @Override
- public NodeValue evalSpecial(Binding binding, FunctionEnv env)
- {
- boolean b = super.evalNotOneOf(binding, env) ;
- return NodeValue.booleanReturn(b) ;
- }
-
- @Override
- public NodeValue eval(List<NodeValue> args)
- { throw new ARQInternalErrorException() ; }
-
- @Override
- public Expr copy(ExprList newArgs)
- {
- return new E_NotOneOf(newArgs) ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Now.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Now.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Now.java
deleted file mode 100644
index 5fe1faf..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Now.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.ARQConstants ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_Now extends ExprSystem
-{
- static private String fName = Tags.tagNow ;
-
- public E_Now()
- {
- super(fName, ARQConstants.sysCurrentTime) ;
- }
-
- @Override
- public Expr copy()
- {
- return new E_Now() ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NumAbs.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NumAbs.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NumAbs.java
deleted file mode 100644
index bf2e2d8..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_NumAbs.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 com.hp.hpl.jena.sparql.expr;
-
-import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp ;
-import com.hp.hpl.jena.sparql.sse.Tags ;
-
-public class E_NumAbs extends ExprFunction1
-{
- private static final String symbol = Tags.tagNumAbs ;
-
- public E_NumAbs(Expr expr)
- {
- super(expr, symbol) ;
- }
-
- @Override
- public NodeValue eval(NodeValue v) { return XSDFuncOp.abs(v) ; }
-
- @Override
- public Expr copy(Expr expr) { return new E_NumAbs(expr) ; }
-}