Distinguish between :Items & :Collections in dir listings webid
authorHenry Story <henry.story@bblfish.net>
Wed, 11 Apr 2012 10:30:35 +0200
branchwebid
changeset 195 8ab372620ee2
parent 194 bd7296be9855
child 196 3053b87b4ff2
Distinguish between :Items & :Collections in dir listings
src/main/scala/Filesystem.scala
--- a/src/main/scala/Filesystem.scala	Tue Apr 10 22:30:49 2012 +0200
+++ b/src/main/scala/Filesystem.scala	Wed Apr 11 10:30:35 2012 +0200
@@ -59,7 +59,8 @@
           val furl = new URL(name,f.getName)
           val item =model.createResource(furl.toString)
           dirRes.addProperty(model.createProperty(sioc+"container_of"),item)
-          item.addProperty(RDF.`type`,model.createResource(sioc+"Item"))
+          if (f.isDirectory) item.addProperty(RDF.`type`,model.createResource(sioc+"Container"))
+          else item.addProperty(RDF.`type`,model.createResource(sioc+"Item"))
         }
         model.success
       } else {