def set_urn(self,urn):
        """
        Change the CTS URN of the author or adds a new one (if no URN is assigned).
        """
        Type = self.session.get_class(surf.ns.ECRM['E55_Type'])
        Identifier = self.session.get_class(surf.ns.ECRM['E42_Identifier'])
        id_uri = "%s/cts_urn"%str(self.subject)
        try:
            id = Identifier(id_uri)
            id.rdfs_label = Literal(urn)
            id.ecrm_P2_has_type = Type(BASE_URI_TYPES % "CTS_URN")
            id.save()
            return True
        except Exception, e:
            raise e
def set_urn ( self , urn ) : Type = self . session . get_class ( surf . ns . ECRM [ 'E55_Type' ] ) Identifier = self . session . get_class ( surf . ns . ECRM [ 'E42_Identifier' ] ) id_uri = "%s/cts_urn" % str ( self . subject ) try : id = Identifier ( id_uri ) id . rdfs_label = Literal ( urn ) id . ecrm_P2_has_type = Type ( BASE_URI_TYPES % "CTS_URN" ) id . save ( ) return True except Exception , e : raise e
Change the CTS URN of the author or adds a new one (if no URN is assigned).