def _import_epublication(self, epub):
        """
        Fill internal property ._POST dictionary with data from EPublication.
        """
        # mrs. Svobodová requires that annotation exported by us have this
        # prefix
        prefixed_annotation = ANNOTATION_PREFIX + epub.anotace

        self._POST["P0501010__a"] = epub.ISBN
        self._POST["P07012001_a"] = epub.nazev
        self._POST["P07032001_e"] = epub.podnazev
        self._POST["P0502010__b"] = epub.vazba
        self._POST["P0504010__d"] = epub.cena
        self._POST["P07042001_h"] = epub.castDil
        self._POST["P07052001_i"] = epub.nazevCasti
        self._POST["P0902210__c"] = epub.nakladatelVydavatel
        self._POST["P0903210__d"] = epub.datumVydani
        self._POST["P0801205__a"] = epub.poradiVydani
        self._POST["P1502IST1_b"] = epub.zpracovatelZaznamu
        self._POST["P0503010__x"] = epub.format
        self._POST["P110185640u"] = epub.url or ""
        self._POST["P0901210__a"] = epub.mistoVydani
        self._POST["P0601010__a"] = epub.ISBNSouboruPublikaci
        self._POST["P1801URL__u"] = epub.internal_url
        self._POST["P1001330__a"] = prefixed_annotation if epub.anotace else ""

        if len(epub.autori) > 3:
            epub.autori[2] = ", ".join(epub.autori[2:])
            epub.autori = epub.autori[:3]

        # check whether the autors have required type (string)
        for author in epub.autori:
            error_msg = "Bad type of author (%s) (str is required)."
            assert isinstance(author, basestring), (error_msg % type(author))

        authors_fields = ("P1301ZAK__b", "P1302ZAK__c", "P1303ZAK__c")
        self._POST.update(dict(zip(authors_fields, epub.autori)))
def _import_epublication ( self , epub ) : prefixed_annotation = ANNOTATION_PREFIX + epub . anotace self . _POST [ "P0501010__a" ] = epub . ISBN self . _POST [ "P07012001_a" ] = epub . nazev self . _POST [ "P07032001_e" ] = epub . podnazev self . _POST [ "P0502010__b" ] = epub . vazba self . _POST [ "P0504010__d" ] = epub . cena self . _POST [ "P07042001_h" ] = epub . castDil self . _POST [ "P07052001_i" ] = epub . nazevCasti self . _POST [ "P0902210__c" ] = epub . nakladatelVydavatel self . _POST [ "P0903210__d" ] = epub . datumVydani self . _POST [ "P0801205__a" ] = epub . poradiVydani self . _POST [ "P1502IST1_b" ] = epub . zpracovatelZaznamu self . _POST [ "P0503010__x" ] = epub . format self . _POST [ "P110185640u" ] = epub . url or "" self . _POST [ "P0901210__a" ] = epub . mistoVydani self . _POST [ "P0601010__a" ] = epub . ISBNSouboruPublikaci self . _POST [ "P1801URL__u" ] = epub . internal_url self . _POST [ "P1001330__a" ] = prefixed_annotation if epub . anotace else "" if len ( epub . autori ) > 3 : epub . autori [ 2 ] = ", " . join ( epub . autori [ 2 : ] ) epub . autori = epub . autori [ : 3 ] for author in epub . autori : error_msg = "Bad type of author (%s) (str is required)." assert isinstance ( author , basestring ) , ( error_msg % type ( author ) ) authors_fields = ( "P1301ZAK__b" , "P1302ZAK__c" , "P1303ZAK__c" ) self . _POST . update ( dict ( zip ( authors_fields , epub . autori ) ) )
Fill internal property ._POST dictionary with data from EPublication.