Re: How to put one model in another

2017-04-30 Thread Dave Reynolds

On 30/04/17 18:40, tina sani wrote:

Hi Dave, if we have a rule like

if Person publications less than 10, Person is JuniorResearcher
if Person publications greater than 10, Person is SeniorResearcher

If person publication is first less than 10, rules will assign him to
JuniorResearcher class but when it exceeds 10, becomes SeniorResearcher but
the JuniorResearcher also be there as rules does not replace the existed
value with new one.


Depends how you set the publications. If you remove the old (<10) value 
and replace it with a new (>10) value then the rules will retract the 
JuniorResearcher assertion and assert the SeniorResearch assertion.



This was my query if we put the inferred model to a new model, will the
rules then be able to replace the previous data?


Sorry, I still have no idea what architecture you have in mind. I 
suggest trying a minimal example. If it doesn't do what you expect then 
that will give you something concrete to ask questions about.


Dave


On Sun, Apr 30, 2017 at 4:38 PM, Dave Reynolds 
wrote:


On 30/04/17 10:30, tina sani wrote:


I have a model Model1 with all data, having Jena rules. How can I put it
in
another model Model2 which may or may not have any data?



The way to add triples from one model to another is to use the
unsurprisingly named "add" as any glance at the javadoc would tell you.

 model2.add( model1 )

If model1 is actually an InfModel with forward rules then what will get
added to model2 is the base triples plus all inferred triples.

Second, after putting the model in another model, would we able to replace

previous values/data with new one, generated using Jena rules?



Question is unclear.

Once you have a model you and add or remove triples from it.

You can use rules to generate triples.

How you connect whatever bit of your code is using rules to whatever bit
of your code is holding the data is up to you. There are no out-of-the-box
rule builtins to allow you to fire a rule in one model and assert results
into another model if that's what you mean.

Dave








Re: How to put one model in another

2017-04-30 Thread tina sani
Hi Dave, if we have a rule like

if Person publications less than 10, Person is JuniorResearcher
if Person publications greater than 10, Person is SeniorResearcher

If person publication is first less than 10, rules will assign him to
JuniorResearcher class but when it exceeds 10, becomes SeniorResearcher but
the JuniorResearcher also be there as rules does not replace the existed
value with new one.

This was my query if we put the inferred model to a new model, will the
rules then be able to replace the previous data?


On Sun, Apr 30, 2017 at 4:38 PM, Dave Reynolds 
wrote:

> On 30/04/17 10:30, tina sani wrote:
>
>> I have a model Model1 with all data, having Jena rules. How can I put it
>> in
>> another model Model2 which may or may not have any data?
>>
>
> The way to add triples from one model to another is to use the
> unsurprisingly named "add" as any glance at the javadoc would tell you.
>
>  model2.add( model1 )
>
> If model1 is actually an InfModel with forward rules then what will get
> added to model2 is the base triples plus all inferred triples.
>
> Second, after putting the model in another model, would we able to replace
>> previous values/data with new one, generated using Jena rules?
>>
>
> Question is unclear.
>
> Once you have a model you and add or remove triples from it.
>
> You can use rules to generate triples.
>
> How you connect whatever bit of your code is using rules to whatever bit
> of your code is holding the data is up to you. There are no out-of-the-box
> rule builtins to allow you to fire a rule in one model and assert results
> into another model if that's what you mean.
>
> Dave
>
>


Re: How to put one model in another

2017-04-30 Thread Dave Reynolds

On 30/04/17 10:30, tina sani wrote:

I have a model Model1 with all data, having Jena rules. How can I put it in
another model Model2 which may or may not have any data?


The way to add triples from one model to another is to use the 
unsurprisingly named "add" as any glance at the javadoc would tell you.


 model2.add( model1 )

If model1 is actually an InfModel with forward rules then what will get 
added to model2 is the base triples plus all inferred triples.



Second, after putting the model in another model, would we able to replace
previous values/data with new one, generated using Jena rules?


Question is unclear.

Once you have a model you and add or remove triples from it.

You can use rules to generate triples.

How you connect whatever bit of your code is using rules to whatever bit 
of your code is holding the data is up to you. There are no 
out-of-the-box rule builtins to allow you to fire a rule in one model 
and assert results into another model if that's what you mean.


Dave



Re: Would it make sense to use GraphQL with Fuseki as a backend?

2017-04-30 Thread james anderson
good afternoon;

> On 2017-04-30, at 11:53, Laura Morales  wrote:
> 
> Would it make sense to use GraphQL with Fuseki as a backend?

you posed the question in different terms some time ago.

now, after wrangling sparql for two months, you remain unconvinced and raise 
the question again?

there are those who take the argument further, to suggest that it would be a 
great service to the entire semantic data processing ecosystem for rdf store 
developers to support graphql.
the argument is threefold
1. graphql “as-a-language” lowers the threshold to access and broadens the 
prospective client developer community.
2. graphql affords embedding in a wider range of development stacks and enables 
powerful development tools.
3. graphql is close enough to sparql on an abstract level, that the 
implementation effort would lie within reasonable boundaries.

the arguments are all good but, so far as i am aware just one implementation 
has ventured around that corner.


best regards, from berlin,
---
james anderson | ja...@dydra.com | http://dydra.com







Would it make sense to use GraphQL with Fuseki as a backend?

2017-04-30 Thread Laura Morales
Would it make sense to use GraphQL with Fuseki as a backend?


How to put one model in another

2017-04-30 Thread tina sani
I have a model Model1 with all data, having Jena rules. How can I put it in
another model Model2 which may or may not have any data?

Second, after putting the model in another model, would we able to replace
previous values/data with new one, generated using Jena rules?