package com.langintro.celtx_to_odt;

import java.util.HashMap;
import java.util.Map;

public class CharacterFields
{
	private static Map<String,String> fieldName;

	static public enum CharacterFieldEntry {
		FULL_NAME("NS1:character-full-name", "CHARACTER_FULLNAME"),
		DESCRIPTION("dc:description", "CHARACTER_DESCRIPTION"),
		AGE("NS1:character-age", "CHARACTER_AGE"),
		DIST("NS1:character-dist_feat","CHARACTER_DIST_FEATURES"),
		HAIR("NS1:character-hair","CHARACTER_HAIR"),
		EYES("NS1:character-eyes", "CHARACTER_EYES"),
		HEIGHT("NS1:character-height", "CHARACTER_HEIGHT"),
		WEIGHT("NS1:character-weight", "CHARACTER_WEIGHT"),
		TRAITS("NS1:character-traits", "CHARACTER_TRAITS"),
		GOAL("NS1:character-goal", "CHARACTER_GOAL"),
		ACH_GOAL("NS1:character-ach_goal", "CHARACTER_ACHIEVE_GOAL"),
		FAMILY("NS1:character-fam_back", "CHARACTER_FAMILY"),
		HABITS("NS1:character-habits", "CHARACTER_HABITS"),
		EDU("NS1:character-education", "CHARACTER_EDUCATION"),
		PERSON("NS1:character-person", "CHARACTER_PERSONALITY"),
		LIKES("NS1:character-likes", "CHARACTER_LIKES"),
		DISLIKES("NS1:character-dislikes", "CHARACTER_DISLIKES")
	;

		public String attrName;
        public String translationIndex;

        CharacterFieldEntry(String attr, String index) {
            attrName = attr;
			translationIndex = index;
        }
	};

	static {
        fieldName = new HashMap<String, String>();
        for (CharacterFieldEntry cfe : CharacterFieldEntry.values()) {
            fieldName.put( cfe.attrName, cfe.translationIndex);
        }
	}

	static public String getIdentifier(String attribute)
	{
		return fieldName.get(attribute);
	}
}
