Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b619c459 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- put more Java 1.5 iterators

parent 047fd67a
No related branches found
No related tags found
No related merge requests found
/* /*
* $Id$ * $Id$
* *
* Copyright (C) INRIA, 2004-2008 * Copyright (C) INRIA, 2004-2009
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
...@@ -113,8 +113,7 @@ public class ExtPREvaluator extends BasicEvaluator { ...@@ -113,8 +113,7 @@ public class ExtPREvaluator extends BasicEvaluator {
nbexpected = align1.nbCells(); nbexpected = align1.nbCells();
nbfound = align2.nbCells(); nbfound = align2.nbCells();
for ( Enumeration e = align1.getElements(); e.hasMoreElements();) { for ( Cell c1 : align1 ){
Cell c1 = (Cell)e.nextElement();
Set s2 = (Set)align2.getAlignCells1( c1.getObject1() ); Set s2 = (Set)align2.getAlignCells1( c1.getObject1() );
if( s2 != null ){ if( s2 != null ){
for( Iterator it2 = s2.iterator(); it2.hasNext() && c1 != null; ){ for( Iterator it2 = s2.iterator(); it2.hasNext() && c1 != null; ){
......
/* /*
* $Id$ * $Id$
* *
* Copyright (C) INRIA Rhne-Alpes, 2004-2005, 2007-2008 * Copyright (C) INRIA Rhne-Alpes, 2004-2005, 2007-2009
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
...@@ -77,9 +77,7 @@ public class SymMeanEvaluator extends BasicEvaluator { ...@@ -77,9 +77,7 @@ public class SymMeanEvaluator extends BasicEvaluator {
LoadedOntology onto1 = (LoadedOntology)((ObjectAlignment)align1).getOntologyObject1(); LoadedOntology onto1 = (LoadedOntology)((ObjectAlignment)align1).getOntologyObject1();
LoadedOntology onto2 = (LoadedOntology)((ObjectAlignment)align2).getOntologyObject1(); LoadedOntology onto2 = (LoadedOntology)((ObjectAlignment)align2).getOntologyObject1();
//for ( Cell c1 : align1.getElements() ){ for ( Cell c1 : align1 ){
for (Enumeration e = align1.getElements() ; e.hasMoreElements() ;) {
Cell c1 = (Cell)e.nextElement();
if ( onto1.isClass( c1.getObject1() ) ) nbClassCell++; if ( onto1.isClass( c1.getObject1() ) ) nbClassCell++;
else if ( onto1.isProperty( c1.getObject1() ) ) nbPropCell++; else if ( onto1.isProperty( c1.getObject1() ) ) nbPropCell++;
else nbIndCell++; else nbIndCell++;
...@@ -94,9 +92,7 @@ public class SymMeanEvaluator extends BasicEvaluator { ...@@ -94,9 +92,7 @@ public class SymMeanEvaluator extends BasicEvaluator {
} else { } else {
indScore = indScore + 1 - Math.abs(c2.getStrength() - c1.getStrength());}}}}} indScore = indScore + 1 - Math.abs(c2.getStrength() - c1.getStrength());}}}}}
//for( Cell c2: align2.getElements() ) { for( Cell c2: align2 ) {
for (Enumeration e = align2.getElements() ; e.hasMoreElements() ;) {
Cell c2 = (Cell)e.nextElement();
if ( onto1.isClass( c2.getObject1() ) ) nbClassCell++ ; if ( onto1.isClass( c2.getObject1() ) ) nbClassCell++ ;
else if ( onto1.isProperty( c2.getObject1() ) ) nbPropCell++; else if ( onto1.isProperty( c2.getObject1() ) ) nbPropCell++;
else nbIndCell++; else nbIndCell++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment