DoKSwiki:Community Portal

From DoKSwiki

Libraries upgrade in DoKS

In DoKS we have replaced several frameworks and jar files with newer versions. This DoKS upgrade will be available shortly for download as a release version 1.4.1 . For this version you require JDK 5 or later. In this version we use spring for hibernate configuration and transaction management. Hibernate 3 and ehcache for hibernate are used. We have removed dependency on aspectwerkz and we now use xmlbeans instead of jaxb for object-xml mapping. We have updated web.xml to servlet 2.4, tomcat 5.5 or later is thefore required. If you are using MySQL we recommend MySQL 5 and a bove.

With the new DoKS version, scripts that get values from the abstract field e.g. etd.abstract, will generate an error. Use etd.getAbstract or etd.Abstract instead of etd.abstract to acces the abstract field value.


It is very possible that TreeSet() funtion mostly used in scripts for sorting purposes doesnt work properly in the new DoKS version. If by running your script you get one element back instead of a list of elements then probably you have TreeSet() function in your script. Replace the TreeSet with a List function or remove the TreeSet() function as in the example given below.

Example; (with TreeSet()):

getNames(etd){

   names="";
   count=0;
   sortedAuthors= new TreeSet();
   iter= etd.authors.iterator();
   while (iter.hasNext()){
       sortedAuthors.add(iter.next().description);
   }
   iter= sortedAuthors.iterator();
   while (iter.hasNext()){
       author= iter.next();
    commabPos= author.indexOf(",");
       lastName= author.substring(0, commabPos);
       lastName= lastName.replaceAll(" ", "  ");
       firstName= author.substring(commabPos + 2);
       names+= firstName + "  " + lastName + "\t";
       count++;
   }
   while(count<10){
       names+="\t";
       count++;
   }
   return names;

}



Example; (without TreeSet()):

getNames(etd){

   names="";
   count=0;
   authors=etd.authors;
  list = authors.iterator();
  while (list.hasNext()){

dto=recordFacade.getRecordDTO(list.next().id);

naam = dto.description;

        	commabPos= naam.indexOf(",");
       lastName= naam.substring(0, commabPos);
       lastName= lastName.replaceAll(" ", "  ");
       firstName= naam.substring(commabPos + 2);
       names+= firstName + "  " + lastName + "\t";
       count++;
   }
   while(count<10){
       names+="\t";
       count++;
   }
   return names;

}