Skip to content

Commit 46c5170

Browse files
authored
Aviation provider: added #uldType and #uldCode (ULD - pallets and containers). (#1795)
1 parent a6b142c commit 46c5170

3 files changed

Lines changed: 94 additions & 1 deletion

File tree

src/main/java/net/datafaker/providers/base/Aviation.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,29 @@ public String gate() {
191191
public String airline() {
192192
return resolve("aviation.airline");
193193
}
194+
195+
/**
196+
* Returns an ULD type.
197+
* ULD stands for Unit Load Device (pallet or container).
198+
* Sources: <a href="https://en.wikipedia.org/wiki/Unit_load_device">Unit load device</a>
199+
* and <a href="https://www.boeing.com/resources/boeingdotcom/company/about_bca/pdf/CargoPalletsContainers.pdf">Pallets and containers</a>
200+
*
201+
* @return A randomly selected ULD type.
202+
*/
203+
public String uldType() {
204+
return resolve("aviation.uld_type");
205+
}
206+
207+
/**
208+
* Returns an ULD IATA code(prefix).
209+
* ULD stands for Unit Load Device (pallet or container).
210+
* Sources: <a href="https://en.wikipedia.org/wiki/Unit_load_device">Unit load device</a>
211+
* and <a href="https://www.boeing.com/resources/boeingdotcom/company/about_bca/pdf/CargoPalletsContainers.pdf">Pallets and containers</a>
212+
*
213+
* @return A randomly selected ULD type.
214+
*/
215+
public String uldCode() {
216+
return resolve("aviation.uld_code");
217+
}
194218
}
195219

src/main/resources/en/aviation.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13377,3 +13377,70 @@ en:
1337713377
- "BAGGAGE CLAIM DELAYED"
1337813378
- "BAGS DELIVERED"
1337913379
- "UNKNOWN"
13380+
uld_type:
13381+
- "LD-1"
13382+
- "LD-2"
13383+
- "LD-3"
13384+
- "LD-3 Reefer"
13385+
- "LD-4"
13386+
- "LD-6"
13387+
- "LD-7"
13388+
- "LD-8"
13389+
- "LD-9"
13390+
- "LD-9 Reefer"
13391+
- "LD-11"
13392+
- "LD-26"
13393+
- "LD-29"
13394+
- "LD-39"
13395+
- "P6P"
13396+
- "PLA"
13397+
- "M-1"
13398+
- "M-1H"
13399+
- "M-2"
13400+
- "M-6"
13401+
uld_code:
13402+
- "AAA"
13403+
- "AAD"
13404+
- "AAF"
13405+
- "AAP"
13406+
- "AAU"
13407+
- "AAY"
13408+
- "AAZ"
13409+
- "AGA"
13410+
- "AKC"
13411+
- "AKE"
13412+
- "AKH"
13413+
- "AKN"
13414+
- "ALB"
13415+
- "ALD"
13416+
- "ALF"
13417+
- "ALP"
13418+
- "AMA"
13419+
- "AMD"
13420+
- "AMJ"
13421+
- "AMU"
13422+
- "AVY"
13423+
- "AWC"
13424+
- "AYY"
13425+
- "AYX"
13426+
- "DPE"
13427+
- "DPN"
13428+
- "DQF"
13429+
- "FLA"
13430+
- "FQA"
13431+
- "HMA"
13432+
- "KMA"
13433+
- "P1P"
13434+
- "PAD"
13435+
- "PGA"
13436+
- "PLA"
13437+
- "PMC"
13438+
- "QKE"
13439+
- "RAU"
13440+
- "RKN"
13441+
- "RWB"
13442+
- "SAA"
13443+
- "SAX"
13444+
- "VRA"
13445+
- "XAW"
13446+
- "XKC"

src/test/java/net/datafaker/providers/base/AviationTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ protected Collection<TestSpec> providerListTest() {
100100
TestSpec.of(aviation::specialTypeDesignator, "aviation.aircraft_type_special_designator"),
101101
TestSpec.of(aviation::engineType, "aviation.engine_type"),
102102
TestSpec.of(aviation::flightStatus, "aviation.flight_status"),
103-
TestSpec.of(aviation::airline, "aviation.airline"));
103+
TestSpec.of(aviation::airline, "aviation.airline"),
104+
TestSpec.of(aviation::uldType, "aviation.uld_type"),
105+
TestSpec.of(aviation::uldCode, "aviation.uld_code"));
104106
}
105107
}

0 commit comments

Comments
 (0)