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 @Deprecated
50 default void getValueFromHeader(IHeaderAccess header) {
51 getValueFromHeader(header.getHeader());
52 }
53
54 /**
55 * Get the parameter value from the option and set it into the fits header.
56 *
57 * @param header the header to add the parameter.
58 *
59 * @deprecated Use {@link #setValueInHeader(Header)} instead
60 */
61 @Deprecated
62 default void setValueInHeader(IHeaderAccess header) {
63 setValueInHeader(header.getHeader());
64 }
65
66 /**
67 * get the value from the header and set it in the compression option.
68 *
69 * @param header the header of the hdu
70 *
71 * @throws HeaderCardException if there was a problem accessing the header
72 */
73 void getValueFromHeader(Header header) throws HeaderCardException;
74
75 /**
76 * Get the parameter value from the option and set it into the fits header.
77 *
78 * @param header the header to add the parameter.
79 *
80 * @throws HeaderCardException if there was a problem accessing the header
81 */
82 void setValueInHeader(Header header) throws HeaderCardException;
83 }