Skip to content

Commit aad84d3

Browse files
committed
Working on #374
1 parent b2f60d9 commit aad84d3

File tree

7 files changed

+20
-286
lines changed

7 files changed

+20
-286
lines changed

moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/ECBAbstractRateProvider.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2020, Anatole Tresch, Werner Keil and others by the @author tag.
2+
* Copyright (c) 2012, 2023, Otavio Santana,, Werner Keil and others by the @author tag.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -16,14 +16,12 @@
1616
package org.javamoney.moneta.convert.ecb;
1717

1818
import org.javamoney.moneta.convert.ExchangeRateBuilder;
19-
import org.javamoney.moneta.convert.ecb.model.Exchange;
2019
import org.javamoney.moneta.spi.AbstractRateProvider;
2120
import org.javamoney.moneta.spi.DefaultNumberValue;
2221
import org.javamoney.moneta.spi.loader.LoadDataInformation;
2322
import org.javamoney.moneta.spi.loader.LoaderService;
2423
import org.javamoney.moneta.spi.loader.LoaderService.LoaderListener;
2524
import org.xml.sax.InputSource;
26-
import org.xml.sax.XMLReader;
2725

2826
import javax.money.CurrencyUnit;
2927
import javax.money.Monetary;
@@ -36,15 +34,11 @@
3634
import javax.xml.parsers.SAXParser;
3735
import javax.xml.parsers.SAXParserFactory;
3836
import java.io.InputStream;
39-
import java.io.InputStreamReader;
40-
import java.io.Reader;
4137
import java.math.MathContext;
4238
import java.net.URL;
43-
import java.nio.charset.StandardCharsets;
4439
import java.time.LocalDate;
4540
import java.time.format.DateTimeFormatter;
4641
import java.util.Comparator;
47-
import java.util.List;
4842
import java.util.Map;
4943
import java.util.Objects;
5044
import java.util.concurrent.ConcurrentHashMap;
@@ -59,6 +53,7 @@
5953
* Base to all Europe Central Bank implementation.
6054
*
6155
* @author otaviojava
56+
* @author Werner Keil
6257
*/
6358
abstract class ECBAbstractRateProvider extends AbstractRateProvider implements
6459
LoaderListener {
@@ -116,7 +111,6 @@ abstract class ECBAbstractRateProvider extends AbstractRateProvider implements
116111

117112
@Override
118113
public void newDataLoaded(String resourceId, InputStream is) {
119-
final ECBUnmarshaller unmarshaller = new ECBUnmarshaller();
120114
final int oldSize = this.rates.size();
121115
try {
122116
//final ExchangeRateParser erp = new ExchangeRateParser(is, getContext().getText());
@@ -127,7 +121,6 @@ public void newDataLoaded(String resourceId, InputStream is) {
127121
//xmlReader.setContentHandler(new ECBRateReadingHandler(rates, getContext()));
128122

129123
//final InputSource source = new InputSource(is);
130-
//List<Exchange> exchanges = unmarshaller.apply(remoteResource);
131124

132125
// different encoding
133126
//source.setEncoding(StandardCharsets.UTF_8.displayName());

moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/ECBCurrentRateProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2020, Anatole Tresch, Werner Keil and others by the @author tag.
2+
* Copyright (c) 2012, 2023, Werner Keil and others by the @author tag.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/ECBUnmarshaller.java

Lines changed: 0 additions & 79 deletions
This file was deleted.

moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/ExchangeRateParser.java

Lines changed: 0 additions & 81 deletions
This file was deleted.

moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/defaults/Defaults.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1+
/*
2+
* Copyright (c) 2023, Werner Keil and others by the @author tag.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
116
package org.javamoney.moneta.convert.ecb.defaults;
2-
/** This class is necessary to declare the "defaults" package using just for resources */
17+
/** This class is necessary to declare the "defaults" package using just for resources,
18+
* it also serves as constant collection for default strings */
319
public final class Defaults {
420
private Defaults() {}
521

moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/model/Exchange.java

Lines changed: 0 additions & 67 deletions
This file was deleted.

moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/model/Exchange2.java

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)