lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r730205 - in /lucene/java/trunk/contrib/spatial/src: java/org/apache/lucene/spatial/tier/ test/org/apache/lucene/spatial/tier/
Date Tue, 30 Dec 2008 18:00:56 GMT
Author: ryan
Date: Tue Dec 30 10:00:56 2008
New Revision: 730205

URL: http://svn.apache.org/viewvc?rev=730205&view=rev
Log:
LUCENE-1503 -- refactor spatial Query/Filter classes

Added:
    lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java
  (contents, props changed)
      - copied, changed from r730067, lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilter.java
    lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
  (contents, props changed)
      - copied, changed from r730067, lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQuery.java
Removed:
    lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilter.java
    lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQuery.java
Modified:
    lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/PolyShape.java
    lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
    lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java

Copied: lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java
(from r730067, lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilter.java)
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java?p2=lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java&p1=lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilter.java&r1=730067&r2=730205&rev=730205&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilter.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java
Tue Dec 30 10:00:56 2008
@@ -31,7 +31,7 @@
 /**
  *
  */
-public class CartesianPolyFilter {
+public class CartesianPolyFilterBuilder {
 
   private IProjector projector = new SinusoidalProjector();
   private Logger log = Logger.getLogger(getClass().getName());

Propchange: lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
(from r730067, lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQuery.java)
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java?p2=lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java&p1=lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQuery.java&r1=730067&r2=730205&rev=730205&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQuery.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
Tue Dec 30 10:00:56 2008
@@ -24,7 +24,7 @@
 import org.apache.lucene.spatial.SerialChainFilter;
 
 
-public class DistanceQuery {
+public class DistanceQueryBuilder {
 
   private static final long serialVersionUID = 1L;
   
@@ -47,14 +47,14 @@
    * @param lng
    * @param miles
    */
-  public DistanceQuery (double lat, double lng, double miles, String latField, String lngField,
boolean needPrecise){
+  public DistanceQueryBuilder (double lat, double lng, double miles, String latField, String
lngField, boolean needPrecise){
 
     this.lat = lat;
     this.lng = lng;
     this.miles = miles;
     
     
-    CartesianPolyFilter cpf = new CartesianPolyFilter();
+    CartesianPolyFilterBuilder cpf = new CartesianPolyFilterBuilder();
     cartesianFilter = cpf.getBoundingArea(lat, lng, (int)miles);
 
     /* create precise distance filter */

Propchange: lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/PolyShape.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/PolyShape.java?rev=730205&r1=730204&r2=730205&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/PolyShape.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/PolyShape.java
Tue Dec 30 10:00:56 2008
@@ -1 +1 @@
-/**
 * 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.lucene.spatial.tier;


/**
 *
*/
public class PolyShape {

  private static double lat = 38.969398; 
  private static double
lng= -77.386398;
  private static int mil
 es = 1000;
  /**
   * @param args
   */
  public static void main(String[] args) {
  
  
 CartesianPolyFilter cpf = new CartesianPolyFilter();
    cpf.getBoxShape(lat, lng, miles);
   
  }

}
\ No newline at end of file
+/**
 * 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.lucene.spatial.tier;


/**
 *
*/
public class PolyShape {

  private static double lat = 38.969398; 
  private static double
lng= -77.386398;
  private static int mil
 es = 1000;
  /**
   * @param args
   */
  public static void main(String[] args) {
  
  
 CartesianPolyFilterBuilder cpf = new CartesianPolyFilterBuilder();
    cpf.getBoxShape(lat,
lng, miles);
    
  }

}
\ No newline at end of file

Modified: lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java?rev=730205&r1=730204&r2=730205&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
Tue Dec 30 10:00:56 2008
@@ -35,7 +35,7 @@
 import org.apache.lucene.search.Sort;
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.spatial.tier.DistanceQuery;
+import org.apache.lucene.spatial.tier.DistanceQueryBuilder;
 import org.apache.lucene.spatial.tier.DistanceSortSource;
 import org.apache.lucene.spatial.tier.DistanceUtils;
 import org.apache.lucene.spatial.tier.InvalidGeoException;
@@ -149,7 +149,7 @@
     final double miles = 6.0;
     
     // create a distance query
-    final DistanceQuery dq = new DistanceQuery(lat, lng, miles, latField, lngField, true);
+    final DistanceQueryBuilder dq = new DistanceQueryBuilder(lat, lng, miles, latField, lngField,
true);
      
     System.out.println(dq);
     //create a term query to search against all documents

Modified: lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java?rev=730205&r1=730204&r2=730205&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java
Tue Dec 30 10:00:56 2008
@@ -32,7 +32,7 @@
 import org.apache.lucene.search.Sort;
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.spatial.tier.DistanceQuery;
+import org.apache.lucene.spatial.tier.DistanceQueryBuilder;
 import org.apache.lucene.spatial.tier.DistanceSortSource;
 import org.apache.lucene.spatial.tier.DistanceUtils;
 import org.apache.lucene.spatial.tier.InvalidGeoException;



Mime
View raw message