Skip to content

Commit

Permalink
Merge branch 'release-2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Jul 11, 2017
2 parents 8fd1e07 + 22027cd commit f1e9529
Show file tree
Hide file tree
Showing 1,269 changed files with 122,802 additions and 45,200 deletions.
24 changes: 4 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,11 @@
/utilities/target/
/jdbcprovider/target/
/odbcprovider/target/
/spreadsheet/spreadsheet-html/target/
/spreadsheet/spreadsheet-poi/target/
/spreadsheet/spreadsheet-api/target/
/spreadsheet/spreadsheet-od/target/
/spreadsheet/spreadsheet-xmlss/target/
/spreadsheetprovider/target/
/sdmxprovider/target/
/commonprovider/target/
/jwsacruncher/target/
/jtstoolkit/target/
/utilities/target/
/jtss/target/
/jdbcprovider/target/
/odbcprovider/target/
/spreadsheet/spreadsheet-od/target/
/spreadsheet/spreadsheet-api/target/
/spreadsheet/spreadsheet-poi/target/
/spreadsheet/spreadsheet-html/target/
/spreadsheet/spreadsheet-xmlss/target/
/spreadsheetprovider/target/
/sdmxprovider/target/
/commonprovider/target/
/jbench/target/
/jwsacruncher/target/
/jwsacruncher/target/
/spreadsheet/*/target/
/demetra-tck/target/
/demetra-workspace/target/
28 changes: 23 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
language: java
jdk:
- openjdk7
- oraclejdk7
- oraclejdk8
language: java
jdk:
- oraclejdk8
sudo: required

# Use latest JDK
addons:
apt:
packages:
- oracle-java8-installer

cache:
directories:
- $HOME/.m2

deploy:
provider: script
script: mvn deploy -Dmaven.test.skip -s settings.xml
skip_cleanup: true
on:
branch: develop
jdk: oraclejdk8
condition: $TRAVIS_PULL_REQUEST = "false"
41 changes: 31 additions & 10 deletions commonprovider/pom.xml
Original file line number Diff line number Diff line change
@@ -1,43 +1,64 @@

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>demetra-parent</artifactId>
<version>2.1.0</version>
<relativePath>../pom.xml</relativePath>
<version>2.2.0</version>
</parent>

<artifactId>demetra-common</artifactId>
<packaging>jar</packaging>

<name>Demetra - Common</name>
<description>A TS Provider that handles several sources such as csv files.</description>

<properties>
<opencsv.version>2.3</opencsv.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.3</version>
<version>${opencsv.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- compile only -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
<scope>provided</scope>
</dependency>
<!-- compile and runtime -->
<dependency>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>demetra-tss</artifactId>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
</dependency>
<!-- test only -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>demetra-tck</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* @author Jean Palate
* @author Philippe Charles
*/
@Deprecated
public class RandomBean implements IDataSourceBean {

static final IParam<DataSource, Integer> X_SEED = Params.onInteger(0, "seed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/

*/
package ec.tss.tsproviders.common.random;

import ec.tss.*;
Expand All @@ -31,6 +30,7 @@
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -39,6 +39,7 @@
* @author Jean Palate
* @author Philippe Charles
*/
@Deprecated
public class RandomProvider extends AbstractDataSourceLoader<double[][], RandomBean> {

private static final Logger LOGGER = LoggerFactory.getLogger(RandomProvider.class);
Expand Down Expand Up @@ -75,14 +76,14 @@ public List<DataSet> children(DataSource dataSource) throws IllegalArgumentExcep
DataSet.Builder builder = DataSet.builder(dataSource, DataSet.Kind.SERIES);
DataSet[] result = new DataSet[decodeBean(dataSource).getCount()];
for (int i = 0; i < result.length; i++) {
Z_INDEX.set(builder, i);
result[i] = builder.build();
result[i] = builder.put(Z_INDEX, i).build();
}
return Arrays.asList(result);
}

@Override
public List<DataSet> children(DataSet parent) throws IllegalArgumentException {
Objects.requireNonNull(parent);
throw new IllegalArgumentException("No hierarchy");
}

Expand Down Expand Up @@ -130,8 +131,8 @@ protected void fillSeries(TsInformation info, DataSet dataSet) throws IOExceptio
TsFrequency freq = TsFrequency.valueOf(decodeBean(dataSet.getDataSource()).getS());
// fill TsInformation
int index = Z_INDEX.get(dataSet);
info.name = getDisplayName(dataSet);
info.data = new TsData(freq, 2000, 0, rawData[index], false);
info.name = getDisplayName(dataSet);
info.type = TsInformationType.All;
}

Expand All @@ -142,11 +143,15 @@ public RandomBean newBean() {

@Override
public DataSource encodeBean(Object bean) throws IllegalArgumentException {
return ((RandomBean) bean).toDataSource(SOURCE, VERSION);
try {
return ((RandomBean) bean).toDataSource(SOURCE, VERSION);
} catch (ClassCastException ex) {
throw new IllegalArgumentException(ex);
}
}

@Override
public RandomBean decodeBean(DataSource dataSource) throws IllegalArgumentException {
return new RandomBean(dataSource);
return new RandomBean(support.check(dataSource));
}
}
Loading

0 comments on commit f1e9529

Please sign in to comment.