Skip to content

Commit

Permalink
Don't set array length on m/z, intensity, time
Browse files Browse the repository at this point in the history
when there is already defaultArrayLength.
  • Loading branch information
Mailaender committed Dec 16, 2021
1 parent 0c9c0b9 commit 3c5f1d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public static BinaryDataArrayType createBinaryData(float[] values) {
byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
byteBuffer.asFloatBuffer().put(floatBuffer);
BinaryDataArrayType binaryDataArrayType = createBinaryDataArray(byteBuffer);
binaryDataArrayType.setArrayLength(BigInteger.valueOf(values.length));
CVParamType cvParamDataType = new CVParamType();
cvParamDataType.setAccession("MS:1000521");
cvParamDataType.setName("32-bit float");
Expand All @@ -49,7 +48,6 @@ public static BinaryDataArrayType createBinaryData(double[] values) {
byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
byteBuffer.asDoubleBuffer().put(doubleBuffer);
BinaryDataArrayType binaryDataArrayType = createBinaryDataArray(byteBuffer);
binaryDataArrayType.setArrayLength(BigInteger.valueOf(values.length));
CVParamType cvParamDataType = new CVParamType();
cvParamDataType.setAccession("MS:1000523");
cvParamDataType.setName("64-bit float");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2015, 2018 Lablicate GmbH.
* Copyright (c) 2015, 2021 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -12,6 +12,7 @@
package org.eclipse.chemclipse.msd.converter.supplier.mzml.internal.v110.model;

import java.math.BigInteger;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
Expand All @@ -28,7 +29,7 @@ public class BinaryDataArrayType extends ParamGroupType {
private byte[] binary;
@XmlAttribute(name = "arrayLength")
@XmlSchemaType(name = "nonNegativeInteger")
private BigInteger arrayLength;
private BigInteger arrayLength; // optional, may override defaultArrayLength, not to be used for m/z, intensity and time
@XmlAttribute(name = "dataProcessingRef")
@XmlIDREF
@XmlSchemaType(name = "IDREF")
Expand Down

0 comments on commit 3c5f1d3

Please sign in to comment.