File tree 3 files changed +26
-2
lines changed
java/edu/kit/datamanager/ro_crate/crate
resources/crates/hasPartHierarchy
3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,6 @@ void testReadCrateWithHasPartHierarchy() {
53
53
RoCrateReader reader = new RoCrateReader (new FolderReader ());
54
54
RoCrate crate = reader .readCrate (ReadAndWriteTest .class .getResource ("/crates/hasPartHierarchy" ).getPath ());
55
55
assertEquals (1 , crate .getAllContextualEntities ().size ());
56
- assertEquals (4 , crate .getAllDataEntities ().size ());
56
+ assertEquals (6 , crate .getAllDataEntities ().size ());
57
57
}
58
58
}
Original file line number Diff line number Diff line change
1
+ # hasPart/isPartOf Structure in this crate
2
+
3
+ This documents the hierarchy in this json file for the hasPart property.
4
+ "isPartOf" occurences are handled the inverse way (as if it was a hasPart property the other way around).
5
+
6
+ - ./
7
+ - sub-a.file
8
+ - sub-b.file
9
+ - sub-b-sub-a.file
10
+ - looper.file --> sub-b.file
11
+ - sub-b-sub-b.file (isPartOf)
12
+ - looper-isPartOf.file --> sub-b.file
Original file line number Diff line number Diff line change 42
42
},
43
43
{
44
44
"@id" : " sub-b-sub-a.file" ,
45
- "@type" : " File"
45
+ "@type" : " File" ,
46
+ "hasPart" : {"@id" : " looper.file" }
46
47
},
47
48
{
48
49
"@id" : " sub-b-sub-b.file" ,
49
50
"@type" : " File" ,
50
51
"isPartOf" : { "@id" : " sub-b.file" }
52
+ },
53
+ {
54
+ "@id" : " looper.file" ,
55
+ "@type" : " File" ,
56
+ "hasPart" : {"@id" : " sub-b.file" }
57
+ },
58
+ {
59
+ "@id" : " looper-isPartOf.file" ,
60
+ "@type" : " File" ,
61
+ "hasPart" : {"@id" : " sub-b.file" },
62
+ "isPartOf" : {"@id" : " sub-b.file" }
51
63
}
52
64
]
53
65
}
You can’t perform that action at this time.
0 commit comments