Revision: 1891
Author: [email protected]
Date: Wed May 26 06:22:21 2010
Log: Make sure filterByName returns simal:Persons, not foaf:Persons.
http://code.google.com/p/simal/source/detail?r=1891
Modified:
/trunk/uk.ac.osswatch.simal.core/src/main/java/uk/ac/osswatch/simal/service/jena/JenaPersonService.java
=======================================
---
/trunk/uk.ac.osswatch.simal.core/src/main/java/uk/ac/osswatch/simal/service/jena/JenaPersonService.java
Fri May 14 03:13:46 2010
+++
/trunk/uk.ac.osswatch.simal.core/src/main/java/uk/ac/osswatch/simal/service/jena/JenaPersonService.java
Wed May 26 06:22:21 2010
@@ -90,11 +90,12 @@
public Set<IPerson> filterByName(String filter) {
String queryStr = "PREFIX xsd: <" +
AbstractSimalRepository.XSD_NAMESPACE_URI
+ "> " + "PREFIX foaf: <" + RDFUtils.FOAF_NS + "> "
- + "PREFIX rdf: <" + AbstractSimalRepository.RDF_NAMESPACE_URI + ">"
- + "PREFIX simal: <" + AbstractSimalRepository.SIMAL_NAMESPACE_URI
+ ">"
- + "SELECT DISTINCT ?person WHERE { ?person a foaf:Person;"
- + " foaf:name ?name . "
- + " FILTER regex(?name, \"" + convertFilterToRE(filter) + "\",
\"i\") }";
+ + "PREFIX rdf: <" + AbstractSimalRepository.RDF_NAMESPACE_URI + "> "
+ + "PREFIX rdfs: <" + AbstractSimalRepository.RDFS_NAMESPACE_URI
+ "> "
+ + "PREFIX simal: <" + AbstractSimalRepository.SIMAL_NAMESPACE_URI
+ "> "
+ + "SELECT DISTINCT ?person WHERE { ?person a simal:Person;
rdfs:seeAlso ?fp . "
+ + " ?fp foaf:name ?name . "
+ + "FILTER regex(?name, \"" + convertFilterToRE(filter) + "\", \"i\")
}";
return filterBySPARQL(queryStr);
}
--
You received this message because you are subscribed to the Google Groups "Simal
Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simal-commits?hl=en.