From: <ku...@us...> - 2009-08-13 14:27:11
|
Revision: 1823 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1823&view=rev Author: kurzum Date: 2009-08-13 14:27:03 +0000 (Thu, 13 Aug 2009) Log Message: ----------- hacked a hack with a hack to fix it Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/kb/extraction/BlankNode.java Modified: trunk/src/dl-learner/org/dllearner/kb/extraction/BlankNode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/extraction/BlankNode.java 2009-08-13 14:08:23 UTC (rev 1822) +++ trunk/src/dl-learner/org/dllearner/kb/extraction/BlankNode.java 2009-08-13 14:27:03 UTC (rev 1823) @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.List; +import java.util.NoSuchElementException; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; @@ -148,15 +149,26 @@ //System.out.println("nil found"); //do nothing }else{ - if(next.otherNodes.first().a.equals(OWLVocabulary.RDF_FIRST)){ - target.add(factory.getOWLClass(URI.create(next.otherNodes.first().b))); - tmp.add(next.blankNodes.get(0)); - //System.out.println("bnode added"); - }else{ + StringTuple firstOtherNodes = null; + try{ + firstOtherNodes = next.otherNodes.first(); + if(firstOtherNodes.a.equals(OWLVocabulary.RDF_FIRST)){ + target.add(factory.getOWLClass(URI.create(firstOtherNodes.b))); + tmp.add(next.blankNodes.get(0)); + //System.out.println("bnode added"); + }else{ + + tail("double nesting not supported yet"); + + } - tail("double nesting not supported yet"); + }catch (NoSuchElementException e) { + logger.warn("something strange happened here: "+firstOtherNodes); + logger.warn("and here: "+next.otherNodes); + e.printStackTrace(); } + } }//end while This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |