Skip to content

Conversation

@sumihar
Copy link
Contributor

@sumihar sumihar commented Mar 7, 2019

No description provided.

@wkramer
Copy link
Member

wkramer commented Mar 18, 2019

Ik stel voor dat ik donderdag met Julius de Code Quality issues oplos voordat we deze pull request verwerken.

@nilsvanvelzen
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 39
           

Complexity increasing per file
==============================
- core/java/test/org/openda/exchange/dataobjects/GenericNetcdfDataObjectTest.java  2
- core/java/src/org/openda/exchange/dataobjects/GenericNetcdfTSExchangeItem.java  2
- core/java/src/org/openda/exchange/dataobjects/GenericNetcdfDataObject.java  33
- core/java/src/org/openda/exchange/dataobjects/GenericNetcdfConfigReader.java  7
- core/java/src/org/openda/exchange/dataobjects/GenericNetcdfArrayConfig.java  1
- core/java/src/org/openda/exchange/GenericNetcdfArrayExchangeItem.java  4
- core/java/src/org/openda/exchange/dataobjects/GenericNetcdfTSConfig.java  8
         

Clones added
============
- core/java/src/org/openda/exchange/dataobjects/GenericNetcdfDataObject.java  2
- core/java/src/org/openda/exchange/GenericNetcdfArrayExchangeItem.java  1
         

See the complete overview on Codacy

String dimensionVariable = arrayConfig.getNetcdfDimensionVariables()[iDimVar];
int dimIndex = variable.findDimensionIndex(dimensionVariable);
if (dimIndex==-1){
throw new RuntimeException("GenericNetcdfDataObject, variable " + variableName + " doesn't have the following dimension-variable: " + dimensionVariable);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import java.io.File;

public class GenericNetcdfDataObjectTest extends TestCase {
private OpenDaTestSupport testData;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public Role getRole() {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getRole not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public Class getValueType() {
throw new RuntimeException("org.openda.exchange.GenericNetcdfArrayExchangeItem.getValueType not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public ValueType getValuesType() {
throw new RuntimeException("org.openda.exchange.GenericNetcdfArrayExchangeItem.getValuesType not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,102 @@
package org.openda.exchange.dataobjects;

import org.openda.interfaces.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for (String valuesDimensionName : valuesDimension.keySet()) {
dimIndex = valuesVariable.findDimensionIndex(valuesDimensionName);
if (dimIndex == -1) {
throw new RuntimeException("GenericNetcdfDataObject, TimeSeries, variable " + tsConfig.getValuesVariableName() + " doesn't have the following dimension-variable: " + valuesDimensionName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public void setValuesAsDoubles(double[] values) {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.setValuesAsDoubles not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public void setValues(Object values) {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.setValues not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public IGeometryInfo getGeometryInfo() {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getGeometryInfo not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.template = template;
if (timeseriesExchangeItemXML.getMeta() != null){
if (timeseriesExchangeItemXML.getMeta().getLocation() == null){
throw new RuntimeException("GenericNetcdfTSConfig: <location> is missing in <meta>. Please check the configuration file.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public void multiplyValues(double[] multiplicationFactors) {
throw new RuntimeException("org.openda.exchange.GenericNetcdfArrayExchangeItem.multiplyValues not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public String getDescription() {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getDescription not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import org.openda.interfaces.IDataObject;
import org.openda.interfaces.IExchangeItem;
import org.openda.interfaces.IPrevExchangeItem;
import org.openda.utils.Array;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,98 @@
package org.openda.exchange.dataobjects;

import org.openda.core.io.castorgenerated.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public void copyValuesFromItem(IExchangeItem sourceItem) {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.copyValuesFromItem not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public ValueType getValuesType() {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getValuesType not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import org.openda.interfaces.IDataObject;
import org.openda.interfaces.IExchangeItem;
import org.openda.interfaces.IPrevExchangeItem;
import org.openda.utils.Array;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public void setTimes(double[] times) {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.setTimes not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,13 @@
package org.openda.exchange.dataobjects;

import java.util.ArrayList;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public void setValues(Object values) {
throw new RuntimeException("org.openda.exchange.GenericNetcdfArrayExchangeItem.setValues not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public void multiplyValues(double[] multiplicationFactors) {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.multiplyValues not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// ArrayList<GenericNetcdfArrayConfig> arrayConfigs = new ArrayList<>();

HashMap<String, GenericNetcdfTSConfig> tsConfigs = new HashMap<>();
HashMap<String, GenericNetcdfArrayConfig> arrayConfigs = new HashMap<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public Class getValueType() {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getValueType not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public IQuantityInfo getQuantityInfo() {
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getQuantityInfo not implemented yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants