1 package org.djunits.unit.unitsystem;
2
3 import java.io.Serializable;
4
5 import org.djunits.locale.Localization;
6
7
8
9
10
11
12
13
14
15
16
17 public abstract class UnitSystem implements Serializable
18 {
19
20 private static final long serialVersionUID = 20140606L;
21
22
23 public static final CGS CGS;
24
25
26 public static final CGS_ESU CGS_ESU;
27
28
29 public static final CGS_EMU CGS_EMU;
30
31
32 public static final Imperial IMPERIAL;
33
34
35 public static final MTS MTS;
36
37
38 public static final Other OTHER;
39
40
41 public static final SIAccepted SI_ACCEPTED;
42
43
44 public static final SIBase SI_BASE;
45
46
47 public static final SIDerived SI_DERIVED;
48
49
50 public static final USCustomary US_CUSTOMARY;
51
52
53 public static final AU AU;
54
55 static
56 {
57 CGS = new CGS("UnitSystem.CGS", "UnitSystem.centimeter-gram-second_system");
58 CGS_ESU = new CGS_ESU("UnitSystem.CGS_(ESU)", "UnitSystem.centimeter-gram-second_system,_electrostatic_units");
59 CGS_EMU = new CGS_EMU("UnitSystem.CGS_(EMU)", "UnitSystem.centimeter-gram-second_system,_electromagnetic_units");
60 IMPERIAL = new Imperial("UnitSystem.Imperial", "UnitSystem.Imperial_system");
61 MTS = new MTS("UnitSystem.MTS", "UnitSystem.meter-tonne-second_system");
62 OTHER = new Other("UnitSystem.Other", "UnitSystem.other_system");
63 SI_ACCEPTED = new SIAccepted("UnitSystem.SI_accepted", "UnitSystem.International_System_of_Units_(Accepted_Unit)");
64 SI_BASE = new SIBase("UnitSystem.SI", "UnitSystem.International_System_of_Units_(Base_Unit)");
65 SI_DERIVED = new SIDerived("UnitSystem.SI_derived", "UnitSystem.International_System_of_Units_(Derived_Unit)");
66 US_CUSTOMARY = new USCustomary("UnitSystem.US_customary", "UnitSystem.US_customary_system");
67 AU = new AU("UnitSystem.AU", "UnitSystem.Atomic_Unit_system");
68 }
69
70
71 private final String abbreviationKey;
72
73
74 private final String nameKey;
75
76
77 private static Localization localization = new Localization("localeunitsystem");
78
79
80
81
82
83 protected UnitSystem(final String abbreviationKey, final String nameKey)
84 {
85 this.abbreviationKey = abbreviationKey;
86 this.nameKey = nameKey;
87 }
88
89
90
91
92 public final String getName()
93 {
94 return localization.getString(this.nameKey);
95 }
96
97
98
99
100 public final String getNameKey()
101 {
102 return this.nameKey;
103 }
104
105
106
107
108 public final String getAbbreviation()
109 {
110 return localization.getString(this.abbreviationKey);
111 }
112
113
114
115
116 public final String getAbbreviationKey()
117 {
118 return this.abbreviationKey;
119 }
120
121 }