1 /*
2 * MoneyWise: Finance Application
3 * Copyright 2012-2026. Tony Washer
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy
7 * of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17 package io.github.tonywasher.joceanus.moneywise.atlas.reports;
18
19 import io.github.tonywasher.joceanus.moneywise.atlas.data.analysis.buckets.MoneyWiseXAnalysisBucketResource;
20 import io.github.tonywasher.joceanus.oceanus.resource.OceanusBundleId;
21 import io.github.tonywasher.joceanus.oceanus.resource.OceanusBundleLoader;
22
23 import java.util.ResourceBundle;
24
25 /**
26 * Resource IDs for jMoneyWise Report Fields.
27 */
28 public enum MoneyWiseXReportResource implements OceanusBundleId {
29 /**
30 * NetWorth ReportType.
31 */
32 TYPE_NETWORTH("Type.NetWorth"),
33
34 /**
35 * BalanceSheet ReportType.
36 */
37 TYPE_BALANCESHEET("Type.BalanceSheet"),
38
39 /**
40 * CashFlow ReportType.
41 */
42 TYPE_CASHFLOW("Type.CashFlow"),
43
44 /**
45 * IncomeExpense ReportType.
46 */
47 TYPE_INCEXP("Type.IncExp"),
48
49 /**
50 * Portfolio ReportType.
51 */
52 TYPE_PORTFOLIO("Type.Portfolio"),
53
54 /**
55 * MarketGrowth ReportType.
56 */
57 TYPE_MARKET("Type.Market"),
58
59 /**
60 * TaxBasis ReportType.
61 */
62 TYPE_TAXBASIS("Type.TaxBasis"),
63
64 /**
65 * TaxCalc ReportType.
66 */
67 TYPE_TAXCALC("Type.TaxCalc"),
68
69 /**
70 * AssetGains ReportType.
71 */
72 TYPE_ASSETGAINS("Type.AssetGains"),
73
74 /**
75 * CapitalGains ReportType.
76 */
77 TYPE_CAPITALGAINS("Type.CapitalGains"),
78
79 /**
80 * NetWorth Title.
81 */
82 NETWORTH_TITLE("NetWorth.Title"),
83
84 /**
85 * NetWorth Asset.
86 */
87 NETWORTH_ASSET("NetWorth.Asset"),
88
89 /**
90 * BalanceSheet Title.
91 */
92 BALANCESHEET_TITLE("BalanceSheet.Title"),
93
94 /**
95 * CashFlow Title.
96 */
97 CASHFLOW_TITLE("CashFlow.Title"),
98
99 /**
100 * Income/Expense Title.
101 */
102 INCEXP_TITLE("IncExp.Title"),
103
104 /**
105 * Portfolio Title.
106 */
107 PORTFOLIO_TITLE("Portfolio.Title"),
108
109 /**
110 * MarketGrowth Title.
111 */
112 MARKETGROWTH_TITLE("MarketGrowth.Title"),
113
114 /**
115 * MarketGrowth BaseValue.
116 */
117 MARKETGROWTH_BASE("MarketGrowth.Base"),
118
119 /**
120 * AssetGains Title.
121 */
122 ASSETGAINS_TITLE("AssetGains.Title"),
123
124 /**
125 * CapitalGains Title.
126 */
127 CAPITALGAINS_TITLE("CapitalGains.Title"),
128
129 /**
130 * TaxBasis Title.
131 */
132 TAXBASIS_TITLE("TaxBasis.Title"),
133
134 /**
135 * TaxCalc Title.
136 */
137 TAXCALC_TITLE("TaxCalc.Title");
138
139 /**
140 * The Resource Loader.
141 */
142 private static final OceanusBundleLoader LOADER = OceanusBundleLoader.getLoader(MoneyWiseXAnalysisBucketResource.class.getCanonicalName(),
143 ResourceBundle::getBundle);
144
145 /**
146 * The Id.
147 */
148 private final String theKeyName;
149
150 /**
151 * The Value.
152 */
153 private String theValue;
154
155 /**
156 * Constructor.
157 *
158 * @param pKeyName the key name
159 */
160 MoneyWiseXReportResource(final String pKeyName) {
161 theKeyName = pKeyName;
162 }
163
164 @Override
165 public String getKeyName() {
166 return theKeyName;
167 }
168
169 @Override
170 public String getNameSpace() {
171 return "MoneyWise.report";
172 }
173
174 @Override
175 public String getValue() {
176 /* If we have not initialised the value */
177 if (theValue == null) {
178 /* Derive the value */
179 theValue = LOADER.getValue(this);
180 }
181
182 /* return the value */
183 return theValue;
184 }
185 }