diff --git a/src/test/resources/com/apicatalog/jsonld/test/issue172-frame.json b/src/test/resources/com/apicatalog/jsonld/test/issue172-frame.json new file mode 100644 index 00000000..1e0394d1 --- /dev/null +++ b/src/test/resources/com/apicatalog/jsonld/test/issue172-frame.json @@ -0,0 +1,31 @@ +{ + "@context": { + "@base": "http://n2t.net/ark:/39333/ncg/place/", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "ncv": "http://n2t.net/ark:/39333/ncg/vocab#", + "nct": "http://n2t.net/ark:/39333/ncg/type#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "records": { + "@container": "@id", + "@type": "@id", + "@id": "rdfs:member" + }, + "county": { + "@container": "@set", + "@type": "@id", + "@id": "ncv:county" + } + }, + "@type": "rdf:Bag", + "records": [ + { + "@id": {}, + "county": { + "@embed": "@always", + "@explicit": true, + "skos:label": {} + } + } + ] +} \ No newline at end of file diff --git a/src/test/resources/com/apicatalog/jsonld/test/issue172-in.json b/src/test/resources/com/apicatalog/jsonld/test/issue172-in.json new file mode 100644 index 00000000..0e800800 --- /dev/null +++ b/src/test/resources/com/apicatalog/jsonld/test/issue172-in.json @@ -0,0 +1,47 @@ +{ + "@graph": [ + { + "@id": "http://n2t.net/ark:/39333/ncg/dataset", + "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag", + "member": [ + "http://n2t.net/ark:/39333/ncg/place/NCG11248", + "http://n2t.net/ark:/39333/ncg/place/NCG07554", + "http://n2t.net/ark:/39333/ncg/place/NCG03755" + ] + }, + { + "@id": "http://n2t.net/ark:/39333/ncg/place/NCG03755", + "@type": "http://n2t.net/ark:/39333/ncg/type#Mountain", + "county": "http://n2t.net/ark:/39333/ncg/place/NCG11248", + "label": "Crawford Mountain" + }, + { + "@id": "http://n2t.net/ark:/39333/ncg/place/NCG07554", + "@type": "http://n2t.net/ark:/39333/ncg/type#Community", + "county": "http://n2t.net/ark:/39333/ncg/place/NCG11248", + "label": "Ichley" + }, + { + "@id": "http://n2t.net/ark:/39333/ncg/place/NCG11248", + "@type": "http://n2t.net/ark:/39333/ncg/type#County", + "label": "Orange County", + "description": "Not to be confused with Orange County, CA" + } + ], + "@context": { + "label": { + "@id": "http://www.w3.org/2004/02/skos/core#label" + }, + "description": { + "@id": "http://www.w3.org/2004/02/skos/core#note" + }, + "county": { + "@id": "http://n2t.net/ark:/39333/ncg/vocab#county", + "@type": "@id" + }, + "member": { + "@id": "http://www.w3.org/2000/01/rdf-schema#member", + "@type": "@id" + } + } +} \ No newline at end of file diff --git a/src/test/resources/com/apicatalog/jsonld/test/issue172-out.json b/src/test/resources/com/apicatalog/jsonld/test/issue172-out.json new file mode 100644 index 00000000..565a330b --- /dev/null +++ b/src/test/resources/com/apicatalog/jsonld/test/issue172-out.json @@ -0,0 +1,52 @@ +{ + "@context": { + "@base": "http://n2t.net/ark:/39333/ncg/place/", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "ncv": "http://n2t.net/ark:/39333/ncg/vocab#", + "nct": "http://n2t.net/ark:/39333/ncg/type#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "records": { + "@container": "@id", + "@type": "@id", + "@id": "rdfs:member" + }, + "county": { + "@container": "@set", + "@type": "@id", + "@id": "ncv:county" + } + }, + "@id": "../dataset", + "@type": "rdf:Bag", + "records": { + "NCG11248": { + "@type": "nct:County", + "county": [], + "skos:label": "Orange County", + "skos:note": "Not to be confused with Orange County, CA" + }, + "NCG07554": { + "@type": "nct:Community", + "county": [ + { + "@id": "NCG11248", + "@type": "nct:County", + "skos:label": "Orange County" + } + ], + "skos:label": "Ichley" + }, + "NCG03755": { + "@type": "nct:Mountain", + "county": [ + { + "@id": "NCG11248", + "@type": "nct:County", + "skos:label": "Orange County" + } + ], + "skos:label": "Crawford Mountain" + } + } +} \ No newline at end of file