You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Miguel Bento Alves <mb...@gmail.com> on 2014/11/19 00:00:24 UTC
Fuseki doubt
I have a semantic environment where I have, besides ontologies and data, jena rules, custom built-in functions that are called in jena rules. Can I implement a Fuseki server that answer to a sparql command considering all these things?
For example, I have a sparql command:
Select ?p1 ?p2
where
{
?p1 exa:isGrandFather ?p2 .
?p1 rdf:type exa:Adult .
}
I execute the command above in my semantic environment. I want to be able to execute also in a Sparql endpoint. Is this possible? I didn’t figure out how can I do it.
(note: this is just an example to simplify, is not my real case)
Considering:
I have the follow rules:
(?p1 :isGrandFather ?p2) <-
(p1 exa:isParent ?p3),
(?p2 exa:isFatherOf ?p2).
(?p1 rdf:type exa:Adult) <-
(?p1 exa:birthday ?d),
getAge(?d, ?age),
ge(?age, 18).
getAge is a custom built-in function.
Miguel
Re: Fuseki doubt
Posted by Miguel Bento Alves <mb...@gmail.com>.
Hi David,
In Jena, the rules are not encoding in the graph, right? Furthermore, my rules calls custom built-in functions. I think I need a java environment with jena and I need to know if it is possible using Fuseki.
Miguel
> On 18 Nov 2014, at 23:22, David Moss <ad...@gmail.com> wrote:
>
> I can't see a problem with that. If the triples encoding your rules are in the graph you should be able to send any valid SPARQL query to Fuseki and get a response. I suggest you set up a local Fuseki server and try it.
>
> DM
>
> Sent from my iPhone
>
>> On 19 Nov 2014, at 9:00 am, Miguel Bento Alves <mb...@gmail.com> wrote:
>>
>> I have a semantic environment where I have, besides ontologies and data, jena rules, custom built-in functions that are called in jena rules. Can I implement a Fuseki server that answer to a sparql command considering all these things?
>>
>> For example, I have a sparql command:
>>
>> Select ?p1 ?p2
>> where
>> {
>> ?p1 exa:isGrandFather ?p2 .
>> ?p1 rdf:type exa:Adult .
>> }
>>
>> I execute the command above in my semantic environment. I want to be able to execute also in a Sparql endpoint. Is this possible? I didn’t figure out how can I do it.
>>
>> (note: this is just an example to simplify, is not my real case)
>>
>> Considering:
>>
>> I have the follow rules:
>>
>> (?p1 :isGrandFather ?p2) <-
>> (p1 exa:isParent ?p3),
>> (?p2 exa:isFatherOf ?p2).
>>
>> (?p1 rdf:type exa:Adult) <-
>> (?p1 exa:birthday ?d),
>> getAge(?d, ?age),
>> ge(?age, 18).
>>
>> getAge is a custom built-in function.
>>
>> Miguel
Re: Fuseki doubt
Posted by Mark Feblowitz <Ma...@comcast.net>.
Of course, you would have to configure Fuseki with the inferencing capability needed to process these rules.
Look sat the config-inf-tdb.ttl example in the fuseki distribution, and search for other similar examples for using the reasoner you require.
> On Nov 18, 2014, at 6:22 PM, David Moss <ad...@gmail.com> wrote:
>
> I can't see a problem with that. If the triples encoding your rules are in the graph you should be able to send any valid SPARQL query to Fuseki and get a response. I suggest you set up a local Fuseki server and try it.
>
> DM
>
> Sent from my iPhone
>
>> On 19 Nov 2014, at 9:00 am, Miguel Bento Alves <mb...@gmail.com> wrote:
>>
>> I have a semantic environment where I have, besides ontologies and data, jena rules, custom built-in functions that are called in jena rules. Can I implement a Fuseki server that answer to a sparql command considering all these things?
>>
>> For example, I have a sparql command:
>>
>> Select ?p1 ?p2
>> where
>> {
>> ?p1 exa:isGrandFather ?p2 .
>> ?p1 rdf:type exa:Adult .
>> }
>>
>> I execute the command above in my semantic environment. I want to be able to execute also in a Sparql endpoint. Is this possible? I didn’t figure out how can I do it.
>>
>> (note: this is just an example to simplify, is not my real case)
>>
>> Considering:
>>
>> I have the follow rules:
>>
>> (?p1 :isGrandFather ?p2) <-
>> (p1 exa:isParent ?p3),
>> (?p2 exa:isFatherOf ?p2).
>>
>> (?p1 rdf:type exa:Adult) <-
>> (?p1 exa:birthday ?d),
>> getAge(?d, ?age),
>> ge(?age, 18).
>>
>> getAge is a custom built-in function.
>>
>> Miguel
Re: Fuseki doubt
Posted by David Moss <ad...@gmail.com>.
I can't see a problem with that. If the triples encoding your rules are in the graph you should be able to send any valid SPARQL query to Fuseki and get a response. I suggest you set up a local Fuseki server and try it.
DM
Sent from my iPhone
> On 19 Nov 2014, at 9:00 am, Miguel Bento Alves <mb...@gmail.com> wrote:
>
> I have a semantic environment where I have, besides ontologies and data, jena rules, custom built-in functions that are called in jena rules. Can I implement a Fuseki server that answer to a sparql command considering all these things?
>
> For example, I have a sparql command:
>
> Select ?p1 ?p2
> where
> {
> ?p1 exa:isGrandFather ?p2 .
> ?p1 rdf:type exa:Adult .
> }
>
> I execute the command above in my semantic environment. I want to be able to execute also in a Sparql endpoint. Is this possible? I didn’t figure out how can I do it.
>
> (note: this is just an example to simplify, is not my real case)
>
> Considering:
>
> I have the follow rules:
>
> (?p1 :isGrandFather ?p2) <-
> (p1 exa:isParent ?p3),
> (?p2 exa:isFatherOf ?p2).
>
> (?p1 rdf:type exa:Adult) <-
> (?p1 exa:birthday ?d),
> getAge(?d, ?age),
> ge(?age, 18).
>
> getAge is a custom built-in function.
>
> Miguel