[ 
https://issues.apache.org/jira/browse/JENA-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550780#comment-16550780
 ] 

Vladimir Alexiev edited comment on JENA-1577 at 7/20/18 1:53 PM:
-----------------------------------------------------------------

Maybe it's my mistake. The above errors are observed when the file looks like 
this:
{noformat}
{
  "@base": "http://attack.mitre.org/enterprise/";,
  "@context": 
"https://gist.githubusercontent.com/VladimirAlexiev/7b26962f9000a22fc25e8d180c716067/raw/7b5297fd0f4640f64609bbb3e132f56a75759082/stix.jsonld";,
  "objects": [
       ...
  ],
  "type": "bundle",
  "id": "bundle--0d2fd99f-8b80-432d-8a2f-d54d766293c3",
  "spec_version": "2.0"
}
{noformat}

When I changed the file like this, everything is fine:
{noformat}
{
  "@context": [
    
"https://gist.githubusercontent.com/VladimirAlexiev/7b26962f9000a22fc25e8d180c716067/raw/7b5297fd0f4640f64609bbb3e132f56a75759082/stix.jsonld";,
    {"@base": "http://attack.mitre.org/enterprise/"}
  ],
  "objects": [
       ...
  ],
  "type": "bundle",
  "id": "bundle--0d2fd99f-8b80-432d-8a2f-d54d766293c3",
  "spec_version": "2.0"
}
{noformat}



was (Author: vladimir.alexiev):
Maybe it's my mistake. The above errors are observed when the file looks like 
this:
{noformat}
{noformat}

When I changed the file like this, everything is fine:
{noformat}
{
  "@context": [
    
"https://gist.githubusercontent.com/VladimirAlexiev/7b26962f9000a22fc25e8d180c716067/raw/7b5297fd0f4640f64609bbb3e132f56a75759082/stix.jsonld";,
    {"@base": "http://attack.mitre.org/enterprise/"}
  ],
    "objects": [


> RIOT skips part of jsonld file (regression) and ignores @base
> -------------------------------------------------------------
>
>                 Key: JENA-1577
>                 URL: https://issues.apache.org/jira/browse/JENA-1577
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: RIOT
>            Reporter: Vladimir Alexiev
>            Priority: Critical
>
> 1. RIOT ignores "base":
> {noformat}
> curl -s 
> https://gist.githubusercontent.com/VladimirAlexiev/7b26962f9000a22fc25e8d180c716067/raw/7923f25be672294433dc95b48523573429781ecb/eg.jsonld|riot
>  -syntax jsonld -formatted ttl
> ...
> <http://base/attack-pattern--00d0b012-8a03-410e-95de-5826bf542de6> 
>   a stix:attack-pattern ;
> ...
> {noformat}
> However, that jsonld includes base:
> {noformat}
>  "@base": "http://attack.mitre.org/enterprise/";,
> {noformat}
> and the jsonld playground http://tinyurl.com/yd25vasq does take it into 
> account: in n3 output see URLs like
> {noformat}
> <http://attack.mitre.org/enterprise/attack-pattern--00d0b012-8a03-410e-95de-5826bf542de6>
> {noformat}
> 2. Inexplicably, if I take the same jsonld content from a file, I get only 
> triples rooted at blank nodes!
> This is a regression, it was not present in an older RIOT (I from a year ago, 
> something like 3.1)
> {noformat}
> curl -s 
> https://gist.githubusercontent.com/VladimirAlexiev/7b26962f9000a22fc25e8d180c716067/raw/7923f25be672294433dc95b48523573429781ecb/eg.jsonld>eg.jsonld
> riot -syntax jsonld -formatted ttl eg.jsonld
> ...
> [ stix:external_id  "T1066" ;
>   stix:source_name  "mitre-attack" ;
>   stix:url          <https://attack.mitre.org/wiki/Technique/T1066>
> ] .
> {noformat}
> If I just add an input redirection to the command line (<), I see a lot more 
> triples. 
> {noformat}
> riot -syntax jsonld -formatted ttl < eg.jsonld
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to