Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/362255 )

Change subject: Fix some code in BOp's
......................................................................

Fix some code in BOp's

Change-Id: I91aa4254ce4979145a98257a2343a39bb0ea3eab
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/CoordinatePartBOp.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseCornerBOp.java
2 files changed, 16 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/55/362255/1

diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/CoordinatePartBOp.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/CoordinatePartBOp.java
index 4628bbe..3919c31 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/CoordinatePartBOp.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/CoordinatePartBOp.java
@@ -9,7 +9,6 @@
 import com.bigdata.bop.BOp;
 import com.bigdata.bop.IBindingSet;
 import com.bigdata.bop.IValueExpression;
-import com.bigdata.bop.ImmutableBOp;
 import com.bigdata.bop.NV;
 import com.bigdata.rdf.internal.IV;
 import com.bigdata.rdf.internal.constraints.INeedsMaterialization;
@@ -33,17 +32,11 @@
     public enum Parts { GLOBE, LAT, LON };
 
     /**
-     * Annotaion for specific corner.
+     * Annotation for specific part.
+     * The operation to be applied to the operands (required).
+     * The value of this annotation is a {@link CoordinatePartBOp.Parts}.
      */
-    public interface Annotations extends ImmutableBOp.Annotations {
-        /**
-         * The operation to be applied to the operands (required).
-         * The value of this annotation is a {@link WikibaseCornerBOp}.
-         *
-         * @see WikibaseCornerBOp
-         */
-        String OP = (CoordinatePartBOp.class.getName() + ".op").intern();
-    }
+    private static final String OP_ANNOTATION = 
(CoordinatePartBOp.class.getName() + ".op").intern();
 
     /**
      * Required shallow copy constructor.
@@ -58,9 +51,8 @@
 
     /**
      * Main ctor.
-     * @param left Eastern corner of the box
-     * @param right Wester corner of the box
-     * @param corner Which corner we want as the result
+     * @param coord Coordinate
+     * @param part Which part we need to get
      * @param globals
      */
     @SuppressWarnings("rawtypes")
@@ -68,7 +60,7 @@
             final Parts part,
             final GlobalAnnotations globals) {
         this(new BOp[]{coord},
-                anns(globals, new NV(Annotations.OP, part)));
+                anns(globals, new NV(OP_ANNOTATION, part)));
     }
 
     /**
@@ -79,11 +71,11 @@
     }
 
     /**
-     * Get which corner we're needing for this op.
-     * @return
+     * Get which part we're needing for this op.
+     * @return Part which we're getting with this op
      */
     private Parts part() {
-        return (Parts) getRequiredProperty(Annotations.OP);
+        return (Parts) getRequiredProperty(OP_ANNOTATION);
     }
 
     @Override
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseCornerBOp.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseCornerBOp.java
index 7468ad4..9513c1b 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseCornerBOp.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseCornerBOp.java
@@ -38,16 +38,10 @@
 
     /**
      * Annotaion for specific corner.
+     * The operation to be applied to the operands (required).
+     * The value of this annotation is a {@link WikibaseCornerBOp.Corners}.
      */
-    public interface Annotations extends ImmutableBOp.Annotations {
-        /**
-         * The operation to be applied to the operands (required).
-         * The value of this annotation is a {@link WikibaseCornerBOp}.
-         *
-         * @see WikibaseCornerBOp
-         */
-        String OP = (WikibaseCornerBOp.class.getName() + ".op").intern();
-    }
+    private static final String OP_ANNOTATION = 
(WikibaseCornerBOp.class.getName() + ".op").intern();
 
     /**
      * Required shallow copy constructor.
@@ -73,7 +67,7 @@
             final Corners corner,
             final GlobalAnnotations globals) {
         this(new BOp[]{left, right},
-                anns(globals, new NV(Annotations.OP, corner)));
+                anns(globals, new NV(OP_ANNOTATION, corner)));
     }
 
     /**
@@ -85,10 +79,10 @@
 
     /**
      * Get which corner we're needing for this op.
-     * @return
+     * @return The corner for this specific op.
      */
     private Corners corner() {
-        return (Corners) getRequiredProperty(Annotations.OP);
+        return (Corners) getRequiredProperty(OP_ANNOTATION);
     }
 
     /**

-- 
To view, visit https://gerrit.wikimedia.org/r/362255
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91aa4254ce4979145a98257a2343a39bb0ea3eab
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to