package com.github.openais.message;

import java.util.LinkedHashMap;
import java.util.Map;

public enum NavigationStatus {

	UNDERWAY_USING_ENGINE(0),

	AT_ANCHOR(1),

	NOT_UNDER_COMMAND(2),

	RESTRICTED_MANEUVERABILITY(3),

	CONSTRAINED_BY_HER_DRAUGHT(4),

	MOORED(5),

	NOT_DEFINED();

	private final int value;

	private final static int NOT_DEFINED_VALUE = 15;

	NavigationStatus() {
		this.value = NOT_DEFINED_VALUE;
	}

	NavigationStatus(int value) {
		this.value = value;
	}

	public static NavigationStatus parse(int value) {
		final Map<Integer, NavigationStatus> map = new LinkedHashMap<Integer, NavigationStatus>();
		map.put(1, AT_ANCHOR);
		map.put(2, NOT_UNDER_COMMAND);
		map.put(3, RESTRICTED_MANEUVERABILITY);
		map.put(4, CONSTRAINED_BY_HER_DRAUGHT);
		map.put(5, MOORED);
		final NavigationStatus navigationStatus = map.get(value);
		if (navigationStatus == null) {
			return NOT_DEFINED;
		} else {
			return navigationStatus;
		}
	}

	public int getValue() {
		return value;
	}

}
@@ -260,24 +260,163 @@
 MOORED(5),%0A%0A
+%09// TODO: complete the items to number 14%0A%09// TODO: refer to%0A%09// http://catb.org/gpsd/AIVDM.html#_types_1_2_and_3_position_report_class_a%0A%0A
 %09NOT_DEFINED
@@ -923,16 +923,59 @@
 OORED);%0A
+%09%09// TODO: complete the items to number 14%0A
 %09%09final 

mark todo and ref