Nó JSON-LD em branco para objeto aninhado no Apache Jena
Eu tenho o seguinte exemplo de documento Turtle:
@prefix dct: <http://purl.org/dc/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix example: <http://example.com/vocabulary/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
<http://example.com/datasets/1>
a dcat:Distribution ;
example:props [ example:prop1 "hello" ;
example:prop2 "1"
] ;
dct:description "test data" .
Eu o convertei em JSON-LD com o Apache Jena (RDFDataMgr com JSONLD_COMPACT_PRETTY) em JSON-LD:
{
"@context": {
"dct": "http://purl.org/dc/terms/",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"dcat": "http://www.w3.org/ns/dcat#",
"example": "http://example.com/vocabulary/"
},
"@graph": [
{
"@id": "_:b0",
"example:prop1": "hello",
"example:prop2": "1"
},
{
"@id": "http://example.com/datasets/1",
"@type": "dcat:Distribution",
"example:props": {
"@id": "_:b0"
},
"dct:description": "test data"
}
]
}
Mas, na verdade, eu quero ter um objeto aninhado em vez de um nó em branco:
{
"@context": {
"dct": "http://purl.org/dc/terms/",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"dcat": "http://www.w3.org/ns/dcat#",
"example": "http://example.com/vocabulary/"
},
"@graph": [
{
"@id": "http://example.com/datasets/1",
"@type": "dcat:Distribution",
"example:props": {
"example:prop1": "hello",
"example:prop2": "1"
},
"dct:description": "test data"
}
]
}
Isso é possível com o Apache Jena? E é semanticamente equivalente?