Mentions légales du service

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

- Completed equality binding with sameAs

parent 71b15d97
No related branches found
No related tags found
No related merge requests found
......@@ -78,9 +78,8 @@ $ java -jar lib/procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publica
Using with JWNL (Wordnet)
-------------------------
- Wordnet should be installed its directory to be put in $WNDIR (2.0, 3.0, 3.1 should work)
- jwnl.jar commons-logging.jar must be in lib.
(file_properties.xml need not anymore to be in current directory)
- Wordnet should be installed its directory to be put in $WNDIR (3.0 and 3.1 should work)
- jwnl.jar commons-logging.jar must be in lib (file_properties.xml need not anymore to be in current directory)
$ export WNDIR=../WordNet-3.1/dict
......
......@@ -287,6 +287,21 @@ public class SPARQLLinkkerRendererVisitor extends GraphPatternRendererVisitor im
lkpattern += "MINUS { " + GP1 + "FILTER NOT EXISTS { "+ GP2 +" FILTER ( "+equalValueFilterStatement( o1, o2 )+" ) } }"+NL;
lkpattern += "MINUS { " + GP2 + "FILTER NOT EXISTS { "+ GP1 +" FILTER ( "+equalValueFilterStatement( o1, o2 )+" ) } }"+NL;
} else if ( generateSameAs ) { // should be the same...
//initStructure(); //strBGP = ""; // congrats! Unsure
emptyGP();
String o1 = createVarName();
resetVariables( "?s1", o1 );
linkkeyEquals.getExpression1().accept( this );
String GP1 = wrapInNamedGraph( onto1NamedGraph, getGP() );
//initStructure(); //strBGP = ""; // congrats!
emptyGP();
String o2 = createVarName();
resetVariables( "?s2", o2 );
linkkeyEquals.getExpression2().accept( this );
String GP2 = wrapInNamedGraph( onto2NamedGraph, getGP() );
// The two patterns are independent so can use the same variables
lkpattern += "MINUS { " + GP1 + "FILTER NOT EXISTS { "+ GP2 +" FILTER ( "+equalObjectFilterStatement( o1, o2 )+" ) } }"+NL;
lkpattern += "MINUS { " + GP2 + "FILTER NOT EXISTS { "+ GP1 +" FILTER ( "+equalObjectFilterStatement( o1, o2 )+" ) } }"+NL;
} else {
initStructure(); //strBGP = ""; // congrats! Unsure
emptyGP();
......@@ -353,6 +368,8 @@ public class SPARQLLinkkerRendererVisitor extends GraphPatternRendererVisitor im
}
// There could be two options, test which one is fastest to evaluate...
// Note that the sameAs statement is evaluated out of any namedGraph
// it could also be disjunctively wrapped in both named graphs
protected String equalObjectFilterStatement ( String o1, String o2 ) {
//return o1+" owl:sameAs "+o2+". UNION FILTER( "+o1+" = "+o2+" )";
return o1+" = "+o2+" || EXISTS { "+o1+" owl:sameAs "+o2+" . }";
......
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