def _createRavenDocument(self, zblog, serverEntry): # Create and return IZDocument # main document struct. zdoc = ZBlogDocument() # FIXME (PJ) server api needs separate dt fields for creation-time vs published time vs updated-time. schemaDt = ZSchemaDateTime( serverEntry.getUtcDateTime() ) zdoc.setCreationTime( schemaDt ) zdoc.setLastModifiedTime( schemaDt ) # FIXME (PJ) Test test for entries with out a title (else autogen titles) zdoc.setTitle( serverEntry.getTitle() ) # tagwords, if any. self._createRavenTagwords(zdoc, serverEntry) # blog info (including pubinfo object) zbloginfo = self._createRavenBlogInfo(zblog, serverEntry) # add blog info to doc zdoc.addBlogInfo(zbloginfo) # server side content content = serverEntry.getContent() # convert to Raven IZDocumentContent xhtml model zdocContent = self._createRavenContent(content) # add content to doc zdoc.setContent(zdocContent) # TODO: zdoc.setTagwords() and zdoc.add/setTrackback return zdoc
def _createRavenDocument(self, zblog, serverEntry): # Create and return IZDocument # main document struct. zdoc = ZBlogDocument() # FIXME (PJ) server api needs separate dt fields for creation-time vs published time vs updated-time. schemaDt = ZSchemaDateTime(serverEntry.getUtcDateTime()) zdoc.setCreationTime(schemaDt) zdoc.setLastModifiedTime(schemaDt) # FIXME (PJ) Test test for entries with out a title (else autogen titles) zdoc.setTitle(serverEntry.getTitle()) # tagwords, if any. self._createRavenTagwords(zdoc, serverEntry) # blog info (including pubinfo object) zbloginfo = self._createRavenBlogInfo(zblog, serverEntry) # add blog info to doc zdoc.addBlogInfo(zbloginfo) # server side content content = serverEntry.getContent() # convert to Raven IZDocumentContent xhtml model zdocContent = self._createRavenContent(content) # add content to doc zdoc.setContent(zdocContent) # TODO: zdoc.setTagwords() and zdoc.add/setTrackback return zdoc