Mentions légales du service

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

- (re)implemented the exception trapping when trying to render a non ObjectAlignmentwhen required

parent 568d66ef
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,8 @@ import fr.inrialpes.exmo.align.parser.AlignmentParser;
import fr.inrialpes.exmo.align.impl.Annotations;
import fr.inrialpes.exmo.align.impl.BasicParameters;
import fr.inrialpes.exmo.align.impl.BasicAlignment;
import fr.inrialpes.exmo.align.impl.URIAlignment;
import fr.inrialpes.exmo.align.impl.ObjectAlignment;
import fr.inrialpes.exmo.align.onto.OntologyFactory;
import fr.inrialpes.exmo.align.onto.OntologyCache;
import fr.inrialpes.exmo.align.onto.Ontology;
......@@ -328,8 +330,12 @@ public class AServProtocolManager {
// should return the message
return new UnknownMethod(newId(),mess,myId,mess.getSender(),method,(Parameters)null);
}
al.render(renderer);
// Strange that I do not catch the AlignmentException raised when OWL is needed
try {
al.render( renderer );
} catch ( AlignmentException aex ) {
al = ObjectAlignment.toObjectAlignment( (URIAlignment)al, (OntologyCache)null );
al.render( renderer );
}
writer.flush();
writer.close();
} catch (AlignmentException e) {
......
......@@ -222,8 +222,6 @@ public class ParserPrinter {
try {
result.render( renderer );
} catch ( AlignmentException aex ) {
// if the renderer needs an ObjectALignment: give it
//aex.printStackTrace();
result = ObjectAlignment.toObjectAlignment( (URIAlignment)result, (OntologyCache)null );
result.render( renderer );
}
......
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