client::DatasetCreator

Header Image
Project:
DatasetCreator : Public Class
Created: 01.09.2025 09:57:38
Modified: 01.09.2025 09:57:38
Project:
Advanced:
The main class for generating GAT-data and associated department data TODO: General cleanup, use separate class for Department-data, this class should only be a utility for generating datasets (GAT, AMUS, Turnover)<br/>
  • Attributes
  • Operations
  • Messages To
  • Messages From
  • Advanced
Attribute Scope Type
id Private String
Notes: TODO: Would be cleaner to move this to an external class? INTERNAL ATTRIBUTES<br/>
period Private String
 
departmentCode Private String
 
serviceArea Private String
 
narledelse Private String
 
numberOfEmployees Private int
 
numberOfMaleEmployees Private int
 
numberOfFemaleEmployees Private int
 
numPositionPercentageLow Private int
 
numPositionPercentageMedium Private int
 
numPositionPercentageHigh Private int
 
age18_39 Private int
 
age40_49 Private int
 
age50_59 Private int
 
age60_75 Private int
 
Operation
Public
main (args: String[], ) : void
Details:
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createGatDataset (gatList: List<GatEntry>, gat_department_data_file: String, closeManagementPath: String, departmentAndServiceAreaPath: String, outputFilePath: String, hashMap: Map<String, String>, maskSmallDepartments: boolean, protectDepartmentCode: boolean, ) : void
Details:
Notes: Creates a dataset consisting of GAT data and department data as a CSV file<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createNightshiftDepartmentActualPeriodicDataset (inputFilePath: String, gatList: List<GatEntry>, outputFilePath: String, hashMap: Map<String, String>, ) : void
Details:
Notes: Overview of departments with nightshifts, daily resolution, actual nightshift hours<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createNightshiftDepartmentsDataset (inputFilePath: String, gatList: List<GatEntry>, outputFilePath: String, hashMap: Map<String, String>, ) : void
Details:
Notes: Overview of departments having nightshifts, nightshifts summarised<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createAMUS2022Dataset (amus2022File: String, departmentNameToCodeMappingFile: String, amus2022_gatList: List<GatEntry>, amus_2022_dataset: String, hashMap: Map<String, String>, ) : void
Details:
Notes: Generates a AMUS 2022 dataset as a CSV file.<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createAMUS2023AggregatedDataset (amus2023File: String, gatList: List<GatEntry>, amus_2023_dataset: String, hashMap: Map<String, String>, ) : void
Details:
Notes: Generates an aggregated AMUS 2023 dataset as a CSV file.<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createAggregatedEksternTurnoverDataset (turnoverFile: String, turnoverDataset: String, gat_department_data_file: String, gatList: List<GatEntry>, hashMap: Map<String, String>, maskSmallDepartments: boolean, protectedDepartmentCode: boolean, percentageFormat: boolean, ) : void
Details:
Notes: External turnover only, average yearly turnover per department<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createEksternTurnoverDataset (turnoverFile: String, turnoverDataset: String, gatList: List<GatEntry>, hashMap: Map<String, String>, protectedDepartmentCode: boolean, percentageFormat: boolean, ) : void
Details:
Notes: External turnover only, turnover percentage per month per department<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createTotalTurnoverDataset (turnoverFile: String, turnoverDataset: String, gatList: List<GatEntry>, hashMap: Map<String, String>, protectedDepartmentCode: boolean, percentageFormat: boolean, ) : void
Details:
Notes: Total (internal and external) turnover, average yearly turnover percentage per department<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
mapGATDepartmentAndServiceArea (pathToAvdelingOgTjenesteomrCSV: String, gatList: List<GatEntry>, ) : Map<String, String>
Details:
Notes: Create a mapping between departments in gat and their corresponding service area<br/>@return<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createDepartmentDataMapping (gat_department_data: String, ) : Map<String, Department>
Details:
Notes: Utility method that creates a mapping between an ID (period + department) and a Department object instance, used for mapping department data to a GAT entry.<br/>@return a List of maps establishing a mapping between ID and Department object instances.<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Private
createFolder (parentPath: String, folderName: String, ) : void
Details:
Notes: Convenience method for creating new folders for new versions of datasets<br/>
[ Is static True. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
toString () : String
Details:
Notes: toString() method that returns a String for printing Department data to a CSV, optionally replacing the department ID with a hashcode<br/>@param gatDeps<br/>@return<br/>
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setId (id: String, ) : void
Details:
Notes: SETTERS<br/>
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setPeriod (period: String, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setDepartmentCode (departmentCode: String, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setServiceArea (serviceArea: String, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setNarledelse (narledelse: String, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
compareTo (comparestu: DatasetCreator, ) : int
Details:
Notes: overriding the compareTo method of Comparable class<br/>
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setNumberOfEmployees (numEmployees: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setNumberOfMaleEmployees (numMaleEmployees: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setNumberOfFemaleEmployees (numFemaleEmployees: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setNumPositionPercentageLow (numPositionPercentageLow: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setNumPositionPercentageMedium (numPositionPercentageMedium: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setNumPositionPercentageHigh (numPositionPercentageHigh: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setAge18_39 (age18_39: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setAge40_49 (age40_49: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setAge50_59 (age50_59: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
setAge60_75 (age60_75: int, ) : void
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getId () : String
Details:
Notes: GETTERS<br/>
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getPeriod () : String
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getDepartmentCode () : String
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getServiceArea () : String
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getNarledelse () : String
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getNumberOfEmployees () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getNumberOfMaleEmployees () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getNumberOfFemaleEmployees () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getNumPositionPercentageLow () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getNumPositionPercentageMedium () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getNumPositionPercentageHigh () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getAge18_39 () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getAge40_49 () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getAge50_59 () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Public
getAge60_75 () : int
Details:
[ Is static False. Is abstract False. Is return array False. Is query False. Is synchronized False. ]
Element Message
GatParser parseGatCSV(String)
Details:
Type: Sequence Synchronous Call
Parses a source CSV exported from the GAT system into GATEntry objects. The source CSV contains absence data and HR data (department demographics).
GatParser parseGatCSV(String)
Details:
Type: Sequence Synchronous Call
Parses a source CSV exported from the GAT system into GATEntry objects. The source CSV contains absence data and HR data (department demographics).
DatasetCreator mapGATDepartmentAndServiceArea(String, List)
Details:
Type: Sequence Synchronous Call
Create a mapping between departments in GAT and their corresponding service area.
GatParser getGATDepartments(List)
Details:
Type: Sequence Synchronous Call
Retrieves a list of department codes from a list of GatEntry objects
Amus2023Parser parseAmus2023CSV(String)
Details:
Type: Sequence Synchronous Call
Parses a CSV file and creates a List of Amus2023Entry objects.
Amus2022Parser parseAmus2022CSV(String, String, List)
Details:
Type: Sequence Synchronous Call
Parses a CSV containing scores from AMUS 2022, maps the department names in the AMUS 2022 with department codes, filters on GAT departments only and returns a list of AMUS2022Entry objects with bucketed scores from the AMUS 2022 survey.
GatParser parseGatCSV(String)
Details:
Type: Sequence Synchronous Call
Parses a source CSV exported from the GAT system into GATEntry objects. The source CSV contains absence data and HR data (department demographics).
TurnoverParser parseCSVExternalTurnover(String)
Details:
Type: Sequence Synchronous Call
Parses a source CSV extracted from the turnover reporting in the HR system and creates a list of ExternalTurnoverEntry objects.
ManagementChecker checkManagementSaturdayOrSunday(String)
Details:
Type: Sequence Synchronous Call
Returns a list stating whether or not a department has had management present during weekends in a month. Management presence is confirmed if management has reported hours EITHER Saturday OR Sunday.
DatasetCreator createAMUS2023AggregatedDataset(String, List, String, Map)
Details:
Type: Sequence Synchronous Call
Generates an aggregated AMUS 2023 dataset as a CSV file.
GatParser getGATDepartments(List)
Details:
Type: Sequence Synchronous Call
Retrieves a list of department codes from a list of GatEntry objects
Amus2023Parser aggregateAndBucketAmus2023Dataset(List, List)
Details:
Type: Sequence Synchronous Call
Creates averaged scores for each department and distributes them into buckets (1 = 0-2.0, 2 = >= 2-3.5 and 3 = < 3.5 - 5.0)
DeIdentifier deIdentifyIds(List, String)
Details:
Type: Sequence Synchronous Call
Encrypts a list of identifiers and returns a mapping table.
DatasetCreator createEksternTurnoverDataset(String, String, List, Map, boolean, boolean)
Details:
Type: Sequence Synchronous Call
Creates a dataset including external turnover only, turnover percentage per month per department.
DatasetCreator createGatDataset(List, String, String, String, String, Map, boolean, boolean)
Details:
Type: Sequence Synchronous Call
Creates a dataset consisting of GAT data and department data as a CSV file.
GatParser parseGatCSV(String)
Details:
Type: Sequence Synchronous Call
Parses a source CSV exported from the GAT system into GATEntry objects. The source CSV contains absence data and HR data (department demographics).
DeIdentifier deIdentifyIds(List, String)
Details:
Type: Sequence Synchronous Call
Encrypts a list of identifiers and returns a mapping table.
DeIdentifier deIdentifyIds(List, String)
Details:
Type: Sequence Synchronous Call
Encrypts a list of identifiers and returns a mapping table.
DatasetCreator createDepartmentDataMapping(String)
Details:
Type: Sequence Synchronous Call
Utility method that creates a mapping between an ID (period + department) and a Department object instance, used for mapping department data to a GAT entry.
DeIdentifier deIdentifyIds(List, String)
Details:
Type: Sequence Synchronous Call
Encrypts a list of identifiers and returns a mapping table.
DatasetCreator createAMUS2022Dataset(String, String, List, String, Map)
Details:
Type: Sequence Synchronous Call
Generates a AMUS 2022 dataset as a CSV file.
Element Message
DatasetCreator mapGATDepartmentAndServiceArea(String, List)
Details:
Type: Sequence Synchronous Call
Create a mapping between departments in GAT and their corresponding service area.
DatasetCreator createAMUS2023AggregatedDataset(String, List, String, Map)
Details:
Type: Sequence Synchronous Call
Generates an aggregated AMUS 2023 dataset as a CSV file.
End User configureDataset
Details:
Type: Sequence Synchronous Call
The End User selects a menu_option that determines which dataset will be created, whether or not the department code should be encrypted, whether or not small departments (<3) should be masked, and which year the dataset should be created for.
End User configureDataset
Details:
Type: Sequence Synchronous Call
The End User selects a menu_option that determines which dataset will be created, whether or not the department code should be encrypted, whether or not small departments (<3) should be masked, and which year the dataset should be created for.
DatasetCreator createEksternTurnoverDataset(String, String, List, Map, boolean, boolean)
Details:
Type: Sequence Synchronous Call
Creates a dataset including external turnover only, turnover percentage per month per department.
DatasetCreator createGatDataset(List, String, String, String, String, Map, boolean, boolean)
Details:
Type: Sequence Synchronous Call
Creates a dataset consisting of GAT data and department data as a CSV file.
End User configureDataset
Details:
Type: Sequence Synchronous Call
The End User selects a menu_option that determines which dataset will be created, whether or not the department code should be encrypted, whether or not small departments (<3) should be masked, and which year the dataset should be created for.
DatasetCreator createDepartmentDataMapping(String)
Details:
Type: Sequence Synchronous Call
Utility method that creates a mapping between an ID (period + department) and a Department object instance, used for mapping department data to a GAT entry.
End User configureDataset
Details:
Type: Sequence Synchronous Call
The End User selects a menu_option that determines which dataset will be created, whether or not the department code should be encrypted, whether or not small departments (<3) should be masked, the format for turnover (percentage or decimal) and which year the dataset should be created for.
DatasetCreator createAMUS2022Dataset(String, String, List, String, Map)
Details:
Type: Sequence Synchronous Call
Generates a AMUS 2022 dataset as a CSV file.
Property Value
isFinalSpecialization: 0