Commit 752538c5 authored by Morten Ofstad's avatar Morten Ofstad
Browse files

Merge branch wip/julien.lacoste/fixBuildError with refs/heads/master into...

Merge branch wip/julien.lacoste/fixBuildError with refs/heads/master into refs/merge-requests/542/train
parents 11d8955f 1199f2bc
Pipeline #88699 passed with stages
in 26 minutes and 9 seconds
......@@ -67,7 +67,7 @@ public class AWSOpenOptions extends OpenOptions {
* @param pKey the key prefix of the VDS
* @param pRegion the region of the bucket of the VDS
* @param pEndpointOverride This parameter allows to override the endpoint url
* @apram wam wavelet adaptive method
* @param wam wavelet adaptive method
* @param wat wavelet adaptive tolerance
* @param war wavelet adaptive ratio
*/
......@@ -96,7 +96,7 @@ public class AWSOpenOptions extends OpenOptions {
* @param pBucket the bucket of the VDS
* @param pKey the key prefix of the VDS
* @param pRegion the region of the bucket of the VDS
* @apram wam wavelet adaptive method
* @param wam wavelet adaptive method
* @param wat wavelet adaptive tolerance
* @param war wavelet adaptive ratio
*/
......
......@@ -53,7 +53,7 @@ public class AzureOpenOptions extends OpenOptions {
* @param pConnectionString the connectionString for the VDS
* @param pContainer the container of the VDS
* @param pBlob the blob prefix of the VDS
* @apram wam wavelet adaptive method
* @param wam wavelet adaptive method
* @param wat wavelet adaptive tolerance
* @param war wavelet adaptive ratio
*/
......@@ -94,7 +94,7 @@ public class AzureOpenOptions extends OpenOptions {
* Blob Storage library
* @param pMaxExecutionTime the max execution time setting for the Azure
* Blob Storage library
* @apram wam wavelet adaptive method
* @param wam wavelet adaptive method
* @param wat wavelet adaptive tolerance
* @param war wavelet adaptive ratio
*/
......
......@@ -49,7 +49,7 @@ public class AzurePresignedOpenOptions extends OpenOptions {
*
* @param baseUrl the connectionString for the VDS
* @param urlSuffix the container of the VDS
* @apram wam wavelet adaptive method
* @param wam wavelet adaptive method
* @param wat wavelet adaptive tolerance
* @param war wavelet adaptive ratio
*/
......
......@@ -100,7 +100,14 @@ public abstract class BufferUtils {
}
/**
* @param samplesBuffer The buffer to be copied into a new array
* Get the input sample buffer as float array
*
* @param samplesBuffer
* The buffer to be copied into a new array
* @param dst
* Destination array. If null, a new array will be created.
* @param releaseBuffer
* if true, samplesBuffer will be released after the copy.
* @return An array copy of the given buffer
*/
public static float[] toArray(FloatBuffer samplesBuffer, float[] dst, boolean releaseBuffer) {
......@@ -112,7 +119,14 @@ public abstract class BufferUtils {
}
/**
* @param samplesBuffer The buffer to be copied into a new array
* Get the input sample buffer as int array
*
* @param samplesBuffer
* The buffer to be copied into a new array
* @param dst
* Destination array. If null a new array will be created.
* @param releaseBuffer
* if true, samplesBuffer will be released after the copy.
* @return An array copy of the given buffer
*/
public static int[] toArray(IntBuffer samplesBuffer, int[] dst, boolean releaseBuffer) {
......@@ -124,8 +138,14 @@ public abstract class BufferUtils {
}
/**
* @param samplesBuffer The buffer to be copied into a new array
* @param dst The destination array
* Get the input sample buffer as byte array
*
* @param samplesBuffer
* The buffer to be copied into a new array
* @param dst
* Destination array. If null a new array will be created.
* @param releaseBuffer
* if true, samplesBuffer will be released after the copy.
* @return An array copy of the given buffer
*/
public static byte[] toArray(ByteBuffer samplesBuffer, byte[] dst, boolean releaseBuffer) {
......@@ -137,6 +157,8 @@ public abstract class BufferUtils {
}
/**
* Get the input sample buffer as float array
*
* @param samplesBuffer The buffer to be copied into a new array
* @return A new array filled with content of the given buffer
*/
......@@ -145,6 +167,8 @@ public abstract class BufferUtils {
}
/**
* Get the input sample buffer as int array
*
* @param samplesBuffer The buffer to be copied into a new array
* @return A new array filled with content of the given buffer
*/
......@@ -153,6 +177,8 @@ public abstract class BufferUtils {
}
/**
* Get the input sample buffer as byte array
*
* @param samplesBuffer The buffer to be copied into a new array
* @return A new array filled with content of the given buffer
*/
......@@ -161,6 +187,8 @@ public abstract class BufferUtils {
}
/**
* Copy the input sample buffer as float array, then releases the input buffer.
*
* @param samplesBuffer The buffer to be copied into a new array
* @return A new array filled with content of the given buffer. Buffer is released afterward.
* @see #release(Buffer)
......@@ -170,6 +198,8 @@ public abstract class BufferUtils {
}
/**
* Copy the input sample buffer as int array, then releases the input buffer.
*
* @param samplesBuffer The buffer to be copied into a new array
* @return A new array filled with content of the given buffer. Buffer is released afterward.
* @see #release(Buffer)
......@@ -179,6 +209,8 @@ public abstract class BufferUtils {
}
/**
* Copy the input sample buffer as byte array, then releases the input buffer.
*
* @param samplesBuffer The buffer to be copied into a new array
* @return A new array filled with content of the given buffer. Buffer is released afterward.
* @see #release(Buffer)
......@@ -228,7 +260,9 @@ public abstract class BufferUtils {
}
/**
* Get the capacity of a buffer.
* @param outBuf
* buffer whose size is asked
* @return The capacity in bytes of the provided buffer
*/
public static int getCapacityInBytes(Buffer outBuf) {
......
......@@ -49,7 +49,7 @@ public class GoogleOpenOptions extends OpenOptions {
*
* @param pBucket the bucket of the VDS
* @param pathPrefix the prefix of the VDS
* @apram wam wavelet adaptive method
* @param wam wavelet adaptive method
* @param wat wavelet adaptive tolerance
* @param war wavelet adaptive ratio
*/
......
......@@ -32,7 +32,7 @@ public class InMemoryOpenOptions extends OpenOptions {
/**
* Constructor with wavelet adaptive parameters
*
* @apram wam wavelet adaptive method
* @param wam wavelet adaptive method
* @param wat wavelet adaptive tolerance
* @param war wavelet adaptive ratio
*/
......
......@@ -77,18 +77,28 @@ public class MetadataContainer extends MetadataReadAccess {
/**
* Set int metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataInt(String category, String name, int value) {
cpSetMetadataInt(_handle, category, name, value);
}
/**
* Set int 2D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataIntVector2(String category, String name, int[] value) {
checkArrayArgument(value, 2);
......@@ -96,9 +106,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set int 3D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataIntVector3(String category, String name, int[] value) {
checkArrayArgument(value, 3);
......@@ -106,9 +121,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set int 4D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataIntVector4(String category, String name, int[] value) {
checkArrayArgument(value, 4);
......@@ -116,18 +136,28 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set float metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataFloat(String category, String name, float value) {
cpSetMetadataFloat(_handle, category, name, value);
}
/**
* Set float 2D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataFloatVector2(String category, String name, float[] value) {
checkArrayArgument(value, 2);
......@@ -135,9 +165,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set float 3D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataFloatVector3(String category, String name, float[] value) {
checkArrayArgument(value, 3);
......@@ -145,9 +180,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set float 4D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataFloatVector4(String category, String name, float[] value) {
checkArrayArgument(value, 4);
......@@ -155,18 +195,28 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set double metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataDouble(String category, String name, double value) {
cpSetMetadataDouble(_handle, category, name, value);
}
/**
* Set double 2D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataDoubleVector2(String category, String name, double[] value) {
checkArrayArgument(value, 2);
......@@ -174,9 +224,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set double 3D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataDoubleVector3(String category, String name, double[] value) {
checkArrayArgument(value, 3);
......@@ -184,9 +239,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set double 4D array metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataDoubleVector4(String category, String name, double[] value) {
checkArrayArgument(value, 4);
......@@ -194,9 +254,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* Set String metadata
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param value
* metadata value
*/
public void setMetadataString(String category, String name, String value) {
if (value == null) {
......@@ -206,10 +271,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* set Meta data blob using a byte array
* Set metadata blob using a byte array
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param blobValues
* metadata value as byte array
*/
public void setMetadataBLOB(String category, String name, byte[] blobValues) {
if (blobValues == null) {
......@@ -219,10 +288,14 @@ public class MetadataContainer extends MetadataReadAccess {
}
/**
* set Meta data blob using a byte array
* Set metadata blob using a byte buffer
*
* @param category
* metadata category definition
* @param name
* metadata name
* @param blobValues
* metadata value as byte buffer
*/
public void setMetadataBLOB(String category, String name, ByteBuffer blobValues) {
if (blobValues == null) {
......@@ -231,7 +304,6 @@ public class MetadataContainer extends MetadataReadAccess {
cpSetMetadataBLOB(_handle, category, name, blobValues.array());
}
private void checkArrayArgument(int[] array, int expectedSize) {
if (array == null || array.length != expectedSize) {
throw new IllegalArgumentException("Wrong IntVector parameter size, expected " + expectedSize + " got " + (array == null ? "null" : array.length));
......
......@@ -84,18 +84,25 @@ public class MetadataReadAccess extends JniPointerWithoutDeletion {
}
/**
* Check if the int metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata int with the given category and name is
* available
* metadata name
* @return true if a metadata int with the given category and name is available
*/
public boolean isMetadataIntAvailable(String category, String name) {
return cpIsMetadataIntAvailable(_handle, category, name);
}
/**
* Check if the int 2 sized array metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* metadata name
* @return true if a metadata IntVector2 with the given category and name is
* available
*/
......@@ -104,8 +111,12 @@ public class MetadataReadAccess extends JniPointerWithoutDeletion {
}
/**
* Check if the int 3 sized array metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* metadata name
* @return true if a metadata IntVector3 with the given category and name is
* available
*/
......@@ -114,9 +125,12 @@ public class MetadataReadAccess extends JniPointerWithoutDeletion {
}
/**
* Check if the int 4 sized array metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* metadata name
* @return true if a metadata IntVector4 with the given category and name is
* available
*/
......@@ -125,108 +139,142 @@ public class MetadataReadAccess extends JniPointerWithoutDeletion {
}
/**
* Check if the float metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata float with the given category and name is
* available
* metadata name
* @return true if a metadata float with the given category and name is available
*/
public boolean isMetadataFloatAvailable(String category, String name) {
return cpIsMetadataFloatAvailable(_handle, category, name);
}
/**
* Check if the float 2 sized array metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata FloatVector2 with the given category and name
* is available
* metadata name
* @return true if a metadata FloatVector2 with the given category and name is available
*/
public boolean isMetadataFloatVector2Available(String category, String name) {
return cpIsMetadataFloatVector2Available(_handle, category, name);
}
/**
* Check if the float 3 sized metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata FloatVector3 with the given category and name
* is available
* metadata name
* @return true if a metadata FloatVector3 with the given category and name is available
*/
public boolean isMetadataFloatVector3Available(String category, String name) {
return cpIsMetadataFloatVector3Available(_handle, category, name);
}
/**
* Check if the float 4 sized metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata FloatVector4 with the given category and name
* is available
* metadata name
* @return true if a metadata FloatVector4 with the given category and name is available
*/
public boolean isMetadataFloatVector4Available(String category, String name) {
return cpIsMetadataFloatVector4Available(_handle, category, name);
}
/**
* Check if the double metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata double with the given category and name is
* available
* metadata name
* @return true if a metadata double with the given category and name is available
*/
public boolean isMetadataDoubleAvailable(String category, String name) {
return cpIsMetadataDoubleAvailable(_handle, category, name);
}
/**
* Check if the double 2 sized metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata DoubleVector2 with the given category and name
* is available
* metadata name
* @return true if a metadata DoubleVector2 with the given category and name is available
*/
public boolean isMetadataDoubleVector2Available(String category, String name) {
return cpIsMetadataDoubleVector2Available(_handle, category, name);
}
/**
* Check if the double 3 sized array metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata DoubleVector3 with the given category and name
* is available
* metadata name
* @return true if a metadata DoubleVector3 with the given category and name is available
*/
public boolean isMetadataDoubleVector3Available(String category, String name) {
return cpIsMetadataDoubleVector3Available(_handle, category, name);
}
/**
* Check if the double 4 sized array metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata DoubleVector4 with the given category and name
* is available
* metadata name
* @return true if a metadata DoubleVector4 with the given category and name is available
*/
public boolean isMetadataDoubleVector4Available(String category, String name) {
return cpIsMetadataDoubleVector4Available(_handle, category, name);
}
/**
* Check if the String metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata string with the given category and name is
* available
* metadata name
* @return true if a metadata string with the given category and name is available
*/
public boolean isMetadataStringAvailable(String category, String name) {
return cpIsMetadataStringAvailable(_handle, category, name);
}
/**
* Check if the blob metadata defined by the given category and name is available.
*
* @param category
* metadata category
* @param name
* @return true if a metadata BLOB with the given category and name is
* available
* metadata name
* @return true if a metadata BLOB with the given category and name is available
*/
public boolean isMetadataBLOBAvailable(String category, String name) {
return cpIsMetadataBLOBAvailable(_handle, category, name);
}
/**
* Get int metadata defined by category and name