Commit 36262b8b authored by Robert Butora's avatar Robert Butora
Browse files

removes from all search unused countNullValues param

parent d75d7c59
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ class Dataset
   }


   public Dataset(List<Dataset> datasetList, AuthPolicy auth, Coord coord, SubsurveyId subsurveyId, boolean countNullValues, String mergeUrlRoot)
   public Dataset(List<Dataset> datasetList, AuthPolicy auth, Coord coord, SubsurveyId subsurveyId, String mergeUrlRoot)
   {
      this.subsurvey_id = datasetList.get(0).subsurvey_id; // mergeabiity condition is more then 1 element in list
      this.overlapCode  = 5; // 5: exact match --> legacy used 0 here FIXME 5 will not be correct on edges of Subsurvey coverage
+5 −7
Original line number Diff line number Diff line
@@ -10,13 +10,12 @@ class SearchOutputData
   AuthPolicy auth;
   Coord coord;
   SubsurveyId subsurveyId;
   boolean countNullValues;
   int datacubeCount;
   String versionString;
   Subsurvey[] subsurveyArr;


   public static SearchOutputData  marshall(Dataset[] datasetArr, AuthPolicy auth, Coord coord, SubsurveyId subsurveyId, boolean countNullValues, String mergeUrlRoot, Subsurvey[] dbSubsurveys)
   public static SearchOutputData  marshall(Dataset[] datasetArr, AuthPolicy auth, Coord coord, SubsurveyId subsurveyId, String mergeUrlRoot, Subsurvey[] dbSubsurveys)
   {
      SearchOutputData sod = new SearchOutputData();

@@ -24,15 +23,14 @@ class SearchOutputData
      sod.auth = auth;
      sod.coord = coord;
      sod.subsurveyId = subsurveyId;
      sod.countNullValues = countNullValues;
      sod.versionString = "Search (pgSphere) version " + Version.asString;
      sod.datacubeCount = datasetArr.length;

      sod.subsurveyArr = groupBySubsurveys(datasetArr, auth, coord, subsurveyId, countNullValues, dbSubsurveys, mergeUrlRoot);
      sod.subsurveyArr = groupBySubsurveys(datasetArr, auth, coord, subsurveyId, dbSubsurveys, mergeUrlRoot);
      return sod;
   }

   private static Subsurvey[] groupBySubsurveys(Dataset[] datasetArr, AuthPolicy auth, Coord coord, SubsurveyId subsurveyId, boolean countNullValues, Subsurvey[] dbSubsurveys, String mergeUrlRoot)
   private static Subsurvey[] groupBySubsurveys(Dataset[] datasetArr, AuthPolicy auth, Coord coord, SubsurveyId subsurveyId, Subsurvey[] dbSubsurveys, String mergeUrlRoot)
   {
      List<Subsurvey> subsurveyList = new ArrayList<Subsurvey>();

@@ -48,7 +46,7 @@ class SearchOutputData
            {
               if( Dataset.areDatasetsMergeable(datasetList) )
               {
                  Dataset mergedDataset = new Dataset(datasetList, auth, coord, subsurveyId, countNullValues, mergeUrlRoot);
                  Dataset mergedDataset = new Dataset(datasetList, auth, coord, subsurveyId, mergeUrlRoot);
                  datasetList.add(mergedDataset);
               }

@@ -67,7 +65,7 @@ class SearchOutputData

         if( Dataset.areDatasetsMergeable(datasetList) )
         {
            Dataset mergedDataset = new Dataset(datasetList, auth, coord, subsurveyId, countNullValues, mergeUrlRoot);
            Dataset mergedDataset = new Dataset(datasetList, auth, coord, subsurveyId, mergeUrlRoot);
            datasetList.add(mergedDataset);
         }

+0 −1
Original line number Diff line number Diff line
@@ -181,7 +181,6 @@ public final class XmlSerializer
      writer.println("<inputs>");
      if(searchOutputData.subsurveyId != null) writer.println(serialize(searchOutputData.subsurveyId));
      if(searchOutputData.coord       != null) writer.println(serialize(searchOutputData.coord));
      if(searchOutputData.countNullValues)     writer.println("<nullvals> set </nullvals>");
      if(searchOutputData.auth        != null) writer.println(serialize(searchOutputData.auth));
      writer.println("</inputs>");

+1 −4
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ class FormatResponseWrapper extends HttpServletResponseWrapper
   String[] pubdidArr;
   Coord coord;
   SubsurveyId subsurveyId;
   boolean countNullValues;
   String queryString; 


@@ -29,9 +28,7 @@ class FormatResponseWrapper extends HttpServletResponseWrapper
   public FormatResponseWrapper(HttpServletResponse response)
   {
      super(response);

      auth = null;
      countNullValues = false;
   }

   public void setPubdidArr(String[] pubdidArr) { this.pubdidArr = pubdidArr; }
@@ -98,7 +95,7 @@ public class FormatResponseFilter implements Filter

         SearchOutputData searchOutputData = SearchOutputData.marshall(
               datasetArr,
               pubdidWrapper.auth, pubdidWrapper.coord, pubdidWrapper.subsurveyId, pubdidWrapper.countNullValues,
               pubdidWrapper.auth, pubdidWrapper.coord, pubdidWrapper.subsurveyId,
               settings.serviceUrls.mergeUrl(),
               dbSubsurveyArr);

+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ public class SearchServlet extends javax.servlet.http.HttpServlet
            pubdidWrapper.setPubdidArr(pubdidArr);
            pubdidWrapper.coord = coord;
            pubdidWrapper.subsurveyId = subsurveyId;
            pubdidWrapper.countNullValues = false;// FIXME parse from params
            // FIXME set here or not ? pubdidWrapper.queryString = ??;
         }
         else