Esempio n. 1
0
    def updateDocument(self, document):
        u"""updateDocument(IZBlogDocument) -> void
        Copies the model data to the document.""" #$NON-NLS-1$
        # set title in document
        document.setTitle( self.getTitle() )
        tagwords = ZTagwords()
        tagwords.setUrl(IZBlogPubTagwordNamespaces.DEFAULT_TAGWORDS_URI)
        tagwords.setValue( self.getTagwords() )
        document.addTagwords(tagwords )

        # Meta data draft, date, image props
        document.setPubMetaDataList( self.getPubMetaDataList() )
Esempio n. 2
0
 def _createRavenTagwords(self, zdoc, serverEntry):
     # Set any tagwords returned from the pub layer.
     if serverEntry.getTagwords() and len( serverEntry.getTagwords() ) > 0:
         tagspaceUri = getNoneString( serverEntry.getTagspaceUrl() )
         if tagspaceUri and tagspaceUri != IZBlogPubTagwordNamespaces.DEFAULT_TAGWORDS_URI:
             # preserve original content - tagspace as returned by pub layer. E.g LiveJournal
             ztagwords = ZTagwords()
             ztagwords.setUrl(tagspaceUri)
             ztagwords.setValue( u",".join(serverEntry.getTagwords()) ) #$NON-NLS-1$
             zdoc.addTagwords(ztagwords)
         # also add a copy to default tag NS
         ztagwords = ZTagwords()
         ztagwords.setUrl(IZBlogPubTagwordNamespaces.DEFAULT_TAGWORDS_URI)
         ztagwords.setValue( u",".join(serverEntry.getTagwords()) ) #$NON-NLS-1$
         zdoc.addTagwords(ztagwords)
Esempio n. 3
0
    def updateDocument(self, document):
        u"""updateDocument(IZBlogDocument) -> void
        Copies the model data to the document.""" #$NON-NLS-1$
        # set title in document
        document.setTitle(self.getTitle())
        tagwords = ZTagwords()
        tagwords.setUrl(IZBlogPubTagwordNamespaces.DEFAULT_TAGWORDS_URI)
        tagwords.setValue(self.getTagwords())
        document.addTagwords(tagwords)

        # Meta data draft, date, image props
        document.setPubMetaDataList(self.getPubMetaDataList())
 def _createRavenTagwords(self, zdoc, serverEntry):
     # Set any tagwords returned from the pub layer.
     if serverEntry.getTagwords() and len(serverEntry.getTagwords()) > 0:
         tagspaceUri = getNoneString(serverEntry.getTagspaceUrl())
         if tagspaceUri and tagspaceUri != IZBlogPubTagwordNamespaces.DEFAULT_TAGWORDS_URI:
             # preserve original content - tagspace as returned by pub layer. E.g LiveJournal
             ztagwords = ZTagwords()
             ztagwords.setUrl(tagspaceUri)
             ztagwords.setValue(u",".join(
                 serverEntry.getTagwords()))  #$NON-NLS-1$
             zdoc.addTagwords(ztagwords)
         # also add a copy to default tag NS
         ztagwords = ZTagwords()
         ztagwords.setUrl(IZBlogPubTagwordNamespaces.DEFAULT_TAGWORDS_URI)
         ztagwords.setValue(u",".join(
             serverEntry.getTagwords()))  #$NON-NLS-1$
         zdoc.addTagwords(ztagwords)
Esempio n. 5
0
 def _deserializeTagwords(self, tagwordsNode, document):
     tagwords = ZTagwords()
     tagwords.setUrl(tagwordsNode.getAttribute(u"url"))  #$NON-NLS-1$
     tagwords.setValue(getSafeString(tagwordsNode.getText()))
     document.addTagwords(tagwords)
Esempio n. 6
0
 def _deserializeTagwords(self, tagwordsNode, document):
     tagwords = ZTagwords()
     tagwords.setUrl(tagwordsNode.getAttribute(u"url")) #$NON-NLS-1$
     tagwords.setValue(getSafeString(tagwordsNode.getText()))
     document.addTagwords(tagwords)