Skip to content

Commit

Permalink
Working on #374
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Apr 24, 2023
1 parent b2f60d9 commit aad84d3
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 286 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Anatole Tresch, Werner Keil and others by the @author tag.
* Copyright (c) 2012, 2023, Otavio Santana,, Werner Keil and others by the @author tag.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
Expand All @@ -16,14 +16,12 @@
package org.javamoney.moneta.convert.ecb;

import org.javamoney.moneta.convert.ExchangeRateBuilder;
import org.javamoney.moneta.convert.ecb.model.Exchange;
import org.javamoney.moneta.spi.AbstractRateProvider;
import org.javamoney.moneta.spi.DefaultNumberValue;
import org.javamoney.moneta.spi.loader.LoadDataInformation;
import org.javamoney.moneta.spi.loader.LoaderService;
import org.javamoney.moneta.spi.loader.LoaderService.LoaderListener;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

import javax.money.CurrencyUnit;
import javax.money.Monetary;
Expand All @@ -36,15 +34,11 @@
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.math.MathContext;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
Expand All @@ -59,6 +53,7 @@
* Base to all Europe Central Bank implementation.
*
* @author otaviojava
* @author Werner Keil
*/
abstract class ECBAbstractRateProvider extends AbstractRateProvider implements
LoaderListener {
Expand Down Expand Up @@ -116,7 +111,6 @@ abstract class ECBAbstractRateProvider extends AbstractRateProvider implements

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

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

// different encoding
//source.setEncoding(StandardCharsets.UTF_8.displayName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Anatole Tresch, Werner Keil and others by the @author tag.
* Copyright (c) 2012, 2023, Werner Keil and others by the @author tag.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
Expand Down

This file was deleted.

This file was deleted.

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

Expand Down

This file was deleted.

This file was deleted.

0 comments on commit aad84d3

Please sign in to comment.