001/** 002 * Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ 003 * 004 * This file is part of Dicoogle/dicoogle. 005 * 006 * Dicoogle/dicoogle is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Dicoogle/dicoogle is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with Dicoogle. If not, see <http://www.gnu.org/licenses/>. 018 */ 019package pt.ua.dicoogle.rGUI.interfaces.controllers; 020 021import java.net.URI; 022import java.rmi.Remote; 023import java.rmi.RemoteException; 024import java.util.*; 025import java.util.AbstractMap.SimpleEntry; 026 027import pt.ua.dicoogle.plugins.NetworkMember; 028import pt.ua.dicoogle.rGUI.RFileBrowser.RemoteFile; 029import pt.ua.dicoogle.rGUI.interfaces.signals.ISearchSignal; 030import pt.ua.dicoogle.sdk.datastructs.SearchResult; 031import pt.ua.dicoogle.sdk.observables.FileObservable; 032import pt.ua.dicoogle.sdk.observables.ListObservableSearch; 033import pt.ua.dicoogle.sdk.utils.TagValue; 034 035 036/** 037 * 038 * @author Samuel Campos <samuelcampos@ua.pt> 039 */ 040@Deprecated 041public interface ISearch extends Remote { 042 043 // Search 044 public void Search(String query, boolean keywords, HashMap<String, Boolean> range) throws RemoteException; 045 public ListObservableSearch<SearchResult> SearchToExport(String query, boolean keywords, HashMap<String, Boolean> range, ArrayList<String> extraFields, Observer obs) throws RemoteException; 046 public List<SearchResult> SearchIndexedMetaData(SearchResult sresult) throws RemoteException; 047 public void pruneQuery(String id) throws RemoteException;; 048 049 // Thumnails 050 public SearchResult getThumbnail(URI FileName, String FileHash) throws RemoteException; 051 public void getP2PThumbnail(URI FileName, String FileHash, String addr) throws RemoteException; 052 public ArrayList<SearchResult> getPendingP2PThumnails() throws RemoteException; 053 054 //Search Results 055 public long getSearchTime() throws RemoteException; 056 public List<SearchResult> getSearchResults() throws RemoteException; 057 public List<SearchResult> getP2PSearchResults() throws RemoteException; 058 public List<SearchResult> getExportSearchResults() throws RemoteException; 059 060 public HashMap<String, Integer> getTagList() throws RemoteException; 061 062 public HashMap<Integer, TagValue> getDIMFields() throws RemoteException; 063 064 //Download a file from a remote GUI Server 065 public SimpleEntry<RemoteFile, Integer> downloadFile(SearchResult file) throws RemoteException; 066 067 // Request a File to download from P2P Network 068 public FileObservable RequestP2PFile(SearchResult file) throws RemoteException; 069 070 // get the list of P2P Peers 071 public List<NetworkMember> getPeerList() throws RemoteException; 072 073 public void RegisterSignalBack(ISearchSignal signalBack) throws RemoteException; 074}