You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in #16 and #68 there is need to make the hierarch output more flexible.
I propose:
FitsFacory.setHierarchyFormat("123");
This means that the space between HIERARCH and the first key is filled with the characters "12" and the rest of the keywords separated by "3". So the last cha is used as key separator and the rest as preffix to the HIERARCH key.
The text was updated successfully, but these errors were encountered:
I opted for the full dynamic solution now there is an interface IHierarchKeyFormatter that the user can implement and format the header keys to there wishes. There are tree default implementations, see the unit test:
publicvoidtestHierarchAlternatives() throwsHeaderCardException {
FitsFactory.setUseHierarch(true);
// not realy nessesary because the default:FitsFactory.setHierarchFormater(newStandardIHierarchKeyFormatter());
HeaderCardheaderCard = newHeaderCard("HIERARCH.TEST1.TEST2.TEST3.TEST4.TEST5.TEST6", "xy", null);
assertEquals("HIERARCH.TEST1.TEST2.TEST3.TEST4.TEST5.TEST6", headerCard.getKey());
assertEquals("HIERARCH TEST1 TEST2 TEST3 TEST4 TEST5 TEST6= 'xy' ", headerCard.toString());
// now the formatter with all dotsFitsFactory.setHierarchFormater(newBlanksDotHierarchKeyFormatter(1));
assertEquals("HIERARCH.TEST1.TEST2.TEST3.TEST4.TEST5.TEST6", headerCard.getKey());
assertEquals("HIERARCH TEST1.TEST2.TEST3.TEST4.TEST5.TEST6= 'xy' ", headerCard.toString());
// now the formatter with first 2 blanks and then dotsFitsFactory.setHierarchFormater(newBlanksDotHierarchKeyFormatter(2));
assertEquals("HIERARCH.TEST1.TEST2.TEST3.TEST4.TEST5.TEST6", headerCard.getKey());
assertEquals("HIERARCH TEST1.TEST2.TEST3.TEST4.TEST5.TEST6= 'xy' ", headerCard.toString());
}
As discussed in #16 and #68 there is need to make the hierarch output more flexible.
I propose:
This means that the space between HIERARCH and the first key is filled with the characters "12" and the rest of the keywords separated by "3". So the last cha is used as key separator and the rest as preffix to the HIERARCH key.
The text was updated successfully, but these errors were encountered: