Hi,
thanks for your contribution! It would be great if we had such a
feature. We are planning to integrate some parts of Benjamin Nowaks ARC
http://arc.web-semantics.org/ in RAP. I propose you have a look at
Benjamins code before continuing your work. Maybe you can adapt ARC to
RAPs SPARQL engine.
Regards,
Tobias
> Hello,
>
> I have a question about the SparqlEngine in the case when DbModel is used
> for RDF storage.
>
> What do you think about replacing the following code in
> SparqlEngine->matchPattern
>
> $resultSet = $this->findTuplesMatchingOnePattern($qt[0], $newGraphList);
> for ($i=1; $i<count($qt); $i++) {
> $rs = $this->findTuplesMatchingOnePattern($qt[$i], $newGraphList);
> $resultSet = $this->joinTuples($resultSet, $rs);
> if(!$resultSet)
> break;
> }
> if($finalRes != null){
> $finalRes = $this->joinTuples($finalRes,$resultSet);
> }else{
> $finalRes = $resultSet;
> }
>
> by some code which generates a single SQL-Statement which would translate
> SPAQL-Queries like
>
> PREFIX vcard <http://www.w3.org/2001/vcard-rdf/3.0#>
> SELECT ?fullName ?age ?telval ?tel
> WHERE { ?x vcard:age ?age . ?x vcard:FN ?fullName. ?x vcard:TEL ?tel. ?tel
> rdf:value ?telval}
>
> into SQL-Queries like
>
> select t0.object as age, t0.object_is as age_type, t1.object as fullName,
> t1.object_is as fullName_type, t2.object as tel, t2.object_is as tel_type,
> t3.object as telval, t3.object_is as telval_type from statements as t0
> join statements as t1 on t0.subject=t1.subject join statements as t2 on
> t0.subject=t2.subject join statements as t3 on t2.object=t3.subject where
> 1=1 and t0.predicate = 'http://www.w3.org/2001/vcard-rdf/3.0#age' and
> t1.predicate = 'http://www.w3.org/2001/vcard-rdf/3.0#FN' and t2.predicate =
> 'http://www.w3.org/2001/vcard-rdf/3.0#TEL' and t3.predicate =
> 'http://www.w3.org/1999/02/22-rdf-syntax-ns#value'
>
> ?
>
> I have done some basic work into this direction but I want to know what you
> think about such a modification?
>
> With kind regards
> Stefan Erras
>
>
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> _______________________________________________
> Rdfapi-php-interest mailing list
> Rdf...@li...
> https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest
>
|