Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/main/java/net/datafaker/providers/base/Aviation.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,29 @@ public String gate() {
public String airline() {
return resolve("aviation.airline");
}

/**
* Returns an ULD type.
* ULD stands for Unit Load Device (pallet or container).
* Sources: <a href="https://en.wikipedia.org/wiki/Unit_load_device">Unit load device</a>
* and <a href="https://www.boeing.com/resources/boeingdotcom/company/about_bca/pdf/CargoPalletsContainers.pdf">Pallets and containers</a>
*
* @return A randomly selected ULD type.
*/
public String uldType() {
return resolve("aviation.uld_type");
}

/**
* Returns an ULD IATA code(prefix).
* ULD stands for Unit Load Device (pallet or container).
* Sources: <a href="https://en.wikipedia.org/wiki/Unit_load_device">Unit load device</a>
* and <a href="https://www.boeing.com/resources/boeingdotcom/company/about_bca/pdf/CargoPalletsContainers.pdf">Pallets and containers</a>
*
* @return A randomly selected ULD type.
*/
public String uldCode() {
return resolve("aviation.uld_code");
}
}

67 changes: 67 additions & 0 deletions src/main/resources/en/aviation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13377,3 +13377,70 @@ en:
- "BAGGAGE CLAIM DELAYED"
- "BAGS DELIVERED"
- "UNKNOWN"
uld_type:
- "LD-1"
- "LD-2"
- "LD-3"
- "LD-3 Reefer"
- "LD-4"
- "LD-6"
- "LD-7"
- "LD-8"
- "LD-9"
- "LD-9 Reefer"
- "LD-11"
- "LD-26"
- "LD-29"
- "LD-39"
- "P6P"
- "PLA"
- "M-1"
- "M-1H"
- "M-2"
- "M-6"
uld_code:
- "AAA"
- "AAD"
- "AAF"
- "AAP"
- "AAU"
- "AAY"
- "AAZ"
- "AGA"
- "AKC"
- "AKE"
- "AKH"
- "AKN"
- "ALB"
- "ALD"
- "ALF"
- "ALP"
- "AMA"
- "AMD"
- "AMJ"
- "AMU"
- "AVY"
- "AWC"
- "AYY"
- "AYX"
- "DPE"
- "DPN"
- "DQF"
- "FLA"
- "FQA"
- "HMA"
- "KMA"
- "P1P"
- "PAD"
- "PGA"
- "PLA"
- "PMC"
- "QKE"
- "RAU"
- "RKN"
- "RWB"
- "SAA"
- "SAX"
- "VRA"
- "XAW"
- "XKC"
4 changes: 3 additions & 1 deletion src/test/java/net/datafaker/providers/base/AviationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ protected Collection<TestSpec> providerListTest() {
TestSpec.of(aviation::specialTypeDesignator, "aviation.aircraft_type_special_designator"),
TestSpec.of(aviation::engineType, "aviation.engine_type"),
TestSpec.of(aviation::flightStatus, "aviation.flight_status"),
TestSpec.of(aviation::airline, "aviation.airline"));
TestSpec.of(aviation::airline, "aviation.airline"),
TestSpec.of(aviation::uldType, "aviation.uld_type"),
TestSpec.of(aviation::uldCode, "aviation.uld_code"));
}
}
Loading