Beispiel #1
0
    def _handle_record(self, record):
        information_system = self._get_attribute_value(record, 'InformationSystem')

        return jhs.Asiakirjatieto(
            id=record.uuid,
            Kayttorajoitustiedot=self._create_restriction_info(record),
            Sailytysaikatiedot=self._create_retention_info(record),
            AsiakirjaluokkaTeksti=jhs.AsiakirjaluokkaTeksti(self._get_attribute_value(record, 'RecordType')),
            AsiakirjaluokkaTarkenneTeksti=jhs.AsiakirjaluokkaTarkenneTeksti(
                self._get_attribute_value(record, 'TypeSpecifier')
            ),
            TietojarjestelmaNimi=jhs.TietojarjestelmaNimi(information_system) if information_system else None
        )
Beispiel #2
0
 def _handle_function(self, function, phases):
     information_system = self._get_attribute_value(function, 'InformationSystem')
     handling_process_info = jhs.KasittelyprosessiTiedot(
         id=uuid.uuid4(),
         Kayttorajoitustiedot=self._create_restriction_info(function),
         Sailytysaikatiedot=self._create_retention_info(function),
         TietojarjestelmaNimi=jhs.TietojarjestelmaNimi(information_system) if information_system else None,
         Toimenpidetiedot=phases
     )
     return jhs.Luokka(
         id=function.uuid,
         Luokitustunnus=function.get_classification_code(),
         Nimeke=jhs.Nimeke(jhs.NimekeKielella(function.get_name(), kieliKoodi='fi')),
         KasittelyprosessiTiedot=handling_process_info
     )