-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Master generic netcdf #73
base: master
Are you sure you want to change the base?
Conversation
Ik stel voor dat ik donderdag met Julius de Code Quality issues oplos voordat we deze pull request verwerken. |
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
import java.io.File; | ||
|
||
public class GenericNetcdfDataObjectTest extends TestCase { | ||
private OpenDaTestSupport testData; |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public Class getValueType() { | ||
throw new RuntimeException("org.openda.exchange.GenericNetcdfArrayExchangeItem.getValueType not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public ValueType getValuesType() { | ||
throw new RuntimeException("org.openda.exchange.GenericNetcdfArrayExchangeItem.getValuesType not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
@@ -0,0 +1,102 @@ | |||
package org.openda.exchange.dataobjects; | |||
|
|||
import org.openda.interfaces.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid unused imports such as 'org.openda.interfaces'
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public void setValuesAsDoubles(double[] values) { | ||
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.setValuesAsDoubles not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public void setValues(Object values) { | ||
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.setValues not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public IGeometryInfo getGeometryInfo() { | ||
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getGeometryInfo not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
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."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public void multiplyValues(double[] multiplicationFactors) { | ||
throw new RuntimeException("org.openda.exchange.GenericNetcdfArrayExchangeItem.multiplyValues not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public String getDescription() { | ||
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getDescription not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
import org.openda.interfaces.IDataObject; | ||
import org.openda.interfaces.IExchangeItem; | ||
import org.openda.interfaces.IPrevExchangeItem; | ||
import org.openda.utils.Array; |
There was a problem hiding this comment.
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.*; |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public ValueType getValuesType() { | ||
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getValuesType not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
import org.openda.interfaces.IDataObject; | ||
import org.openda.interfaces.IExchangeItem; | ||
import org.openda.interfaces.IPrevExchangeItem; | ||
import org.openda.utils.Array; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Unused import - org.openda.utils.Array.
|
||
@Override | ||
public void setTimes(double[] times) { | ||
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.setTimes not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
@@ -0,0 +1,13 @@ | |||
package org.openda.exchange.dataobjects; | |||
|
|||
import java.util.ArrayList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Unused import - java.util.ArrayList.
|
||
@Override | ||
public void setValues(Object values) { | ||
throw new RuntimeException("org.openda.exchange.GenericNetcdfArrayExchangeItem.setValues not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public void multiplyValues(double[] multiplicationFactors) { | ||
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.multiplyValues not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
// ArrayList<GenericNetcdfArrayConfig> arrayConfigs = new ArrayList<>(); | ||
|
||
HashMap<String, GenericNetcdfTSConfig> tsConfigs = new HashMap<>(); | ||
HashMap<String, GenericNetcdfArrayConfig> arrayConfigs = new HashMap<>(); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
|
||
@Override | ||
public IQuantityInfo getQuantityInfo() { | ||
throw new RuntimeException("org.openda.exchange.dataobjects.GenericNetcdfTSExchangeItem.getQuantityInfo not implemented yet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Avoid throwing raw exception types.
No description provided.