Commit fab94fd8 authored by Fabien Amarger's avatar Fabien Amarger
Browse files

[rdf] Do not export description if not defined and add content format

parent a0e72ec73da0
......@@ -48,7 +48,8 @@ class BlogRDFAdapter(EntityRDFAdapter):
uri = URIRef(self.uri)
yield (uri, RDF.type, SIOCT.Weblog)
yield (uri, DCTERMS.title, Literal(self.entity.dc_title()))
yield (uri, DCTERMS.description, Literal(self.entity.description))
if self.entity.description:
yield (uri, DCTERMS.description, Literal(self.entity.description))
yield (uri, SIOC.num_items, Literal(len(self.entity.reverse_entry_of)))
yield (uri, SIOC.feed, URIRef(self.entity.cw_adapt_to('IFeed').rss_feed_url()))
......@@ -74,6 +75,7 @@ class BlogEntryRDFAdapter(EntityRDFAdapter):
yield (uri,, Literal(self.entity.creation_date))
yield (uri, DCTERMS.modified, Literal(self.entity.modification_date))
yield (uri, SIOC.content, Literal(self.entity.content))
yield (uri, DCTERMS['format'], Literal(self.entity.content_format))
if self.entity.entry_of:
yield (uri, SIOC.container, URIRef(self.entity.entry_of[0].cwuri))
if self.entity.creator:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment