-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored market identifier codes into separate properties file
Issue: #3373
- Loading branch information
Showing
7 changed files
with
140 additions
and
103 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
name.abuchen.portfolio/src/name/abuchen/portfolio/online/impl/MarketIdentifierCodes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package name.abuchen.portfolio.online.impl; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.Enumeration; | ||
import java.util.List; | ||
import java.util.MissingResourceException; | ||
import java.util.ResourceBundle; | ||
|
||
/** | ||
* Returns the labels based on the ISO 10383 market identifier code. | ||
* | ||
* @see https://www.iso20022.org/market-identifier-codes | ||
*/ | ||
public class MarketIdentifierCodes | ||
{ | ||
private static final String BUNDLE_NAME = "name.abuchen.portfolio.online.impl.market-identifier-codes"; //$NON-NLS-1$ | ||
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); | ||
|
||
private MarketIdentifierCodes() | ||
{ | ||
} | ||
|
||
public static String getLabel(String marketIdentifierCode) | ||
{ | ||
try | ||
{ | ||
return BUNDLE.getString(marketIdentifierCode); | ||
} | ||
catch (MissingResourceException e) | ||
{ | ||
return marketIdentifierCode; | ||
} | ||
} | ||
|
||
public static List<String> getAllMarketIdentifierCodes() | ||
{ | ||
List<String> answer = new ArrayList<>(); | ||
|
||
Enumeration<String> keys = BUNDLE.getKeys(); | ||
while (keys.hasMoreElements()) | ||
{ | ||
String key = keys.nextElement(); | ||
answer.add(key); | ||
} | ||
|
||
Collections.sort(answer); | ||
|
||
return answer; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...uchen.portfolio/src/name/abuchen/portfolio/online/impl/market-identifier-codes.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#---------------------------------------------------------------- | ||
# XXXX --> Market identifier codes ISO-10383 | ||
# https://www.iso20022.org/market-identifier-codes | ||
#---------------------------------------------------------------- | ||
|
||
ALXL = Euronext Lisbon | ||
ASEX = Athens Stock Exchange | ||
BMEX = Madrid Stock Exchange | ||
BVCA = Caracas Stock Exchange | ||
BVMF = Brazil Stock Exchange | ||
DSMD = Qatar Stock Exchange | ||
MISX = Moscow Exchange | ||
NEOE = NEO Exchange - NEO-L (Market by Order) | ||
XADS = Abu Dhabi Securities Exchange | ||
XAMS = Euronext Amsterdam | ||
XBER = Berlin Stock Exchange | ||
XBKK = The Stock Exchange of Thailand | ||
XBOG = Columbia Stock Exchange | ||
XBOM = Bombay Stock Exchange | ||
XBOT = Botswana Stock Exchange | ||
XBRU = Euronext Brussels | ||
XBSE = Bucharest Stock Exchange | ||
XBUD = Budapest Stock Exchange | ||
XBUE = Buenos Aires Stock Exchange | ||
XCAI = Egyptian Exchange | ||
XCNQ = Canadian Securities Exchange | ||
XCOL = Colombo Stock Exchange | ||
XCSE = Copenhagen Stock Exchange | ||
XDUB = Euronext Dublin | ||
XDUS = D\u00FCsseldorf Stock Exchange | ||
XETR = Deutsche B\u00F6rse Xetra | ||
XFRA = Frankfurt Stock Exchange | ||
XHAM = Hamburg Stock Exchange | ||
XHAN = Hannover Stock Exchange | ||
XHEL = Helsinki Stock Exchange | ||
XHKG = Hong Kong Stock Exchange | ||
XIDX = Indonesia Stock Exchange | ||
XIST = Borsa Istanbul | ||
XJAM = Jamaica Stock Exchange | ||
XJPX = Tokyo Stock Exchange | ||
XJSE = Johannesburg Stock Exchange | ||
XKAR = Pakistan Stock Exchange | ||
XKLS = Malaysia Stock Exchange | ||
XKRX = Korea Exchange | ||
XKUW = Boursa Kuwait | ||
XLIM = Lima Stock Exchange | ||
XLIT = Vilnius Stock Exchange | ||
XLON = London Stock Exchange | ||
XMEX = Mexican Stock Exchange | ||
XMIL = Italian Stock Exchange | ||
XMUN = Munich Stock Exchange | ||
XNAS = NASDAQ Exchange | ||
XNGS = NASDAQ/NGS (Global Select Market) | ||
XNSE = National Stock Exchange of India | ||
XNYS = New York Stock Exchange | ||
XNZE = New Zealand\u2019s Exchange | ||
XOSL = Oslo Stock Exchange | ||
XPAR = Euronext Paris | ||
XPHS = Philippine Stock Exchange | ||
XPRA = Prague Stock Exchange | ||
XRIS = Riga Stock Exchange | ||
XSAU = Saudi Stock Exchange | ||
XSES = Singapore Exchange | ||
XSGO = Santiago Stock Exchange | ||
XSHE = Shenzhen Stock Exchange | ||
XSHG = Shanghai Stock Exchange | ||
XSTO = Stockholm Stock Exchange | ||
XSTU = Stuttgart Stock Exchange | ||
XSWX = SIX Swiss Exchange | ||
XTAE = Tel-Aviv Stock Exchange | ||
XTAI = Taiwan Stock Exchange | ||
XTAL = Tallinn Stock Exchange | ||
XTSE = Toronto Stock Exchange | ||
XTSX = TSX Venture Exchange | ||
XWAR = Poland Stock Exchange | ||
XWBO = Vienna Stock Exchange |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters