Ignore:
Timestamp:
05/10/06 15:45:36 (13 years ago)
Author:
mpritcha
Message:

Added interface Searchable, to be implemented by all SearchAgent? classes. Created abstract SearchAgent? superclass. Modified FullTextSearchAgent? to extend this.

Location:
TI01-discovery/trunk/ws-Discovery2/src/ndg/services/discovery
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/ws-Discovery2/src/ndg/services/discovery/DiscoveryServiceSkeleton.java

    r1548 r1554  
    1818                          (discoveryserviceapi.DoFullTextSearchDocument request ) 
    1919          
    20         { 
     20        {  
    2121                discoveryserviceapi.DoFullTextSearchReturnDocument response = discoveryserviceapi.DoFullTextSearchReturnDocument.Factory.newInstance(); 
    2222                discoveryserviceapi.SearchReturnType responseContent = response.addNewDoFullTextSearchReturn(); 
     
    8484                        if ( summaryDocuments != null ) 
    8585                        { 
    86                                 discoveryserviceapi.SearchReturnType.Documents responseDocuments = responseContent.addNewDocuments(); 
     86                                discoveryserviceapi.DocumentsType responseDocuments = responseContent.addNewDocuments(); 
    8787 
    8888                                for (Iterator i = summaryDocuments.iterator(); i.hasNext(); ) 
  • TI01-discovery/trunk/ws-Discovery2/src/ndg/services/discovery/FullTextSearchAgent.java

    r1548 r1554  
    1818 *  @author     Matt Pritchard <m.j.pritchard@rl.ac.uk> 
    1919 */ 
    20 public class FullTextSearchAgent { 
     20public class FullTextSearchAgent extends SearchAgent implements Searchable { 
    2121 
    22     //protected final static String uri = "http://guest:9Pr^3{nt19\\@glue.badc.rl.ac.uk:8080/exist/xmlrpc"; 
    2322        static Properties properties = new Properties(); 
    2423 
    25         // Input parameters 
     24        // Input parameters specific to FullTextSearch 
    2625        private String term; 
    27         private int resultId; 
    28         private int start; 
    29         private int howMany; 
    30         private String orderBy; 
    31  
    32         // Output parameters 
    33         private boolean status; 
    34         private String statusMessage; 
    35         private int hits; 
    36         private Hashtable result = new Hashtable(); 
    3726 
    3827        /** 
     
    155144        } 
    156145 
    157         /** 
    158          * Sets the start position of result set 
    159          * @param i position of first result to fetch 
    160          */ 
    161         public void setStart(int i) 
    162         { 
    163                 this.start = i; 
    164         } 
     146        // setter methods for start, howMany, OrderBy already defined in superclass SearchAgent 
    165147 
    166         /** 
    167          * Sets how many results to fetch 
    168          * @param i position of first result to fetch 
    169          */ 
    170         public void setHowMany(int i) 
    171         { 
    172                 this.howMany = i; 
    173         } 
    174  
    175         /** 
    176          * Sets the field by which to sort the result set 
    177          * @param s String, one of "date", "dataCentre" 
    178          */ 
    179         public void setOrderBy(String s) 
    180         { 
    181                 this.orderBy = s; 
    182         } 
    183148} 
    184149 
Note: See TracChangeset for help on using the changeset viewer.