It works! Thank you Marco.

Best regards.

----- Mensaje original -----
> De: "Marco Neumann" <[email protected]>
> Para: "users" <[email protected]>
> Enviados: Lunes, 25 de Noviembre 2019 14:46:10
> Asunto: [MASSMAIL]Re: Missing triples after loading RDF to Fuseki

> yes that is normal, if there is no matching subgraph in the graph SPARQL
> wont retrieve data.
> 
> make the following pattern optional in the query to retrieve the "missing"
> statements:
> 
> ?author swrc:affiliation ?affiliation.
> 
> On Mon, Nov 25, 2019 at 5:30 PM Yusniel Hidalgo Delgado
> <[email protected]> wrote:
> 
>> Hello all,
>>
>> I am trying to load an RDF graph to Jena Fuseki (the latest release). The
>> load process is completed without any warn or error, however, when I try to
>> query the loaded RDF, some triples are missed. Here are the test RDF graph,
>> the SPARQL query, and the result. I can't understand what is going on. Any
>> help?
>>
>> RDF graph:
>>
>> <?xml version="1.0"?>
>> <rdf:RDF
>> xmlns:vocab="http://localhost:2020/vocab/";
>> xmlns:dc="http://purl.org/dc/elements/1.1/";
>> xmlns:map="http://localhost:2020/#";
>> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
>> xmlns:bibo="http://purl.org/ontology/bibo/";
>> xmlns:foaf="http://xmlns.com/foaf/0.1/";
>> xmlns:db="http://localhost:2020/";
>> xmlns:owl="http://www.w3.org/2002/07/owl#";
>> xmlns:dcterms="http://purl.org/dc/terms/";
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema#";
>> xmlns:fabio="http://purl.org/spar/fabio/";
>> xmlns:dbpedia-owl="http://dbpedia.org/ontology/";
>> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
>> xmlns:swrc="http://swrc.ontoware.org/ontology#";
>> xml:base="http://localhost:2020/"; >
>> <rdf:Description rdf:about="article/1532">
>> <swrc:journal rdf:resource="journal/4"/>
>> <fabio:hasPublicationYear rdf:datatype="
>> http://www.w3.org/2001/XMLSchema#integer";>2008</fabio:hasPublicationYear>
>> <bibo:uri>http://www.medisur.sld.cu/index.php/medisur/article/view/353</bibo:uri>
>>
>> <fabio:abstract>Some text here.</fabio:abstract>
>> <dc:source>Medisur; Vol 6, No 1 (2008); 22-27</dc:source>
>> <dc:title>Efectividad del misoprostol para el aborto en el primer
>> trimestre del embarazo en adolescentes.</dc:title>
>> <dc:identifier>oai:ojs.localhost:article/353</dc:identifier>
>> <dc:date
>> rdf:datatype="http://www.w3.org/2001/XMLSchema#date";>2008-04-02</dc:date>
>>
>> <rdfs:label>Efectividad del misoprostol para el aborto en el primer
>> trimestre del embarazo en adolescentes.</rdfs:label>
>> <rdf:type rdf:resource="http://purl.org/spar/fabio/JournalArticle"/>
>> <dc:creator rdf:resource="author/3037"/>
>> <dc:creator rdf:resource="author/3038"/>
>> <dc:creator rdf:resource="author/3039"/>
>> <dc:creator rdf:resource="author/3040"/>
>> <dc:creator rdf:resource="author/3041"/>
>> <dc:creator rdf:resource="author/3042"/>
>> <fabio:InCollection rdf:resource="set/36"/>
>> </rdf:Description>
>> <rdf:Description rdf:about="author/3037">
>> <foaf:name>Práxedes Rojas Quintana</foaf:name>
>> <rdfs:label>Práxedes Rojas Quintana</rdfs:label>
>> <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
>> </rdf:Description>
>> <rdf:Description rdf:about="author/3038">
>> <foaf:name>Pedro Ayo Naranjo</foaf:name>
>> <rdfs:label>Pedro Ayo Naranjo</rdfs:label>
>> <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
>> </rdf:Description>
>> <rdf:Description rdf:about="author/3039">
>> <foaf:name>Alberto Jorge Fernández</foaf:name>
>> <rdfs:label>Alberto Jorge Fernández</rdfs:label>
>> <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
>> </rdf:Description>
>> <rdf:Description rdf:about="author/3040">
>> <foaf:name>Israel Sotolongo Castro</foaf:name>
>> <rdfs:label>Israel Sotolongo Castro</rdfs:label>
>> <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
>> </rdf:Description>
>> <rdf:Description rdf:about="author/3041">
>> <foaf:name>Joan Hernández Cabrera</foaf:name>
>> <rdfs:label>Joan Hernández Cabrera</rdfs:label>
>> <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
>> </rdf:Description>
>> <rdf:Description rdf:about="author/3042">
>> <swrc:affiliation>Hospital provincial universitario “Dr. Gustavo
>> Aldereguía Lima”. Cienfuegos.</swrc:affiliation>
>> <foaf:name>Annia Najarro</foaf:name>
>> <rdfs:label>Annia Najarro</rdfs:label>
>> <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
>> </rdf:Description>
>> <rdf:Description rdf:about="set/36">
>> <foaf:name>Artículos Originales</foaf:name>
>> <rdfs:label>Artículos Originales</rdfs:label>
>> <rdf:type rdf:resource="http://purl.org/spar/fabio/ItemCollection"/>
>> </rdf:Description>
>> </rdf:RDF>
>>
>> SPARQL query:
>>
>> prefix dc: <http://purl.org/dc/elements/1.1/>
>> prefix : <http://localhost/metharto/>
>> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>> prefix ns: <http://localhost/metharto/#>
>> prefix ns: <http://localhost/metharto/#>
>> prefix foaf: <http://xmlns.com/foaf/0.1/>
>> prefix bibo: <http://purl.org/ontology/bibo/>
>> prefix xsd: <http://www.w3.org/2001/XMLSchema#>
>> prefix rr: <http://www.w3.org/ns/r2rml#>
>> prefix map: <http://localhost/metharto/#>
>> prefix map: <http://localhost/metharto/#>
>> prefix swrc: <http://swrc.ontoware.org/ontology#>
>> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>> prefix fabio: <http://purl.org/spar/fabio/>
>> prefix vocab: <http://localhost/metharto/vocab/>
>> SELECT ?s ?author ?title ?name ?affiliation ?abstract ?uri ?year WHERE {
>> ?s a fabio:JournalArticle.
>> ?s dc:title ?title.
>> ?s fabio:abstract ?abstract.
>> ?s bibo:uri ?uri.
>> ?s fabio:hasPublicationYear ?year.
>> ?s dc:creator ?author.
>> ?author foaf:name ?name.
>> ?author swrc:affiliation ?affiliation.
>> filter(regex(?title, "Efectividad del misoprostol para el aborto","i"))
>> }
>> limit 100
>>
>> Query result:
>>
>> {
>> "head": {
>> "vars": [ "s" , "author" , "title" , "name" , "affiliation" , "abstract" ,
>> "uri" , "year" ]
>> } ,
>> "results": {
>> "bindings": [
>> {
>> "s": { "type": "uri" , "value": "http://localhost:2020/article/1532"; } ,
>> "author": { "type": "uri" , "value": "http://localhost:2020/author/3042";
>> } ,
>> "title": { "type": "literal" , "value": "Efectividad del misoprostol para
>> el aborto en el primer trimestre del embarazo en adolescentes." } ,
>> "name": { "type": "literal" , "value": "Annia Najarro" } ,
>> "affiliation": { "type": "literal" , "value": "Hospital provincial
>> universitario \u201CDr. Gustavo Aldereguía Lima\u201D. Cienfuegos." } ,
>> "abstract": { "type": "literal" , "value": "Some text here." } ,
>> "uri": { "type": "literal" , "value": "
>> http://www.medisur.sld.cu/index.php/medisur/article/view/353"; } ,
>> "year": { "type": "literal" , "datatype": "
>> http://www.w3.org/2001/XMLSchema#integer"; , "value": "2008" }
>> }
>> ]
>> }
>> }
>>
>> It seems that the authors without affiliation triple aren't in the RDF
>> graph. It is normal this behavior?
>>
>> Best regards.
>> Yusniel Hidalgo.
>>
>> 1519-2019: Aniversario 500 de la Villa de San Cristóbal de La Habana
>>
>> Por La Habana, lo más grande. #Habana500 #UCIxHabana500
>>
>> --
> 
> 
> ---
> Marco Neumann
> KONA
1519-2019: Aniversario 500 de la Villa de San Cristóbal de La Habana
Por La Habana, lo más grande. #Habana500 #UCIxHabana500

Reply via email to