Exemple #1
0
 def create_new_collection(self, title):
     # Create a new Collection
     now = str(datetime.now())[0:19]
     vcol = VirtualResource(self.app)
     vcol.set_id()
     header = []
     header.append((RDF.type, PIMO['Collection']))
     header.append((NIE['title'], Literal(title)))
     header.append((NAO['created'], Literal(str(now))))
     header.append((NAO['lastModified'], Literal(str(now))))
     vcol.set_metadata(header)
     self.add_resource(vcol)
     icon = self.app.gui.icons.get_icon_by_name('Collection-add.svg', 128, 128)
     self.app.gui.actions.notify('%s' % title, "A new collection was added to Vazaar</big>", icon)