Author: rwesten
Date: Thu Aug 29 11:49:03 2013
New Revision: 1518614
URL: http://svn.apache.org/r1518614
Log:
STANBOL-1148: updates to the tests required by the change of the dbpedia
default data index
Modified:
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/EntityhubLDPathTest.java
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/backend/BackendTest.java
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/impl/LDPathTestBase.java
Modified:
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/EntityhubLDPathTest.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/EntityhubLDPathTest.java?rev=1518614&r1=1518613&r2=1518614&view=diff
==============================================================================
---
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/EntityhubLDPathTest.java
(original)
+++
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/EntityhubLDPathTest.java
Thu Aug 29 11:49:03 2013
@@ -87,24 +87,27 @@ public class EntityhubLDPathTest extends
vf.createText("伦æ¦","zh")
)));
expected.put("comment", new HashSet<Text>(Arrays.asList(
- vf.createText("London is the capital of England and the United
Kingdom, " +
- "the largest metropolitan area in the United Kingdom
and the " +
- "largest urban zone in the European Union by most
measures. " +
- "London has been a major settlement for two millennia,
its " +
- "history going back to its founding by the Romans, who
called " +
- "it Londinium. London's core, the ancient City of
London, " +
- "largely retains its square-mile mediaeval
boundaries.","en"))));
+ vf.createText("London Listen/ËlÊndÉn/ is the capital city of
England" +
+ " and the United Kingdom, the largest metropolitan area
in the" +
+ " United Kingdom, and the largest urban zone in the
European " +
+ "Union by most measures. Located on the River Thames,
London " +
+ "has been a major settlement for two millennia, its
history " +
+ "going back to its founding by the Romans, who named it
" +
+ "Londinium. London's ancient core, the City of London,
largely " +
+ "retains its square-mile mediaeval
boundaries.","en"))));
// NOTE: LDPath uses String to represent anyUri
expected.put("categories", new HashSet<Reference>(Arrays.asList(
vf.createReference("http://dbpedia.org/resource/Category:London"),
vf.createReference("http://dbpedia.org/resource/Category:British_capitals"),
vf.createReference("http://dbpedia.org/resource/Category:Populated_places_established_in_the_1st_century"),
vf.createReference("http://dbpedia.org/resource/Category:Staple_ports"),
-
vf.createReference("http://dbpedia.org/resource/Category:Articles_including_recorded_pronunciations_%28UK_English%29"),
+
vf.createReference("http://dbpedia.org/resource/Category:Articles_including_recorded_pronunciations_(UK_English)"),
vf.createReference("http://dbpedia.org/resource/Category:Capitals_in_Europe"),
vf.createReference("http://dbpedia.org/resource/Category:Host_cities_of_the_Commonwealth_Games"),
vf.createReference("http://dbpedia.org/resource/Category:Host_cities_of_the_Summer_Olympic_Games"),
-
vf.createReference("http://dbpedia.org/resource/Category:Port_cities_and_towns_in_the_United_Kingdom")
+
vf.createReference("http://dbpedia.org/resource/Category:Port_cities_and_towns_in_the_United_Kingdom"),
+
vf.createReference("http://dbpedia.org/resource/Category:Arthurian_locations"),
+
vf.createReference("http://dbpedia.org/resource/Category:Robin_Hood_locations")
)));
expected.put("type", new HashSet<Reference>(Arrays.asList(
vf.createReference("http://www.w3.org/2002/07/owl#Thing"),
Modified:
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/backend/BackendTest.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/backend/BackendTest.java?rev=1518614&r1=1518613&r2=1518614&view=diff
==============================================================================
---
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/backend/BackendTest.java
(original)
+++
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/backend/BackendTest.java
Thu Aug 29 11:49:03 2013
@@ -60,7 +60,7 @@ public class BackendTest extends LDPathT
Map<String,Collection<?>> expected = new
HashMap<String,Collection<?>>();
expected.put("title_en", new HashSet<String>(Arrays.asList("Paris")));
expected.put("title", new HashSet<String>(
-
Arrays.asList("Paris","Parijs","Parigi","Pariisi","å·´é»","ÐаÑиж")));
+
Arrays.asList("Paris","ParÃs","Parigi","å·´é»","Ø¨Ø§Ø±ÙØ³")));
// NOTE: LDPath uses String to represent anyUri
expected.put("type", new HashSet<String>(Arrays.asList(
"http://www.w3.org/2002/07/owl#Thing",
@@ -78,9 +78,10 @@ public class BackendTest extends LDPathT
allValues.addAll(Arrays.asList(
"http://dbpedia.org/resource/Category:Capitals_in_Europe",
"http://dbpedia.org/resource/Category:Host_cities_of_the_Summer_Olympic_Games",
- "2.350833","0.81884754","2193031"));
+ "48.8567","2.3508",
+
"http://upload.wikimedia.org/wikipedia/commons/6/6e/Paris_-_Eiffelturm_und_Marsfeld2.jpg"));
expected.put("all", allValues);
- expected.put("lat", Collections.emptySet());
+ expected.put("lat", Collections.singleton(48.8567));
EXPECTED_RESULTS_PARIS = Collections.unmodifiableMap(expected);
}
@@ -89,7 +90,7 @@ public class BackendTest extends LDPathT
static {
StringBuilder builder = new StringBuilder();
//TODO:write LDPath test statement (or load it from test resources
- builder.append("name = rdfs:label :: xsd:string;");
+ builder.append("name = skos:prefLabel :: xsd:string;");
builder.append("parent = skos:broader :: xsd:anyURI;");
builder.append("childs = ^skos:broader :: xsd:anyURI;");
builder.append("members = ^<http://purl.org/dc/terms/subject> ::
xsd:anyURI;");
@@ -104,32 +105,49 @@ public class BackendTest extends LDPathT
));
expected.put("parent", new HashSet<String>(Arrays.asList(
"http://dbpedia.org/resource/Category:Harvard_University_people",
-
"http://dbpedia.org/resource/Category:Alumni_by_university_or_college_in_Massachusetts",
- "http://dbpedia.org/resource/Category:Ivy_League_alumni")
+
"http://dbpedia.org/resource/Category:Alumni_by_university_or_college_in_Massachusetts")
));
expected.put("childs", new HashSet<String>(Arrays.asList(
-
"http://dbpedia.org/resource/Category:John_F._Kennedy_School_of_Government_alumni",
"http://dbpedia.org/resource/Category:Harvard_Law_School_alumni",
-
"http://dbpedia.org/resource/Category:Harvard_Medical_School_alumni",
"http://dbpedia.org/resource/Category:Harvard_Business_School_alumni")
));
expected.put("members", new HashSet<String>(Arrays.asList(
- "http://dbpedia.org/resource/Edward_Said",
- "http://dbpedia.org/resource/Cole_Porter",
- "http://dbpedia.org/resource/Theodore_Roosevelt",
- "http://dbpedia.org/resource/Al_Gore",
- "http://dbpedia.org/resource/T._S._Eliot",
- "http://dbpedia.org/resource/Henry_Kissinger",
- "http://dbpedia.org/resource/Robert_F._Kennedy",
- "http://dbpedia.org/resource/Benjamin_Netanyahu",
- "http://dbpedia.org/resource/Natalie_Portman",
+ "http://dbpedia.org/resource/Jacques_Derrida",
+ "http://dbpedia.org/resource/Pete_Seeger",
"http://dbpedia.org/resource/John_F._Kennedy",
- "http://dbpedia.org/resource/Michelle_Obama",
+ "http://dbpedia.org/resource/William_S._Burroughs",
+ "http://dbpedia.org/resource/Norman_Mailer",
+ "http://dbpedia.org/resource/John_Quincy_Adams",
+ "http://dbpedia.org/resource/John_Lithgow",
+ "http://dbpedia.org/resource/Ban_Ki-moon",
+ "http://dbpedia.org/resource/W._E._B._Du_Bois",
+ "http://dbpedia.org/resource/John_Adams",
"http://dbpedia.org/resource/Jacques_Chirac",
- "http://dbpedia.org/resource/Pierre_Trudeau",
+ "http://dbpedia.org/resource/William_Lyon_Mackenzie_King",
+ "http://dbpedia.org/resource/Chuck_Schumer",
+ "http://dbpedia.org/resource/Carl_H._Eigenmann",
"http://dbpedia.org/resource/Jack_Lemmon",
- "http://dbpedia.org/resource/Franklin_D._Roosevelt",
- "http://dbpedia.org/resource/John_Adams") // and manny more
+ "http://dbpedia.org/resource/Michael_Dukakis",
+ "http://dbpedia.org/resource/William_Rehnquist",
+ "http://dbpedia.org/resource/Robert_Frost",
+ "http://dbpedia.org/resource/T._S._Eliot",
+ "http://dbpedia.org/resource/Cole_Porter",
+ "http://dbpedia.org/resource/Henry_Kissinger",
+ "http://dbpedia.org/resource/Theodore_Roosevelt",
+ "http://dbpedia.org/resource/Benazir_Bhutto",
+ "http://dbpedia.org/resource/Pierre_Trudeau",
+ "http://dbpedia.org/resource/Henry_David_Thoreau",
+ "http://dbpedia.org/resource/Aga_Khan_IV",
+ "http://dbpedia.org/resource/Leonard_Bernstein",
+ "http://dbpedia.org/resource/William_Randolph_Hearst",
+ "http://dbpedia.org/resource/Natalie_Portman",
+ "http://dbpedia.org/resource/Al_Gore",
+ "http://dbpedia.org/resource/Al_Jean",
+ "http://dbpedia.org/resource/William_Healey_Dall",
+ "http://dbpedia.org/resource/Charles_Sanders_Peirce",
+ "http://dbpedia.org/resource/Conan_O'Brien",
+ "http://dbpedia.org/resource/Yo-Yo_Ma",
+ "http://dbpedia.org/resource/Robert_F._Kennedy")
));
EXPECTED_HARVARD_ALUMNI = Collections.unmodifiableMap(expected);
}
Modified:
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/impl/LDPathTestBase.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/impl/LDPathTestBase.java?rev=1518614&r1=1518613&r2=1518614&view=diff
==============================================================================
---
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/impl/LDPathTestBase.java
(original)
+++
stanbol/trunk/entityhub/ldpath/src/test/java/org/apache/stanbol/entityhub/ldpath/impl/LDPathTestBase.java
Thu Aug 29 11:49:03 2013
@@ -57,7 +57,7 @@ public abstract class LDPathTestBase {
*/
public static final String TEST_YARD_ID = "dbpedia";
public static final String TEST_SOLR_CORE_NAME = "dbpedia";
- public static final String TEST_SOLR_CORE_CONFIGURATION = "dbpedia_43k";
+ public static final String TEST_SOLR_CORE_CONFIGURATION =
"dbpedia_26k.solrindex.bz2";
protected static final String TEST_INDEX_REL_PATH = File.separatorChar +
"target" + File.separatorChar
+
ManagedSolrServer.DEFAULT_SOLR_DATA_DIR;