From 700717abe9b51e09e592cb6e0c6d8cf34f602707 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr>
Date: Tue, 30 Mar 2010 14:05:44 +0000
Subject: [PATCH] - new ontowrap exception taken into account

---
 html/tutorial/tutorial3/NewMatcher.java | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/html/tutorial/tutorial3/NewMatcher.java b/html/tutorial/tutorial3/NewMatcher.java
index 55e95cf7..df837b34 100644
--- a/html/tutorial/tutorial3/NewMatcher.java
+++ b/html/tutorial/tutorial3/NewMatcher.java
@@ -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)
     */
     public double match(Object o1, Object o2) throws AlignmentException {
-	String s1 = ontology1().getEntityName(o1);
-	String s2 = ontology2().getEntityName(o2);
-	if (s1 == null || s2 == null) return 0.;
-	if (s1.toLowerCase().equals(s2.toLowerCase())) { 
-	    return 1.0;
-	} else { 
-	    return 0.;
+	try {
+	    String s1 = ontology1().getEntityName(o1);
+	    String s2 = ontology2().getEntityName(o2);
+	    if (s1 == null || s2 == null) return 0.;
+	    if (s1.toLowerCase().equals(s2.toLowerCase())) { 
+		return 1.0;
+	    } else { 
+		return 0.;
+	    }
+	} catch ( OntowrapException owex ) {
+	    throw new AlignmentException( "Error getting entity name", owex );
 	}
     }
 }
-- 
GitLab