Skip to content

Commit

Permalink
Bug fixing v 1.6.0 rc7 (#38)
Browse files Browse the repository at this point in the history
* Fix hints about versions

* Fix constellation selection

* Fix #18 load old data

* Remove mandatory constraint for observation results
  • Loading branch information
capape authored Feb 7, 2023
1 parent baace71 commit 01899f8
Show file tree
Hide file tree
Showing 40 changed files with 97 additions and 1,961 deletions.
2 changes: 1 addition & 1 deletion observation-manager/deepsky-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>observation-manager</artifactId>
<groupId>de.lehmannet.om</groupId>
<version>1.6.0-RC8-SNAPSHOT</version>
<version>1.6.0-RC8</version>
</parent>

<groupId>de.lehmannet.om</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public class DeepSkyFinding extends Finding {
// Constructors ------------------------------------------------------
// ------------

DeepSkyFinding(Node findingElement) throws SchemaException {
public DeepSkyFinding(Node findingElement) throws SchemaException {

super(findingElement);

Expand Down
2 changes: 1 addition & 1 deletion observation-manager/imager-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>observation-manager</artifactId>
<groupId>de.lehmannet.om</groupId>
<version>1.6.0-RC8-SNAPSHOT</version>
<version>1.6.0-RC8</version>
</parent>

<groupId>de.lehmannet.om</groupId>
Expand Down
2 changes: 1 addition & 1 deletion observation-manager/observation-manager-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>observation-manager</artifactId>
<groupId>de.lehmannet.om</groupId>
<version>1.6.0-RC8-SNAPSHOT</version>
<version>1.6.0-RC8</version>
</parent>

<groupId>de.lehmannet.om</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,12 @@ public class ConstellationBox extends JComboBox<String> {

private static final String EMPTY_ENTRY = "----";

private static final Constellation[] cache = new Constellation[] { Constellation.ANDROMEDA, Constellation.ANTLIA,
Constellation.APUS, Constellation.AQUARIUS, Constellation.AQUILA, Constellation.ARA, Constellation.ARIES,
Constellation.AURIGA, Constellation.BOOTES, Constellation.CAELUM, Constellation.CAMELOPARDALIS,
Constellation.CANCER, Constellation.CANES_VENATICI, Constellation.CANIS_MAIOR, Constellation.CANIS_MINOR,
Constellation.CAPRICORNUS, Constellation.CARINA, Constellation.CASSIOPEIA, Constellation.CENTAURUS,
Constellation.CEPHEUS, Constellation.CETUS, Constellation.CHAMAELEON, Constellation.CIRCINUS,
Constellation.COLUMBA, Constellation.COMA_BERENICES, Constellation.CORONA_AUSTRALIS,
Constellation.CORONA_BOREALIS, Constellation.CORVUS, Constellation.CRATER, Constellation.CRUX,
Constellation.CYGNUS, Constellation.DELPHINUS, Constellation.DORADO, Constellation.DRACO,
Constellation.EQUULEUS, Constellation.ERIDANUS, Constellation.FORNAX, Constellation.GEMINI,
Constellation.GRUS, Constellation.HERCULES, Constellation.HOROLOGIUM, Constellation.HYDRA,
Constellation.HYDRUS, Constellation.INDUS, Constellation.LACERTA, Constellation.LEO,
Constellation.LEO_MINOR, Constellation.LEPUS, Constellation.LIBRA, Constellation.LUPUS, Constellation.LYNX,
Constellation.LYRA, Constellation.MENSA, Constellation.MICROSCOPUS, Constellation.MONOCERUS,
Constellation.MUSCA, Constellation.NORMA, Constellation.OCTANS, Constellation.OPHIUCHUS,
Constellation.ORION, Constellation.PAVO, Constellation.PEGASUS, Constellation.PERSEUS,
Constellation.PHOENIX, Constellation.PICTOR, Constellation.PISCES_AUSTRINUS, Constellation.PISCES,
Constellation.PUPPIS, Constellation.PYXIS, Constellation.RETICULUM, Constellation.SAGITTA,
Constellation.SAGITTARIUS, Constellation.SCORPIUS, Constellation.SCULPTOR, Constellation.SCUTUM,
Constellation.SERPENS, Constellation.SEXTANS, Constellation.TAURUS, Constellation.TELESCOPIUM,
Constellation.TRIANGULUM_AUSTRALIS, Constellation.TRIANGULUM, Constellation.TUCANA,
Constellation.URSA_MAIOR, Constellation.URSA_MINOR, Constellation.VELA, Constellation.VIRGO,
Constellation.VOLANS, Constellation.VULPECULA };

public ConstellationBox(boolean useI18Nnames) {

this.addEmptyItem();

for (int i = 0; i < ConstellationBox.cache.length; i++) {
this.addItem(ConstellationBox.cache[i].name());
for (Constellation c : Constellation.values()) {
this.addItem(c.name());
}

if (useI18Nnames) {
Expand All @@ -68,67 +44,22 @@ public Constellation getSelectedConstellation() {
if (ConstellationBox.EMPTY_ENTRY.equals(cons)) {
return null;
} else {
return Constellation.getConstellationByAbbOrName(cons);
return Constellation.valueOf(cons);
}

}

/*
* public String getSelectedConstellationAbbreviation() {
*
* Object cons = this.getSelectedItem(); if( ConstellationBox.EMPTY_ENTRY.equals(cons) ) { return null; } else {
* return ((Constellation)cons).getAbbreviation(); }
*
* }
*/

public void setSelectedConstellation(Constellation constellation) {

if (constellation == null) {
this.selectEmptyItem();
return;
}

for (int i = 0; i < ConstellationBox.cache.length; i++) {
if (ConstellationBox.cache[i].equals(constellation)) {
this.setSelectedItem(ConstellationBox.cache[i]);
return;
}
}

// Abbreviation not found
this.selectEmptyItem();
this.setSelectedItem(constellation.name());

}

/*
* public static String getAbbreviation(String name) {
*
* if( (name == null) || ("".equals(name.trim())) ) { return null; }
*
* for(int i=0; i < ConstellationBox.cache.length; i++) { if(
* ConstellationBox.cache[i].getName().toLowerCase().trim().equals(name. toLowerCase().trim()) ) { return
* ConstellationBox.cache[i].getAbbreviation(); } }
*
* return null;
*
* }
*/

/*
* public static String getConstellationName(String abbreviation) {
*
* if( (abbreviation == null) || ("".equals(abbreviation.trim())) ) { return null; }
*
* for(int i=0; i < ConstellationBox.cache.length; i++) { if(
* ConstellationBox.cache[i].getAbbreviation().equals(abbreviation) ) { return ConstellationBox.cache[i].getName();
* } }
*
* return null;
*
* }
*/

private void selectEmptyItem() {

this.setSelectedItem(ConstellationBox.EMPTY_ENTRY);
Expand Down
2 changes: 1 addition & 1 deletion observation-manager/observation-manager-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>observation-manager</artifactId>
<groupId>de.lehmannet.om</groupId>
<version>1.6.0-RC8-SNAPSHOT</version>
<version>1.6.0-RC8</version>
</parent>
<properties>
<eap.fits.version>1.3</eap.fits.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.Locale;

import javax.xml.transform.Templates;
Expand Down Expand Up @@ -66,18 +67,7 @@ public void run() {

DOMSource source = new DOMSource(doc);

File xsl = (xslFile == null) ? ObservationManagerHtmlHelper.this.getXSLFile() : xslFile;

// Get XSL Template
if (xsl == null) { // Cannot load XSL file. Error message was
// already given

returnValue = Worker.RETURN_TYPE_ERROR;
message = textManager.getString("error.transformation");
return;

}
StreamSource xslSource = new StreamSource(xsl);
StreamSource xslSource = getXslStreamSource(xslFile);

StreamResult result = null;
FileOutputStream outputStream = null;
Expand Down Expand Up @@ -128,6 +118,30 @@ public void run() {

}

private StreamSource getXslStreamSource(final File xslFile) {

File xsl = (xslFile == null) ? ObservationManagerHtmlHelper.this.getXSLFile() : xslFile;

StreamSource xslSource;
// Get XSL Template
if (xsl == null) { // Cannot load XSL file. Error message was
// already given

/*
* returnValue = Worker.RETURN_TYPE_ERROR; message = textManager.getString("error.transformation");
* return;
*/

URL resource = ObservationManagerHtmlHelper.class.getClassLoader()
.getResource("xsl/oal2html/transform_en.xsl");
xslSource = new StreamSource(resource.toExternalForm());

} else {
xslSource = new StreamSource(xsl);
}
return xslSource;
}

@Override
public String getReturnMessage() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void actionPerformed(ActionEvent e) {
if (source.equals(this.close)) {
this.dispose();
} else if (source.equals(this.download)) {
List downloadList = ((UpdateTableModel) this.infoTable.getModel()).getSelected();
List<UpdateEntry> downloadList = ((UpdateTableModel) this.infoTable.getModel()).getSelected();
if ((downloadList != null) && !(downloadList.isEmpty())) {

// ---------- Where to save the files?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Observation Manager l\u00e4uft mit allen Java Laufzeitumgebungen (JRE)
ab Version 1.4. Damit ist Observation Manager auf sehr vielen Plattformen
ab version 8. Damit ist Observation Manager auf sehr vielen Plattformen
lauff\u00e4hig wie z.B. Mircosoft Windows, Unix, Linux, MacOS und viele andere mehr.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Observation Manager only requires a Java Runtime Environment (JRE) version 1.4 or above.
Observation Manager only requires a Java Runtime Environment (JRE) version 8 or above.
That enables Observation Manager to run on many platforms like Microsoft Windows, Unix,
Linux, MacOS and many many more.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Observation Manager s\u00f3lo necesita el Java Runtime Environment (JRE) versi\u00f3n 1.4 o superior.
Observation Manager s\u00f3lo necesita el Java Runtime Environment (JRE) versi\u00f3n 8 o superior.
Esto permite a Observation Manager funcionar en m\u00faltiples plataformas como Windows, Unix,
Linux, MacOS y muchos m\u00e1s.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Observation Manager tarvitsee toimiakseen Java Runtime Environment (JRE) version 1.4 tai korkeamman.
Observation Manager tarvitsee toimiakseen Java Runtime Environment (JRE) version 8 tai korkeamman.
Java mahdollistaa Observation Managerin ajamisen monilla eri alustoilla, kuten
Microsoft Windows, Linux, MacOS ja vaikka kuinka monella muulla.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Observation Manager requiert seulement un environnement d'ex\u00e9cution Java (JRE) version 1.4 ou sup\u00e9rieur.
Observation Manager requiert seulement un environnement d'ex\u00e9cution Java (JRE) version 8 ou sup\u00e9rieur.
Cela permet le fonctionnement d'Observation Manager sur plusieurs plates-formes comme Microsoft Windows, Unix,
Linux, MacOS et bien d'autres.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Observation Manager richiede solo Java Runtime Environment (JRE) versione 1.4 o superiore.
Observation Manager richiede solo Java Runtime Environment (JRE) versione 8 o superiore.
Questo abilita Observation Manager a girare su molte piattaforme come Microsoft Windows, Unix,
Linux, MacOS e molte altre.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Observation Manager heeft enkel behoefte aan een Java Runtime Environment (JRE) versie 1.4
Observation Manager heeft enkel behoefte aan een Java Runtime Environment (JRE) versie 8
of hoger.
Dit maakt het mogelijk om Observation Manager op een scala aan platforms te draaien, zoals
Microsoft Windows, Unix, Linux, MacOS en vele vele andere.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
Program Observation Manager wymaga Java Runtime Environment (JRE) version 1.4 lub nowszej. Dzi\u0119ki temu Observation Manager mo\u017ce pracowa\u0107 na wielu platformach: Microsoft Windows, Unix, Linux, MacOS i na wielu innych.
Program Observation Manager wymaga Java Runtime Environment (JRE) version 8 lub nowszej. Dzi\u0119ki temu Observation Manager mo\u017ce pracowa\u0107 na wielu platformach: Microsoft Windows, Unix, Linux, MacOS i na wielu innych.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
O Observation Manager s\ufffd precisa de uma vers\ufffdo 1.4 ou mais nova do Java Runtime Environment (JRE).
O Observation Manager s\ufffd precisa de uma vers\ufffdo 8 ou mais nova do Java Runtime Environment (JRE).
Isso possibilita que o Observation Manager rode em muitas plataformas como Windows, Unix,
Linux, Mac e muitas outras.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"\u041C\u0435\u043D\u0435\u0434\u0436\u0435\u0440 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0439" \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043F\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044F \u0442\u043E\u043B\u044C\u043A\u043E
Java Runtime Environment (JRE) \u0432\u0435\u0440\u0441\u0438\u0438 1.4 \u0438\u043B\u0438 \u043D\u043E\u0432\u0435\u0435.
Java Runtime Environment (JRE) \u0432\u0435\u0440\u0441\u0438\u0438 8 \u0438\u043B\u0438 \u043D\u043E\u0432\u0435\u0435.
\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u044F \u044D\u0442\u043E\u043C\u0443, \u043E\u043D \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \u043C\u043D\u043E\u0433\u0438\u0445 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430\u0445, \u0432\u043A\u043B\u044E\u0447\u0430\u044F Microsoft Windows, Unix,
Linux, MacOS \u0438 \u0434\u0440\u0443\u0433\u0438\u0445.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"\u041C\u0435\u043D\u0435\u0434\u0436\u0435\u0440 \u0441\u043F\u043E\u0441\u0442\u0435\u0440\u0435\u0436\u0435\u043D\u044C" \u0432\u0438\u043C\u0430\u0433\u0430\u0454 \u043D\u0430\u044F\u0432\u043D\u0456\u0441\u0442\u044C \u043B\u0438\u0448\u0435 Java Runtime Environment (JRE) \u0432\u0435\u0440\u0441\u0456\u0457 1.4 \u0430\u0431\u043E \u043D\u043E\u0432\u0456\u0448\u0435.
"\u041C\u0435\u043D\u0435\u0434\u0436\u0435\u0440 \u0441\u043F\u043E\u0441\u0442\u0435\u0440\u0435\u0436\u0435\u043D\u044C" \u0432\u0438\u043C\u0430\u0433\u0430\u0454 \u043D\u0430\u044F\u0432\u043D\u0456\u0441\u0442\u044C \u043B\u0438\u0448\u0435 Java Runtime Environment (JRE) \u0432\u0435\u0440\u0441\u0456\u0457 8 \u0430\u0431\u043E \u043D\u043E\u0432\u0456\u0448\u0435.
\u0417\u0430\u0432\u0434\u044F\u043A\u0438 \u0446\u044C\u043E\u043C\u0443 \u0432\u0456\u043D \u043C\u043E\u0436\u0435 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438\u0441\u044C \u043D\u0430 \u0431\u0430\u0433\u0430\u0442\u044C\u043E\u0445 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430\u0445, \u044F\u043A \u0442\u043E Microsoft Windows, Unix,
Linux, MacOS \u0442\u0430 \u0431\u0430\u0433\u0430\u0442\u043E \u0456\u043D\u0448\u0438\u0445.

This file was deleted.

Loading

0 comments on commit 01899f8

Please sign in to comment.