Ignore:
Timestamp:
2008-05-14T13:27:08+12:00 (16 years ago)
Author:
ak19
Message:

Introduced GSearchConnection member indexName set in its constructor by FedoraGS3Connection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/trunk/gs3-webservices-democlient/src/GS3Fedora/org/greenstone/fedora/services/GSearchConnection.java

    r15222 r15437  
    6060    protected static String NAMESPACE_URI = "http://server.fedoragsearch.defxws.dk";
    6161    protected static String SERVICE_NAME = "OperationsService";
    62     protected static final String INDEX_NAME = "FedoraIndex";
    6362
    6463    /** The names of the methods we use of Fedora Generic Search's web services
     
    7877    /** separator used internally to separate values of a search field */
    7978    protected static final String SPACE = " ";
     79
     80        /** The name of the Index wherein FedoraGSearch has indexed all the GS3 docs.
     81     * This final member is public here so that others may read the indexName 
     82     * that this GSearchConnection works with. */
     83    public final String indexName;
    8084   
    8185    /** The Service object used to connect to the FedoraGSearch web services */
     
    8993    protected final DocumentBuilder builder;
    9094   
     95
     96   
    9197    /** Constructor that takes a String representing the url of the WSDL
    9298     * file for FedoraGSearch's web services, and tries to establish a
    9399     * connection to those web services.
    94100     * @param wsdlFileLocation is a String representing the url of the WSDL file
     101     * @param indexName is the name of the index that Fedora Generic Search
     102     * should work with (the index wherein the indexed GS3 documents have been
     103     * placed).
    95104    */
    96     public GSearchConnection(String wsdlFileLocation)
     105    public GSearchConnection(String wsdlFileLocation, String indexName)
    97106        throws MalformedURLException, ServiceException,
    98107            ParserConfigurationException
    99108    {
     109        this.indexName = indexName;
     110       
    100111        URL wsdlURL = new URL(wsdlFileLocation);
    101112        service = new Service(wsdlURL, new QName(NAMESPACE_URI, SERVICE_NAME));
     
    218229        return gFindObjects(fullSearchTerm, sort,
    219230            hitPageStart, hitPageSize, snippetsMax,
    220             fieldMaxLength, INDEX_NAME, resultPageXslt);
     231            fieldMaxLength, indexName, resultPageXslt);
    221232    }
    222233   
     
    364375        return gFindObjects(fieldedSearchTerms, sort,
    365376                hitPageStart, hitPageSize, snippetsMax,
    366                 fieldMaxLength, INDEX_NAME, resultPageXslt);
     377                fieldMaxLength, indexName, resultPageXslt);
    367378    }
    368379   
     
    460471        try {
    461472            GSearchConnection searcher = new GSearchConnection(
    462                 "http://localhost:8080/fedoragsearch/services/FgsOperations?wsdl");
     473                "http://localhost:8080/fedoragsearch/services/FgsOperations?wsdl", "FedoraIndex");
    463474           
    464475           
Note: See TracChangeset for help on using the changeset viewer.