On 28/11/12 23:23, François-Paul Servant wrote:
import org.junit.Test;
import com.hp.hpl.jena.rdf.model.*;
public class LstStmt {
@Test
public final void test() {
Model m = ModelFactory.createDefaultModel();
Resource s = m.createResource("http://www.a.com/s");
Property p = m.createProperty("http://www.a.com/p");
Property o = m.createProperty("http://www.a.com/o");
m.add(s,p,o);
m.add(s,p,"texte","fr");
m.add(s,p,"text","en");
StmtIterator it = m.listStatements(s, p, null,"fr");
// display the 3 statements
for (;it.hasNext();) {
System.out.println(it.next());
}
}
}
Bizarre. The code does not filter as you (and I) expected.
Could you raise a JIRA for this? And if you have a patch, submit that
as well?
While it is technically a change to the formal API, your expectation
seems entirely intuitive.
Small issue of whether case should matter and whether a filter of "en"
matches "en-UK" (c.f. SPARQL LANGMATCHES) but for the API, at least
exact match seems reasonable to me.
Andy