Mentions légales du service

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

- new ontowrap exception taken into account

parent f337c1aa
No related branches found
No related tags found
No related merge requests found
...@@ -81,13 +81,17 @@ public class NewMatcher extends ObjectAlignment implements AlignmentProcess{ ...@@ -81,13 +81,17 @@ public class NewMatcher extends ObjectAlignment implements AlignmentProcess{
* *Very* simple matcher, based on equality of names (in the example, only classes and properties) * *Very* simple matcher, based on equality of names (in the example, only classes and properties)
*/ */
public double match(Object o1, Object o2) throws AlignmentException { public double match(Object o1, Object o2) throws AlignmentException {
String s1 = ontology1().getEntityName(o1); try {
String s2 = ontology2().getEntityName(o2); String s1 = ontology1().getEntityName(o1);
if (s1 == null || s2 == null) return 0.; String s2 = ontology2().getEntityName(o2);
if (s1.toLowerCase().equals(s2.toLowerCase())) { if (s1 == null || s2 == null) return 0.;
return 1.0; if (s1.toLowerCase().equals(s2.toLowerCase())) {
} else { return 1.0;
return 0.; } else {
return 0.;
}
} catch ( OntowrapException owex ) {
throw new AlignmentException( "Error getting entity name", owex );
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment