Changeset 38853


Ignore:
Timestamp:
2024-03-19T21:45:02+13:00 (6 weeks ago)
Author:
anupama
Message:

Copied the GsdlCollageApplet package from GS2 into GS3's src/java/org/greenstone/applet folder and adjusted the package names in the classes accordingly. Also made GsdlCollageApplet into a JApplet (no actual awt GUI classes appear to be used, so this was easy). Added compile code into build.xml and there are still deprecated warnings I want to iron out, but only after I can see it working in the appletviewer where things are still not working. Also adjusted classifier.xsl in interfaces/default to move the JavaScript collage work out of the way and instead push out the old applet code with values hardcoded to what I imagine they must be. But as I said, I can't get the appletviewer to display the applet yet. Running the appletviewer on the small beatles collection's Collage classifier page, throws up an error in the terminal: java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file org/greenstone/applet/GsdlCollageApplet/GsdlCollageApplet. It is unclear yet what is causing this error.

Location:
main/trunk/greenstone3
Files:
9 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r38848 r38853  
    37243724    <copy file="${build.home}/phind.jar" todir="${web.applet}"/>
    37253725    <!-- phind also needs xercesImpl.jar and xml-apis.jar to be in web/applet -->
    3726     <if>
     3726
     3727    <jar destfile="${build.home}/GsdlCollageApplet.jar">
     3728      <fileset dir="${build.home}">
     3729        <include name="org/greenstone/applet/GsdlCollageApplet/**"/>
     3730      </fileset>
     3731      <manifest>
     3732        <attribute name="Built-By" value="${user.name}" />
     3733      </manifest>
     3734    </jar>
     3735    <mkdir dir="${web.applet}"/>
     3736    <copy file="${build.home}/GsdlCollageApplet.jar" todir="${web.applet}"/>
     3737    <!-- TODO: Does GsdlCollageApplet (like phind) also needs xercesImpl.jar and xml-apis.jar to be in web/applet??? -->
     3738
     3739   <if>
    37273740      <bool><istrue value="${tomcat.islocal}"/></bool>
    37283741      <if><bool><available file="${catalina.home}/lib/xercesImpl.jar"/></bool><!-- moved for solr -->
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl

    r38841 r38853  
    148148
    149149  <xsl:template name="Collage">
     150
     151    TODO: Here is the collage applet
     152    <!-- Copied from GS2.88's about.dm (document.dm has a more applet params).
     153
     154     Modified params: codebase, GsdlCollageApplet class' package, gwcgi, collection, classifier, hrefMustHave. Param isJava2's value changed from auto to true.
     155     And made all param XML elements self-closing.
     156    -->
     157    <!-- we seem to be in the web dir, so look in web/applet for the jar -->
     158   <applet CODEBASE="applet" code="org.greenstone.applet.GsdlCollageApplet.GsdlCollageApplet.class"
     159         archive="GsdlCollageApplet.jar" width="445" height="250">
     160 
     161     <param name="gwcgi" value="http://localhost:8383/greenstone3/library"/>
     162         <param name="collection" value="smallbea"/>
     163         <param name="classifier" value="CL2.3"/>
     164       
     165         <param name="hrefMustHave" value="smallbea"/>
     166         <param name="imageMustNotHave" value="hl=%x=%gt=%gc=%.pr"/>
     167
     168     <param name="imageType" value=".jpg%.png"/> 
     169     <param name="verbosity" value="5"/>
     170     <param name="maxDepth" value="3"/>
     171     <param name="refreshDelay" value="1500"/>
     172     <param name="isJava2" value="true"/>
     173
     174   </applet>
     175  </xsl:template>
     176 
     177  <xsl:template name="Collage_javascript_deprecated">
    150178    <script type="text/javascript" src="interfaces/{$interface_name}/js/collage_scripts.js"><xsl:text> </xsl:text></script>
    151179        <div id="collagewrapper" style="width: 800px; height: 643px; position: relative; background-image:url('sites/{$site_name}/collect/twso/images/oldimagebackground1.png'); text-align: center;" alt="Click to start/stop a collage of images" title="Click to start/stop a collage of images" onmouseover="" onmouseout=""><xsl:text> </xsl:text></div>
Note: See TracChangeset for help on using the changeset viewer.