1 package nom.tam.fits.compression.provider.param.api;
2
3 import nom.tam.fits.Header;
4 import nom.tam.fits.HeaderCardException;
5
6 /*
7 * #%L
8 * nom.tam FITS library
9 * %%
10 * Copyright (C) 1996 - 2024 nom-tam-fits
11 * %%
12 * This is free and unencumbered software released into the public domain.
13 *
14 * Anyone is free to copy, modify, publish, use, compile, sell, or
15 * distribute this software, either in source code form or as a compiled
16 * binary, for any purpose, commercial or non-commercial, and by any
17 * means.
18 *
19 * In jurisdictions that recognize copyright laws, the author or authors
20 * of this software dedicate any and all copyright interest in the
21 * software to the public domain. We make this dedication for the benefit
22 * of the public at large and to the detriment of our heirs and
23 * successors. We intend this dedication to be an overt act of
24 * relinquishment in perpetuity of all present and future rights to this
25 * software under copyright law.
26 *
27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
30 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
31 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
32 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
33 * OTHER DEALINGS IN THE SOFTWARE.
34 * #L%
35 */
36
37 /**
38 * (<i>for internal use</i>) Compression parameter that must be stored along the header meta data of the hdu.
39 */
40 public interface ICompressHeaderParameter extends ICompressParameter {
41
42 /**
43 * get the value from the header and set it in the compression option.
44 *
45 * @param header the header of the hdu
46 *
47 * @deprecated Use {@link #getValueFromHeader(Header)} instead.
48 */
49 default void getValueFromHeader(IHeaderAccess header) {
50 getValueFromHeader(header.getHeader());
51 }
52
53 /**
54 * Get the parameter value from the option and set it into the fits header.
55 *
56 * @param header the header to add the parameter.
57 *
58 * @deprecated Use {@link #setValueInHeader(Header)} instead
59 */
60 default void setValueInHeader(IHeaderAccess header) {
61 setValueInHeader(header.getHeader());
62 }
63
64 /**
65 * get the value from the header and set it in the compression option.
66 *
67 * @param header the header of the hdu
68 *
69 * @throws HeaderCardException if there was a problem accessing the header
70 */
71 void getValueFromHeader(Header header) throws HeaderCardException;
72
73 /**
74 * Get the parameter value from the option and set it into the fits header.
75 *
76 * @param header the header to add the parameter.
77 *
78 * @throws HeaderCardException if there was a problem accessing the header
79 */
80 void setValueInHeader(Header header) throws HeaderCardException;
81 }