You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Chris Tomlinson <ch...@gmail.com> on 2020/07/22 21:26:49 UTC
RIOTous questions
Hello,
Well the first question is really a trig question. When is the new style BASE versus the old style @base to be preferred in trig files?
The RIOT question is in Jena 3.16.0 and earlier. I try:
riot --count C1.trig
and get the result:
C1.trig : Quads = 43
which is correct. But when I try:
riot --out=Turtle C1.trig > tmp.ttl
all I get is the prefix map:
> @base <bdg:C1> .
> @prefix : <http://purl.bdrc.io/ontology/core/> .
> @prefix adm: <http://purl.bdrc.io/ontology/admin/> .
> @prefix bda: <http://purl.bdrc.io/admindata/> .
> @prefix bdg: <http://purl.bdrc.io/graph/> .
> @prefix bdr: <http://purl.bdrc.io/resource/> .
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
> @prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
The result I get is not dependent on the particular trig file. I see the same regardless as long as it is valid trig.
The result doesn’t appear to depend on whether I use riot or trig commands, with —out=Turtle or —out=TTL
The trig file, with the above prefixes, is:
> bdg:C1 {
> bda:C1 a adm:AdminData ;
> :isRoot true ;
> adm:adminAbout bdr:C1 ;
> adm:facetIndex 10 ;
> adm:gitPath "1a/C1.trig" ;
> adm:gitRepo bda:GR0001 ;
> adm:graphId bdg:C1 ;
> adm:logEntry bda:LG3EE3DD277F0A15A6 , bda:LGE00E23B3D66F3F4C ;
> adm:metadataLegal bda:LD_BDRC_CC0 ;
> adm:status bda:StatusReleased .
>
> bda:LG3EE3DD277F0A15A6
> a adm:LogEntry ;
> adm:logDate "2016-04-07T14:21:14.309Z"^^xsd:dateTime ;
> adm:logWho bdr:U00004 .
>
> bda:LGE00E23B3D66F3F4C
> a adm:LogEntry ;
> adm:logDate "2010-03-18T14:58:49.484Z"^^xsd:dateTime ;
> adm:logWho bdr:U00019 .
>
> bdr:C1 a :Corporation ;
> rdfs:comment "yab gzhis family" ;
> skos:prefLabel "glang mdun (yab gzhis)"@bo-x-ewts ;
> :corporationHasMember bdr:CM2B0540E276FB5DC4 , bdr:CM8166D8F547C8220F , bdr:CMAD95D8DC86690FCB , bdr:CMB71EF278AA02337E , bdr:CMDCD0949DAFDA27BD , bdr:CME4512919AE9C9D8E ;
> :corporationRegion bdr:G1390 ;
> :isRoot true ;
> :note bdr:NT7DD9D48BDB5A3582 .
>
> bdr:CM2B0540E276FB5DC4
> a :CorporationMemberUnknown ;
> :corporationMember bdr:P7067 .
>
> bdr:CM8166D8F547C8220F
> a :CorporationMemberBlood ;
> :corporationMember bdr:P6682 .
>
> bdr:CMAD95D8DC86690FCB
> a :CorporationMemberBlood ;
> :corporationMember bdr:P197 .
>
> bdr:CMB71EF278AA02337E
> a :CorporationMemberBlood ;
> :corporationMember bdr:P6681 .
>
> bdr:CMDCD0949DAFDA27BD
> a :CorporationMemberNotSpecified ;
> :corporationMember bdr:P2LS149 .
>
> bdr:CME4512919AE9C9D8E
> a :CorporationMemberBlood ;
> :corporationMember bdr:P6680 .
>
> bdr:NT7DD9D48BDB5A3582
> a :Note ;
> :noteText "This is the family of the 13th Dalai Lama. ..."@en .
> }
I’m sure I’m doing something dum b here. I’m prompted to ask since the little tool I’ve been using (rdf2rdf-1.0.1-2.3.1.jar and rdf2rdf-1.0.2-2.3.1.jar) doesn’t like new style BASE.
Thanks,
Chris
Re: RIOTous questions
Posted by Andy Seaborne <an...@apache.org>.
On 22/07/2020 22:26, Chris Tomlinson wrote:
> Hello,
>
> Well the first question is really a trig question.
Trick question?
> When is the new style BASE versus the old style @base to be preferred in trig files?
IMO Always.
To the parsers it makes no difference.
I set:
RIOT.getContext().set(RIOT.symTurtleDirectiveStyle, "sparql");
in projects to get it in output.
>
> The RIOT question is in Jena 3.16.0 and earlier. I try:
>
> riot --count C1.trig
>
> and get the result:
>
> C1.trig : Quads = 43
>
> which is correct. But when I try:
>
> riot --out=Turtle C1.trig > tmp.ttl
Different issue to BASE vs @base.
Because Turtle can't express named graphs so all you get is the default
graph and the default graph is empty.
Try --out=trig
Try --out=TTL on:
PREFIX : <http://example/>
:s :p :o .
:g1 { :s1 :p1 :o1 }
Andy
PS "riot" is included ... in Fuseki jars!
java -cp apache-jena-fuseki-3.16.0/fuseki-server.jar riotcmd.riot -h
>
> all I get is the prefix map:
>
>> @base <bdg:C1> .
>> @prefix : <http://purl.bdrc.io/ontology/core/> .
>> @prefix adm: <http://purl.bdrc.io/ontology/admin/> .
>> @prefix bda: <http://purl.bdrc.io/admindata/> .
>> @prefix bdg: <http://purl.bdrc.io/graph/> .
>> @prefix bdr: <http://purl.bdrc.io/resource/> .
>> @prefix owl: <http://www.w3.org/2002/07/owl#> .
>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
>> @prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
>> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
>
> The result I get is not dependent on the particular trig file. I see the same regardless as long as it is valid trig.
>
> The result doesn’t appear to depend on whether I use riot or trig commands, with —out=Turtle or —out=TTL
>
> The trig file, with the above prefixes, is:
>
>> bdg:C1 {
>> bda:C1 a adm:AdminData ;
>> :isRoot true ;
>> adm:adminAbout bdr:C1 ;
>> adm:facetIndex 10 ;
>> adm:gitPath "1a/C1.trig" ;
>> adm:gitRepo bda:GR0001 ;
>> adm:graphId bdg:C1 ;
>> adm:logEntry bda:LG3EE3DD277F0A15A6 , bda:LGE00E23B3D66F3F4C ;
>> adm:metadataLegal bda:LD_BDRC_CC0 ;
>> adm:status bda:StatusReleased .
>>
>> bda:LG3EE3DD277F0A15A6
>> a adm:LogEntry ;
>> adm:logDate "2016-04-07T14:21:14.309Z"^^xsd:dateTime ;
>> adm:logWho bdr:U00004 .
>>
>> bda:LGE00E23B3D66F3F4C
>> a adm:LogEntry ;
>> adm:logDate "2010-03-18T14:58:49.484Z"^^xsd:dateTime ;
>> adm:logWho bdr:U00019 .
>>
>> bdr:C1 a :Corporation ;
>> rdfs:comment "yab gzhis family" ;
>> skos:prefLabel "glang mdun (yab gzhis)"@bo-x-ewts ;
>> :corporationHasMember bdr:CM2B0540E276FB5DC4 , bdr:CM8166D8F547C8220F , bdr:CMAD95D8DC86690FCB , bdr:CMB71EF278AA02337E , bdr:CMDCD0949DAFDA27BD , bdr:CME4512919AE9C9D8E ;
>> :corporationRegion bdr:G1390 ;
>> :isRoot true ;
>> :note bdr:NT7DD9D48BDB5A3582 .
>>
>> bdr:CM2B0540E276FB5DC4
>> a :CorporationMemberUnknown ;
>> :corporationMember bdr:P7067 .
>>
>> bdr:CM8166D8F547C8220F
>> a :CorporationMemberBlood ;
>> :corporationMember bdr:P6682 .
>>
>> bdr:CMAD95D8DC86690FCB
>> a :CorporationMemberBlood ;
>> :corporationMember bdr:P197 .
>>
>> bdr:CMB71EF278AA02337E
>> a :CorporationMemberBlood ;
>> :corporationMember bdr:P6681 .
>>
>> bdr:CMDCD0949DAFDA27BD
>> a :CorporationMemberNotSpecified ;
>> :corporationMember bdr:P2LS149 .
>>
>> bdr:CME4512919AE9C9D8E
>> a :CorporationMemberBlood ;
>> :corporationMember bdr:P6680 .
>>
>> bdr:NT7DD9D48BDB5A3582
>> a :Note ;
>> :noteText "This is the family of the 13th Dalai Lama. ..."@en .
>> }
>
>
> I’m sure I’m doing something dum b here. I’m prompted to ask since the little tool I’ve been using (rdf2rdf-1.0.1-2.3.1.jar and rdf2rdf-1.0.2-2.3.1.jar) doesn’t like new style BASE.
>
> Thanks,
> Chris
>
>
>