Changeset 1424


Ignore:
Timestamp:
Oct 28, 2011, 12:54:22 PM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #326: Updates required for BASE 3 support

This should fix:

  • Build changes due to new names of BASE JAR files
  • New installation instructions
  • Code changes due to BASE API changes
Location:
extensions/net.sf.basedb.reggie/branches/2.0-dev
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/.classpath

    r1361 r1424  
    33  <classpathentry kind="src" path="src"/>
    44  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    5   <classpathentry kind="lib" path="lib/compile/BASE2Core.jar" sourcepath="/trunk/src/core"/>
    6   <classpathentry kind="lib" path="lib/compile/BASE2Webclient.jar"/>
    75  <classpathentry kind="lib" path="lib/compile/servlet-api.jar"/>
    8   <classpathentry kind="lib" path="lib/compile/BASE2WSClient.jar"/>
    96  <classpathentry kind="lib" path="lib/compile/json_simple-1.1.jar"/>
     7  <classpathentry kind="lib" path="lib/compile/base-core-3.0.0.jar"/>
     8  <classpathentry kind="lib" path="lib/compile/base-webclient-3.0.0.jar"/>
     9  <classpathentry kind="lib" path="lib/compile/base-webservices-client-3.0.0.jar"/>
    1010  <classpathentry kind="output" path="build"/>
    1111</classpath>
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/META-INF/extensions.xml

    r1378 r1424  
    77      and samples.
    88    </description>
    9     <version>1.6-dev</version>
     9    <version>2.0-dev</version>
     10    <min-base-version>3.0.0</min-base-version>
    1011    <copyright>BASE development team</copyright>
    1112    <email>basedb-users@lists.sourceforge.net</email>
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/README

    r1371 r1424  
    11== Requirements ==
    22
    3  1. BASE 2.17.1 or later.
     3 1. BASE 3.0 or later.
    44 
    55== Introduction ==
     
    1111   http://baseplugins.thep.lu.se/wiki/net.sf.basedb.reggie
    1212
    13 == Installation ==
     13== Installation and updating ==
    1414
    1515 1. Download the reggie-*.tar.gz file.
    1616 2. Unpack the downloaded file to a directory of your choice.
    17  3. Copy the 'reggie.jar' file to your BASE extensions directory:
    18     WEB-INF/extensions
    19  4. Run the 'Extensions->Manual scan' command if you have disabled automatic
    20     installation. Otherwise, just wait a bit and the automatic installation will
    21     find and install the new extension.
    22  5. Log in as a user with Administrator priviliges.
     17 3. Copy the 'reggie.jar' file to your BASE plug-ins directory.
     18    Eg. the directory specified by the 'plugins.dir' setting in 'base.config'.
     19 4. Log in to BASE as a user with Administrator priviliges.
     20 5. Go to 'Administrate->Plug-ins & Extensions->Overview' page.
     21    Run the installation wizard and select to install/update 'reggie.jar'.
    2322 6. Create a project and set it as the active project. This step is
    2423    optional but is recommended. Running Reggie without an active project
     
    3332 9. Done.
    3433
    35  
    3634== Using ==
    3735 
     
    7674 2. Type `ant download-lib` to automatically download the BASE core JAR files that
    7775    are neeed for compilation. You can also do this manually by copying the
    78     BASE2Core.jar, BASE2Webclient.jar and BASE2WSClient.jar
    79     from the BASE installation directory (<basedir>/www/WEB-INF/lib/) to the
    80     ./lib/compile directory.
     76    base-*.jar files from the BASE installation directory
     77    (<basedir>/www/WEB-INF/lib/) to the ./lib/compile directory.
    8178
    8279 3. Type 'ant' to compile the code and generate the 'reggie.jar' file
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/RELEASE

    r1357 r1424  
    1111    sure.
    1212
    13  2. Update the version number.
     13 2. Update the version numbers.
    1414   
    1515    In build.xml:
    1616      <property name="version" value="A.B" />
     17      <property name="depend.base-version" value="..." />
    1718     
    1819    Run `ant update-version`. This should put the version
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/build.xml

    r1378 r1424  
    1010  <!-- variables used -->
    1111  <property name="name" value="reggie" />
    12   <property name="version" value="1.6-dev" />
     12  <property name="version" value="2.0-dev" />
    1313  <property name="src" location="src" description="Location of source files" />
    1414  <property name="build" location="build" description="Location of compiled files" />
     
    2121  <property name="javac.target" value="1.6" />
    2222  <property name="javac.encoding" value="UTF-8" />
     23  <property name="depend.base-version"
     24    value="3.0.0"
     25    description="The BASE version that this project depends on."
     26  />
    2327  <property name="depend.jars"
    24     value="http://base2.thep.lu.se/base/jars/2.17.1"
    25     description="The location of the BASE core JARs that we depend on"
     28    value="http://base2.thep.lu.se/base/jars/${depend.base-version}"
     29    description="The location of the BASE core JARs that this project depends on."
    2630  />
    2731
     
    8993    depends="build"
    9094    >
    91     <fail unless="base.home" message="base.home is not set to the path of BASE installation." />
    92     <copy todir="${base.home}/www/WEB-INF/extensions">
     95    <fail unless="base.plugins" message="base.plugins is not set to the path of BASE plug-ins directory." />
     96    <copy todir="${base.plugins}">
    9397      <fileset file="${jar.name}" />
    9498    </copy>
    95    
    96   </target>
     99    <echo>Copied '${jar.name}' to '${base.plugins}'.</echo>
     100  </target>
     101
    97102 
    98103  <target
     
    126131  <target
    127132    name="checkjar"
    128     description="Checks that the BASE2Core.jar, BASE2Webclient.jar and BASE2WSClient.jar exists."
     133    description="Checks that required BASE JAR files exists"
    129134    >
    130135    <available classname="net.sf.basedb.core.Application"
    131       classpathref="classpath" property="base2core" />
     136      classpathref="classpath" property="base-core" />
    132137    <available classname="net.sf.basedb.clients.web.Base"
    133       classpathref="classpath" property="base2web" />
     138      classpathref="classpath" property="base-web" />
    134139    <available classname="net.sf.basedb.info.BioAssaySetInfo"
    135       classpathref="classpath" property="base2webservice" />
    136 
    137     <fail unless="base2core" message="Can't find BASE2Core.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    138     <fail unless="base2web" message="Can't find BASE2Webclient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    139     <fail unless="base2webservice" message="Can't find BASE2WSClient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    140     <echo>Found BASE2Core.jar and BASE2Webclient.jar.</echo>
     140      classpathref="classpath" property="base-webservice" />
     141    <fail unless="base-core" message="Can't find base-core-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
     142    <fail unless="base-web" message="Can't find base-webclient-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
     143    <fail unless="base-webservice" message="Can't find base-webservices-client-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
     144    <echo>Found all requried BASE core JAR files.</echo>
    141145  </target>
    142146 
    143147  <target
    144148    name="download-lib"
    145     description="Download BASE2Core.jar, BASE2Webclient.jar and BASE2WSClient.jar."
     149    description="Download required BASE core jar files"
    146150    >
    147151    <echo>
     
    152156-------------------------------------------------------
    153157    </echo>
    154     <download-lib file="BASE2Core.jar" />
    155     <download-lib file="BASE2Webclient.jar" />
    156     <download-lib file="BASE2WSClient.jar" />
     158    <download-lib file="base-core-${depend.base-version}.jar" />
     159    <download-lib file="base-webclient-${depend.base-version}.jar" />
     160    <download-lib file="base-webservices-client-${depend.base-version}.jar" />
    157161  </target>
    158162 
     
    188192      encoding="UTF-8"
    189193    />
     194    <replaceregexp
     195      file="META-INF/extensions.xml"
     196      match="&lt;min-base-version&gt;.*&lt;/min-base-version&gt;"
     197      replace="&lt;min-base-version&gt;${depend.base-version}&lt;/min-base-version&gt;"
     198      encoding="UTF-8"
     199    />
    190200
    191201    <echo>Don't forget to commit the changes to the subversion repository!</echo>
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/lib/compile/readme.txt

    r1282 r1424  
    44root directory to download those files automatically.
    55
    6  * BASE2Core.jar
    7  * BASE2Webclient.jar
     6 * base-core-3.0.0.jar
     7 * base-webclient-3.0.0.jar
     8 * base-webservices-client-3.0.0.jar
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/Reggie.java

    r1409 r1424  
    3030    The current version of this package.
    3131  */
    32   public static final String VERSION = "1.6-dev";
     32  public static final String VERSION = "2.0-dev";
    3333
    3434  /**
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/dao/Case.java

    r1366 r1424  
    6666      merged = true;
    6767      caseQuery = Sample.getQuery();
    68       caseQuery.join(Hql.innerJoin("sourceEvents", "src"));
    69       caseQuery.join(Hql.innerJoin("src", "event", "evt"));
     68      caseQuery.join(Hql.innerJoin("childCreationEvents", "cce"));
     69      caseQuery.join(Hql.innerJoin("cce", "event", "evt"));
    7070      caseQuery.join(Hql.innerJoin("evt", "bioMaterial", "bm")); // 'bm' should now refernce a specimen tube
    7171      caseQuery.restrict(Restrictions.rlike(Hql.property("bm", "name"), Expressions.parameter("name", "^" + name + "\\.[0-9]+$", Type.STRING)));
    7272      caseQuery.setDistinct(true);
    7373     
    74       System.out.println("cq:" + caseQuery);
    7574      cases = caseQuery.list(dc);
    7675     
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/dao/Patient.java

    r1333 r1424  
    1111import net.sf.basedb.core.Item;
    1212import net.sf.basedb.core.ItemQuery;
     13import net.sf.basedb.core.Sample;
    1314import net.sf.basedb.core.query.Annotations;
    1415import net.sf.basedb.reggie.Reggie;
     
    6162  {
    6263    Patient patient = null;
    63     BioSource b = theCase.getSample().getBioSource();
     64    Sample s = theCase.getSample();
     65    BioSource b = s.getParentType() == Item.BIOSOURCE ? (BioSource)s.getParent() : null;
    6466    if (b != null)
    6567    {
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/servlet/PartitionRegistrationServlet.java

    r1419 r1424  
    204204                dc.saveItem(hisSample);
    205205               
    206                 hisSample.setPooled(true);
    207206                BioMaterialEvent creationEvent = hisSample.getCreationEvent();
    208                 creationEvent.addSource(specimen, hisWeight);
     207                creationEvent.addSource(hisSample).setUsedQuantity(hisWeight);
    209208               
    210209                Reggie.setAnnotationValue(hisSample, partitionDateType, partitionDate);
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/servlet/PersonalRegistrationServlet.java

    r1359 r1424  
    334334            Reggie.setAnnotationValue(theCase, lateralityType, laterality);
    335335          }
    336           theCase.setBioSource(patient);
     336          theCase.getCreationEvent().setSource(patient);
    337337          dc.saveItem(theCase);
    338338          jsonMessages.add("Case '" + originalCaseName + "' created successfully.");
     
    359359            JSONObject jsonSpec = (JSONObject)jsonSpecimen.get(i);
    360360            Sample specimen = Sample.getById(dc, ((Number)jsonSpec.get("id")).intValue());
    361             // Set specimen to 'pooled' and link with case
    362             specimen.setPooled(true);
    363             specimen.getCreationEvent().addSource(theCase, null);
     361            // Link the specimen with the case
     362            specimen.getCreationEvent().setSource(theCase);
    364363           
    365364            // Update the specimen annotations
  • extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/servlet/SpecimenTubeServlet.java

    r1413 r1424  
    2626import net.sf.basedb.core.query.Restrictions;
    2727import net.sf.basedb.reggie.Reggie;
    28 import net.sf.basedb.reggie.converter.DateToStringConverter;
    2928import net.sf.basedb.reggie.converter.StringToDateConverter;
    3029import net.sf.basedb.reggie.dao.Case;
Note: See TracChangeset for help on using the changeset viewer.