-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pull/42' into feature-sigmet-model
- Loading branch information
Showing
60 changed files
with
2,798 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/fi/fmi/avi/converter/json/AIRMETJSONParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package fi.fmi.avi.converter.json; | ||
|
||
import fi.fmi.avi.converter.AviMessageSpecificConverter; | ||
import fi.fmi.avi.converter.ConversionHints; | ||
import fi.fmi.avi.converter.ConversionResult; | ||
import fi.fmi.avi.model.sigmet.AIRMET; | ||
import fi.fmi.avi.model.sigmet.immutable.AIRMETImpl; | ||
|
||
/** | ||
* A simple wrapper to specialize {@link AbstractJSONParser} for SIGMET. | ||
*/ | ||
public class AIRMETJSONParser extends AbstractJSONParser implements AviMessageSpecificConverter<String, AIRMET> { | ||
|
||
/** | ||
* Converts a JSON TAF message into TAF Object. | ||
* | ||
* @param input input message | ||
* @param hints parsing hints | ||
* @return the {@link ConversionResult} with the converter message and the possible conversion issues | ||
*/ | ||
@Override | ||
public ConversionResult<AIRMET> convertMessage(String input, ConversionHints hints) { | ||
return doConvertMessage(input, AIRMET.class, AIRMETImpl.class, hints); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/fi/fmi/avi/converter/json/AIRMETJSONSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package fi.fmi.avi.converter.json; | ||
|
||
import fi.fmi.avi.converter.AviMessageSpecificConverter; | ||
import fi.fmi.avi.converter.ConversionHints; | ||
import fi.fmi.avi.converter.ConversionResult; | ||
import fi.fmi.avi.model.sigmet.AIRMET; | ||
|
||
/** | ||
* A simple wrapper to specialize {@link AbstractJSONSerializer} for SIGMET. | ||
*/ | ||
public class AIRMETJSONSerializer extends AbstractJSONSerializer implements AviMessageSpecificConverter<AIRMET, String> { | ||
|
||
/** | ||
* Converts a SIGMET object into JSON. | ||
* | ||
* @param input input message | ||
* @param hints parsing hints | ||
* @return the {@link ConversionResult} with the converter message and the possible conversion issues | ||
*/ | ||
@Override | ||
public ConversionResult<String> convertMessage(AIRMET input, ConversionHints hints) { | ||
return doConvertMessage(input, hints); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package fi.fmi.avi.model; | ||
|
||
import java.util.Optional; | ||
|
||
public interface Airspace { | ||
public enum AirspaceType { | ||
FIR, | ||
UIR, | ||
FIR_UIR, | ||
CTA | ||
} | ||
AirspaceType getType(); | ||
Optional<Integer> getPart(); | ||
String getName(); | ||
String getDesignator(); | ||
} |
Oops, something went wrong.