> -----Original Message----- > From: Marvin Lugair [mailto:[EMAIL PROTECTED] > Sent: 01 November 2008 09:06 > To: [email protected] > Subject: [Dbpedia-discussion] bif:contains text search treated as a prefix > > > > I am trying to run this against the public DBPedia SPARQL gateway (text > search) > > This is straight from the website doc.... > I get this error: > > Exception in thread "main" com.hp.hpl.jena.query.QueryParseException: Line > 1, column 588: Unresolved prefixed name: bif:contains
A bit more stacktrace would help ... > > Here is the query string: > > String sparqlQueryString = " PREFIX owl: > <http://www.w3.org/2002/07/owl#>"+ > " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>"+ > " PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>"+ > " PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>"+ > " PREFIX foaf: <http://xmlns.com/foaf/0.1/>"+ > " PREFIX dc: <http://purl.org/dc/elements/1.1/>"+ > " PREFIX : <http://dbpedia.org/resource/>"+ > " PREFIX dbpedia2: <http://dbpedia.org/property/>"+ > " PREFIX dbpedia: <http://dbpedia.org/>"+ > " PREFIX skos: <http://www.w3.org/2004/02/skos/core#>"+ > " SELECT DISTINCT ?x ?y"+ > " FROM <http://dbpedia.org>"+ > " WHERE {"+ > " ?x rdfs:label ?y ."+ > " ?y bif:contains \"Berlin\" ."+ You have used bif: here. It needs a matching PREFIX . There are no default prefixes in SPARQL. (If you put newlines in queries, you get better error messages) > " ?x skos:subject ?z ."+ > " }"; > > > Why is Virtuoso thinking bif is a prefix? > > > I am trying to run this from Jena because the web interface give me a time > out. Which way are you creating the request? If via QueryExecutionFactory, Jena parses the query before sending it to help check for errors. Like missing prefix declarations :-) If you are desperate, you can bypass this with a direct call to QueryEngineHTTP(service, queryString) but you are on your own at that point. Andy > > Thanks much! > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Dbpedia-discussion mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Dbpedia-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
