Re: SPARQL query errosr in executing

2014-04-27 Thread ameni ameni
Good morning,
I don't have the line 140 in my java program.


2014-04-27 10:39 GMT+02:00 Andy Seaborne a...@apache.org:

 On 27/04/14 00:31, ameni ameni wrote:

 Hello,
 I created a  SPARQL query

 But when i want to executed , i got this errors.

 Exception in thread main com.hp.hpl.jena.query.QueryParseException:
 Encountered at line 1, column 140.
 Was expecting:
  IRIref ...

 at com.hp.hpl.jena.sparql.lang.ParserARQ.perform(ParserARQ.java:102)
 at com.hp.hpl.jena.sparql.lang.ParserARQ.parse$(ParserARQ.java:53)
 atcom.hp.hpl.jena.sparql.lang.SPARQLParser.parse(SPARQLParser.java:3)
 at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:139)
 at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:79)
 at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:52)
 at
 javaapplication_eesai.JavaApplication_eesai.main(
 JavaApplication_eesai.java:97)

 Java Result: 1
 BUILD SUCCESSFUL (total time: 2 seconds)


 The last line refers to Query query = QueryFactory.create(query);

 I can't figure out what is the problem.


 Nor can anyone reading this message!  Insufficient information.

 What is at line 1 column 140?

 (put some newlines in the query string, then the line numbers are more
 helpful)


  Please help me
 Thanks a lot





Re: SPARQL query errosr in executing

2014-04-27 Thread Andy Seaborne

On 27/04/14 10:53, ameni ameni wrote:

Good morning,
I don't have the line 140 in my java program.


*line* 1, *column* 140.

In the query string.

No one can tell what the problem is that is causing the parse error 
without knowing what is being parsed.


Andy





2014-04-27 10:39 GMT+02:00 Andy Seaborne a...@apache.org:


On 27/04/14 00:31, ameni ameni wrote:


Hello,
I created a  SPARQL query

But when i want to executed , i got this errors.

Exception in thread main com.hp.hpl.jena.query.QueryParseException:
Encountered at line 1, column 140.
Was expecting:
  IRIref ...

at com.hp.hpl.jena.sparql.lang.ParserARQ.perform(ParserARQ.java:102)
at com.hp.hpl.jena.sparql.lang.ParserARQ.parse$(ParserARQ.java:53)
atcom.hp.hpl.jena.sparql.lang.SPARQLParser.parse(SPARQLParser.java:3)

   ^
impossible to be at line 3.

at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:139)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:79)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:52)
at
javaapplication_eesai.JavaApplication_eesai.main(
JavaApplication_eesai.java:97)

Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)


The last line refers to Query query = QueryFactory.create(query);

I can't figure out what is the problem.



Nor can anyone reading this message!  Insufficient information.

What is at line 1 column 140?

(put some newlines in the query string, then the line numbers are more
helpful)


  Please help me

Thanks a lot










Consistency checking

2014-04-27 Thread Cindy A McMullen
Hi -

Is there a way to check the consistency of triples with one's ontology prior to 
insertion into the graph?   If not, are there APIs to validate the existing 
graph against one's ontology?

Thanks - 

Re: Consistency checking

2014-04-27 Thread Martynas Jusevičius
Hey Cindy,

Check SPIN constraints:
http://spinrdf.org/spin.html#spin-constraints

Martynas
graphityhq.com
On Apr 27, 2014 1:41 PM, Cindy A McMullen cindy.mcmul...@oracle.com
wrote:

 Hi -

 Is there a way to check the consistency of triples with one's ontology
 prior to insertion into the graph?   If not, are there APIs to validate the
 existing graph against one's ontology?

 Thanks -


Re: Consistency checking

2014-04-27 Thread Dave Reynolds

On 27/04/14 12:41, Cindy A McMullen wrote:

Hi -

Is there a way to check the consistency of triples with one's ontology prior to 
insertion into the graph?   If not, are there APIs to validate the existing 
graph against one's ontology?


The Jena inference API supports validation:
http://jena.apache.org/documentation/inference/#validation

So you can construct an inference model over a data model, a reasoner 
and an ontology and then check the result for consistency.


How thorough the consistency checking depends on the reasoner. If you 
need complete DL consistency checking use Pellet or some other DL 
reasoner. The builtin OWL rule reasoner configurations do given some 
consistency checking.


Bewared that consistency in OWL is a weaker concept than schema 
validation so lots of things you might expect to be inconsistent aren't.


For more pragmatic validation of data there is Eyeball:
https://jena.apache.org/documentation/tools/eyeball-getting-started.html

Dave



Re: Consistency checking

2014-04-27 Thread Cindy A McMullen
Found a good example here (#5):

http://programcreek.com/java-api-examples/index.php?api=com.hp.hpl.jena.reasoner.Reasoner


On Apr 27, 2014, at 5:41 AM, Cindy A McMullen wrote:

 Hi -
 
 Is there a way to check the consistency of triples with one's ontology prior 
 to insertion into the graph?   If not, are there APIs to validate the 
 existing graph against one's ontology?
 
 Thanks -