1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646
|
/*
* Copyright 2007 - 2018 ETH Zuerich, CISD and SIS.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.hdf5;
import java.util.List;
import ch.systemsx.cisd.base.mdarray.MDArray;
/**
* An interface that provides methods for writing compound values to HDF5 files.
* <p>
* Obtain an object implementing this interface by calling {@link IHDF5Writer#compound()}.
*
* @author Bernd Rinn
*/
public interface IHDF5CompoundWriter extends IHDF5CompoundReader
{
// /////////////////////
// Types
// /////////////////////
/**
* Returns the compound type cloned from the given <var>templateType</var>. This method can be
* used to get a compound type from a different file.
*
* @param templateType The compound type to clone. Will typically be a compound type from
* another reader or writer. The type needs to be <i>open</i> (which means that the
* reader / writer from which it has been obtained has to be still open).
*/
public <T> HDF5CompoundType<T> getClonedType(final HDF5CompoundType<T> templateType);
/**
* Returns the anonymous compound type for this HDF5 file, using the default name chosen by
* JHDF5 which is based on the simple name of <var>pojoClass</var>.
*
* @param pojoClass The plain old Java type that corresponds to this HDF5 type.
* @param members The mapping from the Java compound type to the HDF5 type.
*/
public <T> HDF5CompoundType<T> getAnonType(Class<T> pojoClass,
HDF5CompoundMemberMapping... members);
/**
* Returns the anonymous compound type <var>name></var> for this HDF5 file, inferring the
* mapping from the Java compound type to the HDF5 type by reflection.
*
* @param pojoClass The plain old Java type that corresponds to this HDF5 type.
* @param hints The hints to provide to the mapping procedure.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public <T> HDF5CompoundType<T> getInferredAnonType(Class<T> pojoClass,
HDF5CompoundMappingHints hints);
/**
* Returns the anonymous compound type <var>name></var> for this HDF5 file, inferring the
* mapping from the Java compound type to the HDF5 type by reflection.
*
* @param pojoClass The plain old Java type that corresponds to this HDF5 type.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public <T> HDF5CompoundType<T> getInferredAnonType(Class<T> pojoClass);
/**
* Returns anonyous the compound type <var>name></var> for this HDF5 file, inferring the mapping
* from the Java compound type to the HDF5 type by reflection.
*
* @param template The compound to infer the HDF5 compound type from.
* @param hints The hints to provide to the mapping procedure.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public <T> HDF5CompoundType<T> getInferredAnonType(T template, HDF5CompoundMappingHints hints);
/**
* Returns the anonymous compound type for this HDF5 file, inferring the mapping from the Java
* compound type to the HDF5 type by reflection and using the default name chosen by JHDF5 which
* is based on the simple name of <var>T</var>.
*
* @param template The compound to infer the HDF5 compound type from.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public <T> HDF5CompoundType<T> getInferredAnonType(T template);
/**
* Returns the anonymous compound type <var>name></var> for this HDF5 file, inferring the
* mapping from the Java compound type to the HDF5 type by reflection.
*
* @param template The compound array to infer the HDF5 compound type from.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public <T> HDF5CompoundType<T> getInferredAnonType(final T[] template);
/**
* Returns the anonymous compound type <var>name></var> for this HDF5 file, inferring the
* mapping from the Java compound type to the HDF5 type by reflection.
*
* @param template The compound array to infer the HDF5 compound type from.
* @param hints The hints to provide to the mapping procedure.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public <T> HDF5CompoundType<T> getInferredAnonType(T[] template, HDF5CompoundMappingHints hints);
/**
* Returns the anonymous compound type for this HDF5 file, inferring the mapping from the Java
* types of the members.
*
* @param memberNames The names of the members.
* @param template The compound to infer the HDF5 compound type from. Needs to have the same
* length as <var>memberNames</var>.
* @param hints The hints to provide to the mapping procedure.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public HDF5CompoundType<List<?>> getInferredAnonType(List<String> memberNames,
List<?> template, HDF5CompoundMappingHints hints);
/**
* Returns the anonymous compound type for this HDF5 file, inferring the mapping from the Java
* types of the members.
*
* @param memberNames The names of the members.
* @param template The compound to infer the HDF5 compound type from. Needs to have the same
* length as <var>memberNames</var>.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public HDF5CompoundType<List<?>> getInferredAnonType(List<String> memberNames, List<?> template);
/**
* Returns the anonymous compound type for this HDF5 file, inferring the mapping from the Java
* types of the members.
*
* @param memberNames The names of the members.
* @param template The compound to infer the HDF5 compound type from. Needs to have the same
* length than <var>memberNames</var>.
* @param hints The hints to provide to the mapping procedure.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public HDF5CompoundType<Object[]> getInferredAnonType(String[] memberNames, Object[] template,
HDF5CompoundMappingHints hints);
/**
* Returns the anonymous compound type for this HDF5 file, inferring the mapping from the Java
* types of the members.
*
* @param memberNames The names of the members.
* @param template The compound to infer the HDF5 compound type from. Needs to have the same
* length than <var>memberNames</var>.
* @see HDF5CompoundMemberMapping#inferMapping
*/
public HDF5CompoundType<Object[]> getInferredAnonType(String[] memberNames, Object[] template);
// /////////////////////
// Attributes
// /////////////////////
/**
* Sets a compound attribute to the referenced object.
* <p>
* The referenced object must exist, that is it need to have been written before by one of the
* <code>write()</code> methods.
*
* @param objectPath The name of the object to add the attribute to.
* @param attributeName The name of the attribute.
* @param type The type definition of this compound type.
* @param value The value of the attribute. May be a Data Transfer Object, a
* {@link HDF5CompoundDataMap}, {@link HDF5CompoundDataList} or <code>Object[]</code>
* .
*/
public <T> void setAttr(String objectPath, String attributeName, HDF5CompoundType<T> type,
T value);
/**
* Sets a compound attribute to the referenced object.
* <p>
* The referenced object must exist, that is it need to have been written before by one of the
* <code>write()</code> methods.
*
* @param objectPath The name of the object to add the attribute to.
* @param attributeName The name of the attribute.
* @param value The value of the attribute. May be a Data Transfer Object, a
* {@link HDF5CompoundDataMap}, {@link HDF5CompoundDataList} or <code>Object[]</code>
* .
*/
public <T> void setAttr(String objectPath, String attributeName, T value);
/**
* Sets a compound attribute array (of rank 1) to the referenced object.
* <p>
* The referenced object must exist, that is it need to have been written before by one of the
* <code>write()</code> methods.
*
* @param objectPath The name of the object to add the attribute to.
* @param attributeName The name of the attribute.
* @param type The type definition of this compound type.
* @param value The value of the attribute. Data Transfer Object, a {@link HDF5CompoundDataMap},
* {@link HDF5CompoundDataList} or <code>Object[]</code> .
*/
public <T> void setArrayAttr(String objectPath, String attributeName, HDF5CompoundType<T> type,
T[] value);
/**
* Sets a compound attribute array (of rank 1) to the referenced object.
* <p>
* The referenced object must exist, that is it need to have been written before by one of the
* <code>write()</code> methods.
*
* @param objectPath The name of the object to add the attribute to.
* @param attributeName The name of the attribute.
* @param value The value of the attribute. May be a Data Transfer Object, a
* {@link HDF5CompoundDataMap}, {@link HDF5CompoundDataList} or <code>Object[]</code>
* .
*/
public <T> void setArrayAttr(String objectPath, String attributeName, T[] value);
/**
* Sets a compound attribute array (of rank N) to the referenced object.
* <p>
* The referenced object must exist, that is it need to have been written before by one of the
* <code>write()</code> methods.
*
* @param objectPath The name of the object to add the attribute to.
* @param attributeName The name of the attribute.
* @param type The type definition of this compound type.
* @param value The value of the attribute. Data Transfer Object, a {@link HDF5CompoundDataMap},
* {@link HDF5CompoundDataList} or <code>Object[]</code> .
*/
public <T> void setMDArrayAttr(String objectPath, String attributeName,
HDF5CompoundType<T> type, MDArray<T> value);
/**
* Sets a compound attribute array (of rank N) to the referenced object.
* <p>
* The referenced object must exist, that is it need to have been written before by one of the
* <code>write()</code> methods.
*
* @param objectPath The name of the object to add the attribute to.
* @param attributeName The name of the attribute.
* @param value The value of the attribute. May be a Data Transfer Object, a
* {@link HDF5CompoundDataMap}, {@link HDF5CompoundDataList} or <code>Object[]</code>
* .
*/
public <T> void setMDArrayAttr(String objectPath, String attributeName, MDArray<T> value);
// /////////////////////
// Data Sets
// /////////////////////
/**
* Writes out a compound value of <var>type</var> given in <var>data</var>.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
*/
public <T> void write(String objectPath, HDF5CompoundType<T> type, T data);
/**
* Writes out a compound value. The type is inferred based on the values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param data The value of the data set. May be a pojo (Data Transfer Object), a
* {@link HDF5CompoundDataMap}, {@link HDF5CompoundDataList} or <code>Object[]</code>
* .
* @see CompoundType
* @see CompoundElement
*/
public <T> void write(String objectPath, T data);
/**
* Writes out an array (of rank 1) of compound values. Uses a compact storage layout. Must only
* be used for small data sets.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
* @param inspectorOrNull The inspector to be called after translating the Java objects to a
* byte array and before writing the byte array to the HDF5 file.
*/
public <T> void write(String objectPath, HDF5CompoundType<T> type, T data,
IByteArrayInspector inspectorOrNull);
/**
* Writes out an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
*/
public <T> void writeArray(String objectPath, HDF5CompoundType<T> type, T[] data);
/**
* Writes out an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
* @param features The storage features of the data set.
*/
public <T> void writeArray(String objectPath, HDF5CompoundType<T> type, T[] data,
HDF5GenericStorageFeatures features);
/**
* Writes out an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
* @param features The storage features of the data set.
* @param inspectorOrNull The inspector to be called after translating the Java objects to a
* byte array and before writing the byte array to the HDF5 file.
*/
public <T> void writeArray(String objectPath, HDF5CompoundType<T> type, T[] data,
HDF5GenericStorageFeatures features, IByteArrayInspector inspectorOrNull);
/**
* Writes out an array (of rank 1) of compound values. The type is inferred based on the values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param data The value of the data set. May be a pojo (Data Transfer Object), a
* {@link HDF5CompoundDataMap}, {@link HDF5CompoundDataList} or <code>Object[]</code>
* .
* @see CompoundType
* @see CompoundElement
*/
public <T> void writeArray(String objectPath, T[] data);
/**
* Writes out an array (of rank 1) of compound values. The type is inferred based on the values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param data The value of the data set. May be a {@link HDF5CompoundDataMap},
* {@link HDF5CompoundDataList} or <code>Object[]</code>.
* @param features The storage features of the data set.
* @see CompoundType
* @see CompoundElement
*/
public <T> void writeArray(String objectPath, T[] data, HDF5GenericStorageFeatures features);
/**
* Writes out a block <var>blockNumber</var> of an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
* @param blockNumber The number of the block to write.
*/
public <T> void writeArrayBlock(String objectPath, HDF5CompoundType<T> type, T[] data,
long blockNumber);
/**
* Writes out a block <var>blockNumber</var> of an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
* @param blockNumber The number of the block to write.
* @param inspectorOrNull The inspector to be called after translating the Java objects to a
* byte array and before writing the byte array to the HDF5 file.
*/
public <T> void writeArrayBlock(String objectPath, HDF5CompoundType<T> type, T[] data,
long blockNumber, IByteArrayInspector inspectorOrNull);
/**
* Writes out a block of an array (of rank 1) of compound values with given <var>offset</var>.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
* @param offset The offset of the block in the data set.
*/
public <T> void writeArrayBlockWithOffset(String objectPath, HDF5CompoundType<T> type,
T[] data, long offset);
/**
* Writes out a block of an array (of rank 1) of compound values with given <var>offset</var>.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The value of the data set.
* @param offset The offset of the block in the data set.
* @param inspectorOrNull The inspector to be called after translating the Java objects to a
* byte array and before writing the byte array to the HDF5 file.
*/
public <T> void writeArrayBlockWithOffset(String objectPath, HDF5CompoundType<T> type,
T[] data, long offset, IByteArrayInspector inspectorOrNull);
/**
* Creates an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param size The size of the array to create. This will be the total size for non-extendable
* data sets and the size of one chunk for extendable (chunked) data sets. For
* extendable data sets the initial size of the array will be 0, see
* {@link ch.systemsx.cisd.hdf5.IHDF5WriterConfigurator#dontUseExtendableDataTypes}.
*/
public <T> void createArray(String objectPath, HDF5CompoundType<T> type, int size);
/**
* Creates an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param size The size of the compound array to create.
* @param blockSize The size of one block (for block-wise IO). Ignored if no extendable data
* sets are used (see {@link IHDF5WriterConfigurator#dontUseExtendableDataTypes()})
* and <code>deflate == false</code>.
*/
public <T> void createArray(String objectPath, HDF5CompoundType<T> type, long size,
int blockSize);
/**
* Creates an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param size The size of the compound array to create.
* @param blockSize The size of one block (for block-wise IO). Ignored if no extendable data
* sets are used (see {@link IHDF5WriterConfigurator#dontUseExtendableDataTypes()})
* and <code>deflate == false</code>.
* @param features The storage features of the data set.
*/
public <T> void createArray(String objectPath, HDF5CompoundType<T> type, long size,
int blockSize, HDF5GenericStorageFeatures features);
/**
* Creates an array (of rank 1) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param size The size of the byte array to create. This will be the total size for
* non-extendable data sets and the size of one chunk for extendable (chunked) data
* sets. For extendable data sets the initial size of the array will be 0, see
* {@link HDF5GenericStorageFeatures}.
* @param features The storage features of the data set.
*/
public <T> void createArray(String objectPath, HDF5CompoundType<T> type, long size,
HDF5GenericStorageFeatures features);
/**
* Writes out an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
*/
public <T> void writeMDArray(String objectPath, HDF5CompoundType<T> type, MDArray<T> data);
/**
* Writes out an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
* @param features The storage features of the data set.
*/
public <T> void writeMDArray(String objectPath, HDF5CompoundType<T> type, MDArray<T> data,
HDF5GenericStorageFeatures features);
/**
* Writes out an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
* @param features The storage features of the data set.
* @param inspectorOrNull The inspector to be called after translating the Java objects to a
* byte array and before writing the byte array to the HDF5.
*/
public <T> void writeMDArray(String objectPath, HDF5CompoundType<T> type, MDArray<T> data,
HDF5GenericStorageFeatures features, IByteArrayInspector inspectorOrNull);
/**
* Writes out an array (of rank N) of compound values. The type is inferred based on the values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param data The value of the data set. May be a pojo (Data Transfer Object), a
* {@link HDF5CompoundDataMap}, {@link HDF5CompoundDataList} or <code>Object[]</code>
* .
* @see CompoundType
* @see CompoundElement
*/
public <T> void writeMDArray(String objectPath, MDArray<T> data);
/**
* Writes out an array (of rank N) of compound values. The type is inferred based on the values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param data The value of the data set. May be a pojo (Data Transfer Object), a
* {@link HDF5CompoundDataMap}, {@link HDF5CompoundDataList} or <code>Object[]</code>
* .
* @param features The storage features of the data set.
* @see CompoundType
* @see CompoundElement
*/
public <T> void writeMDArray(String objectPath, MDArray<T> data,
HDF5GenericStorageFeatures features);
/**
* Writes out a block of an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
* @param blockNumber The block number in each dimension (offset: multiply with the extend in
* the according dimension).
*/
public <T> void writeMDArrayBlock(String objectPath, HDF5CompoundType<T> type, MDArray<T> data,
long[] blockNumber);
/**
* Writes out a block of an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
* @param blockNumber The extent of the block to write on each axis.
* @param inspectorOrNull The inspector to be called after translating the Java objects to a
* byte array and before writing the byte array to the HDF5.
*/
public <T> void writeMDArrayBlock(String objectPath, HDF5CompoundType<T> type, MDArray<T> data,
long[] blockNumber, IByteArrayInspector inspectorOrNull);
/**
* Writes out a block of an array (of rank N) of compound values give a given <var>offset</var>.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
* @param offset The offset of the block to write on each axis.
*/
public <T> void writeMDArrayBlockWithOffset(String objectPath, HDF5CompoundType<T> type,
MDArray<T> data, long[] offset);
/**
* Writes out a block of an array (of rank N) of compound values give a given <var>offset</var>.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
* @param offset The offset of the block to write on each axis.
* @param inspectorOrNull The inspector to be called after translating the Java objects to a
* byte array and before writing the byte array to the HDF5.
*/
public <T> void writeMDArrayBlockWithOffset(String objectPath, HDF5CompoundType<T> type,
MDArray<T> data, long[] offset, IByteArrayInspector inspectorOrNull);
/**
* Writes out a block of an array (of rank N) of compound values give a given <var>offset</var>.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
* @param blockDimensions The dimensions of the block to write to the data set.
* @param offset The offset of the block in the data set to start writing to in each dimension.
* @param memoryOffset The offset of the block in the <var>data</var> array.
*/
public <T> void writeMDArrayBlockWithOffset(String objectPath, HDF5CompoundType<T> type,
MDArray<T> data, int[] blockDimensions, long[] offset, int[] memoryOffset);
/**
* Writes out a block of an array (of rank N) of compound values give a given <var>offset</var>.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param data The data to write.
* @param blockDimensions The dimensions of the block to write to the data set.
* @param offset The offset of the block in the data set to start writing to in each dimension.
* @param memoryOffset The offset of the block in the <var>data</var> array.
* @param inspectorOrNull The inspector to be called after translating the Java objects to a
* byte array and before writing the byte array to the HDF5.
*/
public <T> void writeMDArrayBlockWithOffset(String objectPath, HDF5CompoundType<T> type,
MDArray<T> data, int[] blockDimensions, long[] offset, int[] memoryOffset,
IByteArrayInspector inspectorOrNull);
/**
* Creates an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param dimensions The dimensions of the compound array to create. This will be the total
* dimensions for non-extendable data sets and the dimensions of one chunk (along
* each axis) for extendable (chunked) data sets. For extendable data sets the
* initial size of the array (along each axis) will be 0, see
* {@link ch.systemsx.cisd.hdf5.IHDF5WriterConfigurator#dontUseExtendableDataTypes}.
*/
public <T> void createMDArray(String objectPath, HDF5CompoundType<T> type, int[] dimensions);
/**
* Creates an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param dimensions The extent of the compound array along each of the axis.
* @param blockDimensions The extent of one block along each of the axis. (for block-wise IO).
* Ignored if no extendable data sets are used (see
* {@link IHDF5WriterConfigurator#dontUseExtendableDataTypes()}) and
* <code>deflate == false</code>.
*/
public <T> void createMDArray(String objectPath, HDF5CompoundType<T> type, long[] dimensions,
int[] blockDimensions);
/**
* Creates an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param dimensions The extent of the compound array along each of the axis.
* @param blockDimensions The extent of one block along each of the axis. (for block-wise IO).
* Ignored if no extendable data sets are used (see
* {@link IHDF5WriterConfigurator#dontUseExtendableDataTypes()}) and
* <code>deflate == false</code>.
* @param features The storage features of the data set.
*/
public <T> void createMDArray(String objectPath, HDF5CompoundType<T> type, long[] dimensions,
int[] blockDimensions, HDF5GenericStorageFeatures features);
/**
* Creates an array (of rank N) of compound values.
*
* @param objectPath The name (including path information) of the data set object in the file.
* @param type The type definition of this compound type.
* @param dimensions The dimensions of the byte array to create. This will be the total
* dimensions for non-extendable data sets and the dimensions of one chunk (along
* each axis) for extendable (chunked) data sets. For extendable data sets the
* initial size of the array (along each axis) will be 0, see
* {@link HDF5GenericStorageFeatures}.
* @param features The storage features of the data set.
*/
public <T> void createMDArray(String objectPath, HDF5CompoundType<T> type, int[] dimensions,
HDF5GenericStorageFeatures features);
}
|