// plasmaSearchResults.java - a container for search results // --------------------------------------------------------- // part of YaCy // // (C) 2007 by Alexander Schier // // last change: $LastChangedDate: $ by $LastChangedBy: $ // $LastChangedRevision: $ // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package de.anomic.plasma; import java.util.ArrayList; import de.anomic.index.indexURLEntry; public class plasmaSearchResults { private int totalcount=0; private int filteredcount=0; private int orderedcount=0; private int linkcount=0; private int globalresults=0; private plasmaSearchRankingProfile ranking=null; private String formerSearch=""; private plasmaSearchQuery query=null; private ArrayList results=null; private Object[] references=null; public plasmaSearchResults(){ this.results=new ArrayList(); } public plasmaSearchResults(int totalcount, int filteredcount, int orderedcount, int linkcount){ this.results=new ArrayList(); this.totalcount=totalcount; this.filteredcount=filteredcount; this.orderedcount=orderedcount; this.linkcount=linkcount; } public void appendResult(searchResult result){ if (results==null) results=new ArrayList(); results.add(result); } public int numResults(){ if(results==null) return 0; return results.size(); } public searchResult getResult(int index){ if(results==null || results.size()-1