Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d3973105 authored by Nicolas Guillouet's avatar Nicolas Guillouet
Browse files

Adding new tests : SPARQLSelectRendererVisitorTest.QueryFromAndProperty +...

Adding new tests : SPARQLSelectRendererVisitorTest.QueryFromAndProperty + SPARQLConstructVisitorTest.ConstructFromAndProperty. Have to uncomment and fix
parent 7cd3542b
No related branches found
No related tags found
No related merge requests found
......@@ -832,7 +832,7 @@ public class RDFParser {
ValueExpression v = parseValue(stmt.getObject());
return new PropertyValueRestriction(comp, v);
} else {
throw new AlignmentException("There is no pasrser for entity " + rdfType.getLocalName());
throw new AlignmentException("parseProperty : There is no parser for entity " + rdfType.getLocalName());
}
}
......@@ -946,7 +946,7 @@ public class RDFParser {
throw new AlignmentException("Incorrect class expression " + nn);
}
} else {
throw new AlignmentException("There is no pasrser for entity " + rdfType.getLocalName());
throw new AlignmentException("parseRelation : There is no parser for entity " + rdfType.getLocalName());
}
}
......@@ -962,7 +962,7 @@ public class RDFParser {
} else if (isPattern) { // not necessarily with a variable (real patterns)
return new InstanceId();
} else {
throw new AlignmentException("There is no pasrser for entity " + rdfType.getLocalName());
throw new AlignmentException("parseInstance : There is no parser for entity " + rdfType.getLocalName());
}
}
......
<?xml version='1.0' encoding='utf-8' standalone='no'?>
<rdf:RDF xmlns='http://knowledgeweb.semanticweb.org/heterogeneity/alignment#'
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:ns0='http://exmo.inrialpes.fr/align/service#'
xmlns:xsd='http://www.w3.org/2001/XMLSchema#'
xmlns:align='http://knowledgeweb.semanticweb.org/heterogeneity/alignment#'
xmlns:edoal='http://ns.inria.org/edoal/1.0/#'>
<Alignment rdf:about="http://localhost:8089/alid/1394718240757/976">
<xml>yes</xml>
<level>2EDOAL</level>
<type>?*</type>
<pretty>test1</pretty>
<ns0:cached>Thu Mar 13 14:44:05 CET 2014</ns0:cached>
<ns0:stored>null</ns0:stored>
<time>34</time>
<ns0:ouri2>http://purl.org/ontology/mo/</ns0:ouri2>
<id>http://localhost:8089/alid/1394718240757/976</id>
<ns0:ouri1>http://exmo.inria.fr/connectors-data/example_musical_work_desc/</ns0:ouri1>
<method>fr.inrialpes.exmo.align.impl.method.SubsDistNameAlignment</method>
<onto1>
<Ontology rdf:about="http://exmo.inria.fr/connectors-data/example_musical_work_desc/">
<location>file:///home/nicolas/Bureau/Discotheka/Inria/Mission/tests/musical_work_source_desc.owl</location>
<formalism>
<Formalism align:name="OWL2.0" align:uri="http://www.w3.org/2002/07/owl#"/>
</formalism>
</Ontology>
</onto1>
<onto2>
<Ontology rdf:about="http://purl.org/ontology/mo/">
<location>file:///home/nicolas/Bureau/Discotheka/Inria/Mission/tests/musicontology1.2.rdf</location>
<formalism>
<Formalism align:name="OWL2.0" align:uri="http://www.w3.org/2002/07/owl#"/>
</formalism>
</Ontology>
</onto2>
<map>
<Cell rdf:about="http://exmo.inrialpes.fr/connectors-core#cell1">
<entity1>
<edoal:Class rdf:about="http://exmo.inrialpes.fr/connectors-core#RootElement"/>
</entity1>
<entity2>
<edoal:Class rdf:about="http://purl.org/ontology/mo/MusicalWork"/>
</entity2>
<relation>=</relation>
<measure rdf:datatype='http://www.w3.org/2001/XMLSchema#float'>1.0</measure>
<edoal:linkkey>
<edoal:Linkkey>
<edoal:binding>
<edoal:Intersects>
<edoal:property1>
<edoal:Property rdf:about="http://exmo.inrialpes.fr/connectors-data#tonalite"/>
</edoal:property1>
<edoal:property2>
<edoal:Property>
<edoal:and rdf:parseType="Collection">
<edoal:PropertyDomainRestriction>
<edoal:class>
<edoal:Class rdf:about="http://purl.org/NET/c4dm/keys.owl#Key"/>
</edoal:class>
</edoal:PropertyDomainRestriction>
<edoal:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#label"/>
</edoal:and>
</edoal:Property>
</edoal:property2>
</edoal:Intersects>
</edoal:binding>
</edoal:Linkkey>
</edoal:linkkey>
</Cell>
</map>
<map>
<Cell rdf:about="http://exmo.inrialpes.fr/connectors-core#cell2">
<entity1>
<edoal:Property rdf:about="http://exmo.inrialpes.fr/connectors-data#tonalite" />
</entity1>
<entity2>
<edoal:Property>
<edoal:and rdf:parseType="Collection">
<edoal:PropertyDomainRestriction>
<edoal:class>
<edoal:Class rdf:about="http://purl.org/NET/c4dm/keys.owl#Key"/>
</edoal:class>
</edoal:PropertyDomainRestriction>
<edoal:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#label"/>
</edoal:and>
</edoal:Property>
</entity2>
<relation>=</relation>
<measure rdf:datatype='http://www.w3.org/2001/XMLSchema#float'>1.0</measure>
</Cell>
</map>
</Alignment>
</rdf:RDF>
......@@ -17,8 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import fr.inrialpes.exmo.align.impl.edoal.ClassId;
import fr.inrialpes.exmo.align.impl.edoal.EDOALAlignment;
import fr.inrialpes.exmo.align.impl.edoal.EDOALCell;
......@@ -84,7 +82,7 @@ public class SPARQLConstructVisitorTest {
+ "WHERE {\n"
+ "?s ns0:opus ?o .\n"
+ "}\n";
String expectedQuery2 = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+ "PREFIX ns0:<http://exmo.inrialpes.fr/connectors#>\n"
+ "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
......@@ -95,12 +93,10 @@ public class SPARQLConstructVisitorTest {
+ "?s ns1:opus ?o .\n"
+ "}\n";
assertEquals(renderer.getQueryFromOnto1ToOnto2(opusCell), expectedQuery1);
assertEquals(renderer.getQueryFromOnto2ToOnto1(opusCell), expectedQuery2);
//For remote sparql endpoint :
// String remoteServiceURIName = "http://example.org/remoteSparql";
// URI remoteServiceURI = new URI(remoteServiceURIName);
//
......@@ -153,7 +149,6 @@ public class SPARQLConstructVisitorTest {
renderer.init(properties);
alignment.render(renderer);
String expectedQuery1 = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+ "PREFIX ns0:<http://exmo.inrialpes.fr/connectors#>\n"
+ "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
......@@ -163,7 +158,7 @@ public class SPARQLConstructVisitorTest {
+ "WHERE {\n"
+ "?s rdf:type ns0:RootElement .\n"
+ "}\n";
String expectedQuery2 = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+ "PREFIX ns0:<http://exmo.inrialpes.fr/connectors#>\n"
+ "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
......@@ -173,57 +168,132 @@ public class SPARQLConstructVisitorTest {
+ "WHERE {\n"
+ "?s rdf:type ns1:MusicalWork .\n"
+ "}\n";
assertEquals(renderer.getQueryFromOnto1ToOnto2(classCell), expectedQuery1);
assertEquals(renderer.getQueryFromOnto2ToOnto1(classCell), expectedQuery2);
}
@Test(groups = {"full", "impl", "raw"})
public void ConstructComposePropertyRelation() throws Exception {
String[] alignmentFilesNames = {"alignment1.rdf"};
for (String alignmentFileName : alignmentFilesNames) {
EDOALAlignment alignment = Utils.loadAlignement(alignmentFileName);
StringWriter stringWriter = new StringWriter();
PrintWriter writer = new PrintWriter(stringWriter);
SPARQLConstructRendererVisitor renderer = new SPARQLConstructRendererVisitor(writer);
Properties properties = new Properties();
renderer.init(properties);
alignment.render(renderer);
assertEquals(alignment.nbCells(), 1);
Enumeration<Cell> cells = alignment.getElements();
Cell cell = cells.nextElement();
String expectedQuery1 = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+ "PREFIX ns1:<http://purl.org/NET/c4dm/keys.owl#>\n"
+ "PREFIX ns0:<http://exmo.inrialpes.fr/connectors#>\n"
+ "PREFIX ns3:<http://www.w3.org/2000/01/rdf-schema#>\n"
+ "PREFIX ns2:<http://purl.org/ontology/mo/>\n"
+ "CONSTRUCT {\n"
+ "_:o3 rdf:type ns1:Key .\n"
+ "_:o3 ns2:key _:o4 .\n"
+ "_:o4 ns3:label ?o .\n"
+ "}\n"
+ "WHERE {\n"
+ "?s ns0:key ?o .\n"
+ "}\n";
String expectedQuery2 = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+ "PREFIX ns1:<http://purl.org/NET/c4dm/keys.owl#>\n"
+ "PREFIX ns0:<http://exmo.inrialpes.fr/connectors#>\n"
+ "PREFIX ns3:<http://www.w3.org/2000/01/rdf-schema#>\n"
+ "PREFIX ns2:<http://purl.org/ontology/mo/>\n"
+ "CONSTRUCT {\n"
+ "?s ns0:key ?o .\n"
+ "}\n"
+ "WHERE {\n"
+ "?o3 rdf:type ns1:Key .\n"
+ "?o3 ns2:key ?o4 .\n"
+ "?o4 ns3:label ?o .\n"
+ "}\n";
assertEquals(renderer.getQueryFromOnto1ToOnto2(cell), expectedQuery1, "FOR alignment file " + alignmentFileName);
assertEquals(renderer.getQueryFromOnto2ToOnto1(cell), expectedQuery2, "FOR alignment file " + alignmentFileName);
}
String alignmentFileName = "alignment1.rdf";
EDOALAlignment alignment = Utils.loadAlignement(alignmentFileName);
StringWriter stringWriter = new StringWriter();
PrintWriter writer = new PrintWriter(stringWriter);
SPARQLConstructRendererVisitor renderer = new SPARQLConstructRendererVisitor(writer);
Properties properties = new Properties();
renderer.init(properties);
alignment.render(renderer);
assertEquals(alignment.nbCells(), 1);
Enumeration<Cell> cells = alignment.getElements();
Cell cell = cells.nextElement();
String expectedQuery1 = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+ "PREFIX ns1:<http://purl.org/NET/c4dm/keys.owl#>\n"
+ "PREFIX ns0:<http://exmo.inrialpes.fr/connectors#>\n"
+ "PREFIX ns3:<http://www.w3.org/2000/01/rdf-schema#>\n"
+ "PREFIX ns2:<http://purl.org/ontology/mo/>\n"
+ "CONSTRUCT {\n"
+ "_:o3 rdf:type ns1:Key .\n"
+ "_:o3 ns2:key _:o4 .\n"
+ "_:o4 ns3:label ?o .\n"
+ "}\n"
+ "WHERE {\n"
+ "?s ns0:key ?o .\n"
+ "}\n";
String expectedQuery2 = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+ "PREFIX ns1:<http://purl.org/NET/c4dm/keys.owl#>\n"
+ "PREFIX ns0:<http://exmo.inrialpes.fr/connectors#>\n"
+ "PREFIX ns3:<http://www.w3.org/2000/01/rdf-schema#>\n"
+ "PREFIX ns2:<http://purl.org/ontology/mo/>\n"
+ "CONSTRUCT {\n"
+ "?s ns0:key ?o .\n"
+ "}\n"
+ "WHERE {\n"
+ "?o3 rdf:type ns1:Key .\n"
+ "?o3 ns2:key ?o4 .\n"
+ "?o4 ns3:label ?o .\n"
+ "}\n";
assertEquals(renderer.getQueryFromOnto1ToOnto2(cell), expectedQuery1, "FOR alignment file " + alignmentFileName);
assertEquals(renderer.getQueryFromOnto2ToOnto1(cell), expectedQuery2, "FOR alignment file " + alignmentFileName);
}
// @Test(groups = {"full", "impl", "raw"})
// public void ConstructFromAndProperty() throws Exception {
// String alignmentFileName = "alignment_with_and_property.rdf";
// EDOALAlignment alignment = Utils.loadAlignement(alignmentFileName);
// StringWriter stringWriter = new StringWriter();
// PrintWriter writer = new PrintWriter(stringWriter);
// SPARQLConstructRendererVisitor renderer = new SPARQLConstructRendererVisitor(writer);
// Properties properties = new Properties();
// renderer.init(properties);
// alignment.render(renderer);
// assertEquals(alignment.nbCells(), 2);
// Enumeration<Cell> cells = alignment.getElements();
//
// Cell cell1 = null;
// Cell cell2 = null;
// while (cells.hasMoreElements()) {
// Cell cell = cells.nextElement();
// if (cell.getId().equals("http://exmo.inrialpes.fr/connectors-core#cell1")) {
// cell1 = cell;
// } else {
// cell2 = cell;
// }
// }
// //First test : with "and" property on linkkey
// String expectedQuery = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
// + "PREFIX ns0:<http://exmo.inrialpes.fr/connectors-core#>\n"
// + "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
// + "CONSTRUCT {\n"
// + "?s rdf:type ns1:MusicalWork .\n"
// + "}\n"
// + "WHERE {\n"
// + "?s rdf:type ns0:RootElement .\n"
// + "}\n";
// String realQuery = renderer.getQueryFromOnto1ToOnto2(cell1);
// assertEquals(realQuery, expectedQuery);
// expectedQuery = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
// + "PREFIX ns0:<http://exmo.inrialpes.fr/connectors-core#>\n"
// + "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
// + "CONSTRUCT {\n"
// + "?s rdf:type ns0:RootElement .\n"
// + "}\n"
// + "WHERE {\n"
// + "?s rdf:type ns1:MusicalWork .\n"
// + "}\n";
// realQuery = renderer.getQueryFromOnto2ToOnto1(cell1);
// assertEquals(realQuery, expectedQuery);
// //Second test : with "and" property on entity
// expectedQuery = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
// + "PREFIX ns2:<http://exmo.inrialpes.fr/connectors-data#>\n"
// + "PREFIX ns0:<http://exmo.inrialpes.fr/connectors-core#>\n"
// + "PREFIX ns3:<http://purl.org/NET/c4dm/keys.owl#>\n"
// + "PREFIX ns4:<http://www.w3.org/2000/01/rdf-schema#>\n"
// + "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
// + "CONSTRUCT {\n"
// + "?s rdf:type ns3:Key .\n"
// + "?s ns4:label ?o .\n"//@ Jrme : we have ?o2 instead of ?o
// + "}\n"
// + "WHERE {\n"
// + "?s ns2:tonalite ?o .\n"
// + "}\n";
// realQuery = renderer.getQueryFromOnto1ToOnto2(cell2);
// assertEquals(realQuery, expectedQuery);
// expectedQuery = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
// + "PREFIX ns2:<http://exmo.inrialpes.fr/connectors-data#>\n"
// + "PREFIX ns0:<http://exmo.inrialpes.fr/connectors-core#>\n"
// + "PREFIX ns3:<http://purl.org/NET/c4dm/keys.owl#>\n"
// + "PREFIX ns4:<http://www.w3.org/2000/01/rdf-schema#>\n"
// + "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
// + "CONSTRUCT {\n"
// + "?s ns2:tonalite ?o .\n"
// + "}\n"
// + "WHERE {\n"
// + "?s rdf:type ns3:Key .\n"
// + "?s ns4:label ?o .\n"//@ Jrme : we have ?o2 instead of ?o
// + "}\n";
// realQuery = renderer.getQueryFromOnto2ToOnto1(cell2);
// assertEquals(realQuery, expectedQuery);
// }
}
......@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import com.hp.hpl.jena.query.Query;
import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.QueryExecutionFactory;
......@@ -45,7 +44,7 @@ import org.testng.annotations.Test;
public class SPARQLSelectRendererVisitorTest {
@Test(groups = {"full", "impl", "raw"})
public void QueryFromWithoutLinkkey() throws Exception {
public void QueryWithoutLinkkey() throws Exception {
String alignmentFileName = "alignment3.rdf";
EDOALAlignment alignment = Utils.loadAlignement(alignmentFileName);
StringWriter stringWriter = new StringWriter();
......@@ -81,7 +80,94 @@ public class SPARQLSelectRendererVisitorTest {
assertEquals(renderer.getQueryFromOnto2ToOnto1(cell), expectedQuery);
}
@Test(groups = {"full", "impl", "raw"}, dependsOnMethods = {"QueryFromWithoutLinkkey"})
// @Test(groups = {"full", "impl", "raw"}, dependsOnMethods = {"QueryWithoutLinkkey"})
// public void QueryFromAndProperty() throws Exception {
// String alignmentFileName = "alignment_with_and_property.rdf";
// EDOALAlignment alignment = Utils.loadAlignement(alignmentFileName);
// StringWriter stringWriter = new StringWriter();
// PrintWriter writer = new PrintWriter(stringWriter);
// SPARQLSelectRendererVisitor renderer = new SPARQLSelectRendererVisitor(writer);
// Properties properties = new Properties();
// renderer.init(properties);
// alignment.render(renderer);
// assertEquals(alignment.nbCells(), 2);
// Enumeration<Cell> cells = alignment.getElements();
//
// Cell cell1 = null;
// Cell cell2 = null;
// while (cells.hasMoreElements()) {
// Cell cell = cells.nextElement();
// if (cell.getId().equals("http://exmo.inrialpes.fr/connectors-core#cell1")) {
// cell1 = cell;
// } else {
// cell2 = cell;
// }
// }
// //First test : with "and" property on linkkey
// String expectedQuery = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
// + "PREFIX ns2:<http://exmo.inrialpes.fr/connectors-data#>\n"
// + "PREFIX ns0:<http://exmo.inrialpes.fr/connectors-core#>\n"
// + "PREFIX ns3:<http://purl.org/NET/c4dm/keys.owl#>\n"
// + "PREFIX ns4:<http://www.w3.org/2000/01/rdf-schema#>\n"
// + "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
// + "SELECT DISTINCT ?s1 ?s2 \n"
// + "WHERE {\n"
// + "?s1 rdf:type ns0:RootElement .\n"
// + "?s2 rdf:type ns1:MusicalWork .\n"
// + "?s1 ns2:tonalite ?o1 .\n"
// + "?s2 rdf:type ns3:Key .\n"
// + "?s2 ns4:label ?o1 .\n"//@ Jrme : we have ?o2 instead of ?o1
// + "FILTER(?s1 != ?s2)\n"
// + "}\n";
// assertEquals(renderer.getQueryFromOnto1ToOnto2(cell1), expectedQuery);
// expectedQuery = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
// + "PREFIX ns2:<http://exmo.inrialpes.fr/connectors-data#>\n"
// + "PREFIX ns0:<http://exmo.inrialpes.fr/connectors-core#>\n"
// + "PREFIX ns3:<http://purl.org/NET/c4dm/keys.owl#>\n"
// + "PREFIX ns4:<http://www.w3.org/2000/01/rdf-schema#>\n"
// + "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
// + "SELECT DISTINCT ?s1 ?s2 \n"
// + "WHERE {\n"
// + "?s2 rdf:type ns0:RootElement .\n"
// + "?s1 rdf:type ns1:MusicalWork .\n"
// + "?s2 ns2:tonalite ?o1 .\n"
// + "?s1 rdf:type ns3:Key .\n"
// + "?s1 ns4:label ?o1 .\n"//@ Jrme : we have ?o2 instead of ?o1
// + "FILTER(?s1 != ?s2)\n"
// + "}\n";
// assertEquals(renderer.getQueryFromOnto2ToOnto1(cell1), expectedQuery);
// //Second test : with "and" property on entity
// expectedQuery = "SELECT QUERY 1 : PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
// + "PREFIX ns2:<http://exmo.inrialpes.fr/connectors-data#>\n"
// + "PREFIX ns0:<http://exmo.inrialpes.fr/connectors-core#>\n"
// + "PREFIX ns3:<http://purl.org/NET/c4dm/keys.owl#>\n"
// + "PREFIX ns4:<http://www.w3.org/2000/01/rdf-schema#>\n"
// + "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
// + "SELECT DISTINCT ?s1 ?s2 \n"
// + "WHERE {\n"
// + "?s1 ns2:tonalite ?o .\n"
// + "?s2 rdf:type ns3:Key .\n"
// + "?s2 ns4:label ?o .\n"//@ Jrme : we have ?o2 instead of ?o
// + "FILTER(?s1 != ?s2)\n"
// + "}\n";
// assertEquals(renderer.getQueryFromOnto1ToOnto2(cell2), expectedQuery);
// expectedQuery = "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
// + "PREFIX ns2:<http://exmo.inrialpes.fr/connectors-data#>\n"
// + "PREFIX ns0:<http://exmo.inrialpes.fr/connectors-core#>\n"
// + "PREFIX ns3:<http://purl.org/NET/c4dm/keys.owl#>\n"
// + "PREFIX ns4:<http://www.w3.org/2000/01/rdf-schema#>\n"
// + "PREFIX ns1:<http://purl.org/ontology/mo/>\n"
// + "SELECT DISTINCT ?s1 ?s2 \n"
// + "WHERE {\n"
// + "?s2 ns2:tonalite ?o .\n"
// + "?s1 rdf:type ns3:Key .\n"
// + "?s1 ns4:label ?o .\n"//@ Jrme : we have ?o2 instead of ?o
// + "FILTER(?s1 != ?s2)\n"
// + "}\n";
// assertEquals(renderer.getQueryFromOnto2ToOnto1(cell2), expectedQuery);
// }
@Test(groups = {"full", "impl", "raw"}, dependsOnMethods = {"QueryWithoutLinkkey"})
public void QueryFromSimpleLinkkeyAndIntersects() throws Exception {
String alignmentFileName = "people_intersects_alignment.rdf";
EDOALAlignment alignment = Utils.loadAlignement(alignmentFileName);
......@@ -153,7 +239,7 @@ public class SPARQLSelectRendererVisitorTest {
}
}
@Test(groups = {"full", "impl", "raw"}, dependsOnMethods = {"QueryFromWithoutLinkkey", "QueryFromSimpleLinkkeyAndIntersects"})
@Test(groups = {"full", "impl", "raw"}, dependsOnMethods = {"QueryWithoutLinkkey", "QueryFromSimpleLinkkeyAndIntersects"})
public void QueryFromSimpleLinkkeyAndEquals() throws Exception {
String alignmentFileName = "people_equals_alignment.rdf";
EDOALAlignment alignment = Utils.loadAlignement(alignmentFileName);
......@@ -237,6 +323,7 @@ public class SPARQLSelectRendererVisitorTest {
assertTrue(resultValues.contains(expected), "For expected : " + expected);
}
}
@Test(groups = {"full", "impl", "raw"}, dependsOnMethods = {"QueryFromSimpleLinkkeyAndIntersects"})
public void QueryFromRelationLinkkeyAndIntersects() throws Exception {
String alignmentFileName = "people_relation_intersects_alignment.rdf";
......@@ -414,7 +501,7 @@ public class SPARQLSelectRendererVisitorTest {
//
// }
// @Test(groups = {"full", "impl", "raw"}, dependsOnMethods = {"QueryFromWithoutLinkkey", "QueryFromSimpleLinkkeyFromEquals"})
// @Test(groups = {"full", "impl", "raw"}, dependsOnMethods = {"QueryWithoutLinkkey", "QueryFromSimpleLinkkeyFromEquals"})
// public void QueryFromSimpleLinkkeyFromIntersectsAndRelation() throws Exception {
// fail("HAVE TODO : with (in + eq) => OPTIONAL (with SERVICE call on remote) / many correspondances / With transformations / On local (FROM ...) or remote sparql endpoint (SERVICE) ");
// }
......
......@@ -23,13 +23,11 @@ import fr.inrialpes.exmo.align.impl.edoal.EDOALAlignment;
import fr.inrialpes.exmo.align.parser.AlignmentParser;
import fr.inrialpes.exmo.align.parser.RDFParser;
import com.hp.hpl.jena.ontology.OntModelSpec;
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.query.DatasetFactory;
import com.hp.hpl.jena.query.QuerySolution;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import java.io.FileInputStream;
import java.io.InputStream;
......
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