Ignore:
Timestamp:
2005-10-14T15:19:36+13:00 (19 years ago)
Author:
mdewsnip
Message:

(MAJOR CHANGE) This is the remote Greenstone building functionality implemented for the West Yorkshire Fire and Rescue Service. It allows collections to be built without having a local version of Greenstone, using either a stand-alone version of the GLI or the applet.

The collections are stored on the server (allowing people to collaborate on collections -- but not at the same time), and only what is necessary to let the user edit the collection is downloaded. Any changes to the collection are uploaded to the server.

An access restriction mechanism is implemented which uses the standard Greenstone user database to control who has access to collections.

Location:
trunk/gli/src/org/greenstone/gatherer/cdm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java

    r10576 r10726  
    4343import org.greenstone.gatherer.gui.GComboBox;
    4444import org.greenstone.gatherer.gui.GLIButton;
     45import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
    4546import org.greenstone.gatherer.util.JarTools;
    4647import org.greenstone.gatherer.util.StaticStrings;
     
    311312        StringBuffer xml = null;
    312313        if (Gatherer.isGsdlRemote) {
    313         String launch  = Gatherer.cgiBase + "launch";
    314         launch += "?cmd=classinfo.pl";
    315         launch += "&xml=&language="+lang;
    316         launch += "&class=" + getClassifierName(classifier);
    317        
    318         System.err.println("*** launch = " + launch);
    319        
    320         URL launch_url = new URL(launch);
    321         URLConnection launch_connection = launch_url.openConnection();
    322         input_stream = launch_connection.getInputStream();
    323         xml = Utility.readXMLStream(input_stream);
     314        String classinfo_output = RemoteGreenstoneServer.getScriptOptions("classinfo.pl", "&classifier=" + classifier);
     315        xml = new StringBuffer(classinfo_output);
    324316        }
    325317        else {
     
    386378
    387379        if (Gatherer.isGsdlRemote) {
    388 
    389         String lang = Configuration.getLanguage();
    390 
    391         String launch  = Gatherer.cgiBase + "launch";
    392         launch += "?cmd=classinfo.pl";
    393         launch += "&xml=&language="+lang;
    394         launch += "&listall=";
    395 
    396         System.err.println("*** launch = " + launch);
    397 
    398         try {
    399             URL launch_url = new URL(launch);
    400             URLConnection launch_connection = launch_url.openConnection();
    401             InputStream input_stream = launch_connection.getInputStream();
    402             StringBuffer xml = Utility.readXMLStream(input_stream);
    403             loadClassifiers(xml);
    404         }
    405         catch (Exception error) {
    406             System.err.println("Failed when trying to connect to : " + launch);
    407             error.printStackTrace();
    408         }
    409 
    410         }
     380        String classinfo_output = RemoteGreenstoneServer.getScriptOptions("classinfo.pl", "&listall=");
     381        loadClassifiers(new StringBuffer(classinfo_output));
     382        }
     383
    411384        else {
    412 
    413385        // Retrieve the gsdl home directory...
    414386        String directory = LocalGreenstone.getDirectoryPath();
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java

    r10611 r10726  
    511511        if (Gatherer.isGsdlRemote) {
    512512            String collection_name = Gatherer.c_man.getCollection().getName();
    513             ZipTools.zipup(Gatherer.getCollectDirectoryPath(), collection_name, "collect.cfg", null, "", "");
    514             RemoteGreenstoneServer.upload_url_zip(collection_name, "etc", "", null);
     513            RemoteGreenstoneServer.uploadCollectionFile(collection_name, collect_cfg_file);
    515514        }
    516515        }
  • trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java

    r10576 r10726  
    4747import org.greenstone.gatherer.gui.ModalDialog;
    4848import org.greenstone.gatherer.gui.WarningDialog;
     49import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
    4950import org.greenstone.gatherer.util.JarTools;
    5051import org.greenstone.gatherer.util.StaticStrings;
     
    443444        StringBuffer xml = null;
    444445        if (Gatherer.isGsdlRemote) {
    445         String launch  = Gatherer.cgiBase + "launch";
    446         launch += "?cmd=pluginfo.pl";
    447         launch += "&xml=&language="+lang;
    448         launch += "&plug=" + getPluginName(plugin);
    449        
    450         System.err.println("*** launch = " + launch);
    451        
    452         URL launch_url = new URL(launch);
    453         URLConnection launch_connection = launch_url.openConnection();
    454         input_stream = launch_connection.getInputStream();
    455         xml = Utility.readXMLStream(input_stream);
     446        String pluginfo_output = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", "&plugin=" + plugin);
     447        xml = new StringBuffer(pluginfo_output);
    456448        }
    457449        else {
     
    514506    if(library == null) {
    515507        library = new ArrayList();
     508
    516509        if (Gatherer.isGsdlRemote) {
    517 
    518         String lang = Configuration.getLanguage();
    519 
    520         String launch  = Gatherer.cgiBase + "launch";
    521         launch += "?cmd=pluginfo.pl";
    522         launch += "&xml=&language="+lang;
    523         launch += "&listall=";
    524 
    525         System.err.println("*** launch = " + launch);
    526 
    527         try {
    528             URL launch_url = new URL(launch);
    529             URLConnection launch_connection = launch_url.openConnection();
    530             InputStream input_stream = launch_connection.getInputStream();
    531             StringBuffer xml = Utility.readXMLStream(input_stream);
    532             loadPlugins(xml);
    533         }
    534         catch (Exception error) {
    535             System.err.println("Failed when trying to connect to : " + launch);
    536             error.printStackTrace();
    537         }
    538 
    539         }
     510        String pluginfo_output = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", "&listall=");
     511        loadPlugins(new StringBuffer(pluginfo_output));
     512        }
     513
    540514        else {
    541515        // Retrieve the gsdl home directory...
Note: See TracChangeset for help on using the changeset viewer.