@@ -361,6 +361,37 @@ def check_prov(self, nested=False, single_tool=False, directory=False):
361
361
directories = set (g .subjects (RDF .type , RO .Folder ))
362
362
self .assertTrue (directories )
363
363
364
+ for d in directories :
365
+ self .assertTrue ((d ,RDF .type ,PROV .Dictionary ) in g )
366
+ self .assertTrue ((d ,RDF .type ,PROV .Collection ) in g )
367
+ self .assertTrue ((d ,RDF .type ,PROV .Entity ) in g )
368
+
369
+ files = set ()
370
+ for entry in g .objects (d , PROV .hadDictionaryMember ):
371
+ self .assertTrue ((entry ,RDF .type ,PROV .KeyEntityPair ) in g )
372
+ # We don't check what that filename is here
373
+ self .assertTrue (set (g .objects (entry ,PROV .pairKey )))
374
+
375
+ # RO:Folder aspect
376
+ self .assertTrue (set (g .objects (entry ,RO .entryName )))
377
+ self .assertTrue ((d ,ORE .aggregates ,entry ) in g )
378
+ self .assertTrue ((entry ,RDF .type ,RO .FolderEntry ) in g )
379
+ self .assertTrue ((entry ,RDF .type ,ORE .Proxy ) in g )
380
+ self .assertTrue ((entry ,ORE .proxyIn ,d ) in g )
381
+ self .assertTrue ((entry ,ORE .proxyIn ,d ) in g )
382
+
383
+ # Which file?
384
+ entities = set (g .objects (entry , PROV .pairEntity ))
385
+ self .assertTrue (entities )
386
+ f = entities .pop ()
387
+ files .add (f )
388
+ self .assertTrue ((entry ,ORE .proxyFor ,f ) in g )
389
+ self .assertTrue ((f ,RDF .type ,PROV .Entity ) in g )
390
+
391
+ if not files :
392
+ self .assertTrue ((d ,RDF .type ,PROV .EmptyCollection ) in g )
393
+ self .assertTrue ((d ,RDF .type ,PROV .EmptyDictionary ) in g )
394
+
364
395
365
396
class TestConvertPath (unittest .TestCase ):
366
397
def test_nt_to_posix (self ):
0 commit comments