Skip to content

Commit

Permalink
Pre-Release 1.2.0R1 (Fixed some bugs, esp. #59)
Browse files Browse the repository at this point in the history
  • Loading branch information
TortugaAttack committed Jul 18, 2016
1 parent 0f6f1ac commit 7362f63
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion org.aksw.iguana/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.aksw</groupId>
<artifactId>iguana</artifactId>
<version>1.1.0</version>
<version>1.2.0R1</version>

<name>IGUANA</name>
<url>https://github.com/AKSW/iguana</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ protected void mergeCurrentResults(Collection<ResultSet> currentResults, Collect
Iterator<ResultSet> resIt1 = currentResults.iterator();
Iterator<ResultSet> resIt2 = results.iterator();
if(results.size()!=currentResults.size()){
log.severe("Result size differs!!! ");
log.severe("Old size : "+results.size());
log.severe("New size: "+currentResults.size());
// log.severe("Result size differs!!! ");
// log.severe("Old size : "+results.size());
// log.severe("New size: "+currentResults.size());
}
while(resIt1.hasNext()){
ResultSet r1 = resIt1.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ protected void putResults(Integer time, String queryNr) {
if (resultMap.containsKey(queryNr)) {
oldTime = resultMap.get(queryNr);
}
if (time < 0) {
if (time <= 0) {
log.warning("Query " + queryNr
+ " wasn't successfull for connection " + conName
+ ". See logs for more inforamtion");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

public class ResultReader {


public static void main(String[] argc) throws IOException {
if (argc.length < 1) {
System.out.println("Usage: java -cp \"lib/*\" "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,40 +286,41 @@ public void save() throws IOException{
}
ResultSorting resSort = new ResultSorting();
UpdateSorting usSort = new UpdateSorting();

List<String> header2 =null;
Boolean sort=true;
try {
if(!update)
header = resSort.produceMapping(header);
header2 = resSort.produceMapping(header);
else
header = usSort.produceMapping(header);
header2 = usSort.produceMapping(header);
} catch (Exception e) {
sort=false;
}
File f = new File(this.fileName+".csv");
f.createNewFile();
PrintWriter pw = new PrintWriter(fileName+".csv");
String head="";
for(String cell : header){
for(String cell : header2){
head+=cell+";";
}
if(!header.isEmpty()){
if(!header2.isEmpty()){
pw.write(head.substring(0, head.length()-1));
pw.println();
}
for(List<Object> row : table){
String currentRow = "";
List<Object> row2 = null;
try{
if(sort){
if(!update )
row = resSort.sortRow(row);
row2 = new LinkedList<Object>(resSort.sortRow(row));
else
row = usSort.sortRow(row);
row2 = new LinkedList<Object>(usSort.sortRow(row));
}
}catch(Exception e){
e.printStackTrace();
}
for(Object cell : row){
for(Object cell : row2){
currentRow += cell+";";
}
if(!row.isEmpty()){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public List<String> produceMapping(List<String> header) throws Exception{
}
Collections.sort(newIntHeader);
for(int j=1;j<header.size();j++){
mapping.put(j, newIntHeader.indexOf(Integer.valueOf(header.get(j))));
mapping.put(newIntHeader.indexOf(Integer.valueOf(header.get(j))),j);
newHeader.set(newIntHeader.indexOf(Integer.valueOf(header.get(j))), header.get(j));
}
}
Expand Down
Binary file added release/iguana-1.2.0R1-distribution.zip
Binary file not shown.
Binary file added release/iguana-1.2.0R1.jar
Binary file not shown.

0 comments on commit 7362f63

Please sign in to comment.