signature:
public class MarkupConverter { /** * Convert internal attribute - value structure to SemTi - Kamols tag .
 * Usage of default tags given as parameter . No additional defaults used . */
private static StringBuilder toKamolsMarkup ( AttributeValues avs , boolean defaults ) { } }

implementation:
StringBuilder tag = new StringBuilder ( ) ; String pos = avs . getValue ( AttributeNames . i_PartOfSpeech ) ; if ( pos == null ) return tag ; if ( pos . equalsIgnoreCase ( AttributeNames . v_Noun ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "ncmsnn" ) ; else tag . append ( "n_____" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_NounType , AttributeNames . v_CommonNoun ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'p' , AttributeNames . i_NounType , AttributeNames . v_ProperNoun ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'k' , AttributeNames . i_Gender , AttributeNames . v_Kopdzimte ) ; // ? nav TagSet
// Tagset toties ir " Nepiemīt " dzimte
verifyAndSetKamolsAttribute ( avs , tag , 3 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'v' , AttributeNames . i_NumberSpecial , AttributeNames . v_SingulareTantum ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'd' , AttributeNames . i_NumberSpecial , AttributeNames . v_PlurareTantum ) ; // Tagset toties ir " Nepiemīt " skaitlis
verifyAndSetKamolsAttribute ( avs , tag , 4 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 's' , AttributeNames . i_Declension , AttributeNames . v_InflexibleGenitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'u' , AttributeNames . i_Case , AttributeNames . v_Nelokaams ) ; // ? nav TagSet
// Tagset toties ir " Nepiemīt " locījums
verifyAndSetKamolsAttribute ( avs , tag , 5 , '1' , AttributeNames . i_Declension , "1" ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '2' , AttributeNames . i_Declension , "2" ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '3' , AttributeNames . i_Declension , "3" ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '4' , AttributeNames . i_Declension , "4" ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '5' , AttributeNames . i_Declension , "5" ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '6' , AttributeNames . i_Declension , "6" ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'r' , AttributeNames . i_Declension , AttributeNames . v_Reflexive ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '0' , AttributeNames . i_Declension , AttributeNames . v_NA ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Verb ) && ! avs . isMatchingStrong ( AttributeNames . i_Izteiksme , AttributeNames . v_Participle ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "vmni0t1000n" ) ; // else tag . append ( " vm _ _ _ _ _ " ) ;
else tag . append ( "v__________" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'm' , AttributeNames . i_VerbType , AttributeNames . v_MainVerb ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'a' , AttributeNames . i_VerbType , AttributeNames . v_PaliigDv ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'o' , AttributeNames . i_VerbType , AttributeNames . v_Modaals ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'p' , AttributeNames . i_VerbType , AttributeNames . v_Faazes ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'e' , AttributeNames . i_VerbType , AttributeNames . v_IzpausmesVeida ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_VerbType , AttributeNames . v_Buut ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 't' , AttributeNames . i_VerbType , AttributeNames . v_TiktTapt ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'g' , AttributeNames . i_VerbType , AttributeNames . v_Nebuut ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'n' , AttributeNames . i_Reflexive , AttributeNames . v_No ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'y' , AttributeNames . i_Reflexive , AttributeNames . v_Yes ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'i' , AttributeNames . i_Izteiksme , AttributeNames . v_Iisteniibas ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'r' , AttributeNames . i_Izteiksme , AttributeNames . v_Atstaastiijuma ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'c' , AttributeNames . i_Izteiksme , AttributeNames . v_Veeleejuma ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'd' , AttributeNames . i_Izteiksme , AttributeNames . v_Vajadziibas ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'm' , AttributeNames . i_Izteiksme , AttributeNames . v_Paveeles ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'n' , AttributeNames . i_Izteiksme , AttributeNames . v_Nenoteiksme ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'p' , AttributeNames . i_Izteiksme , AttributeNames . v_Participle ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'p' , AttributeNames . i_Laiks , AttributeNames . v_Tagadne ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'f' , AttributeNames . i_Laiks , AttributeNames . v_Naakotne ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 's' , AttributeNames . i_Laiks , AttributeNames . v_Pagaatne ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , '0' , AttributeNames . i_Laiks , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 't' , AttributeNames . i_Transitivity , AttributeNames . v_Transitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'i' , AttributeNames . i_Transitivity , AttributeNames . v_Intransitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '0' , AttributeNames . i_Transitivity , AttributeNames . v_NA ) ; // ? Nav tagset
verifyAndSetKamolsAttribute ( avs , tag , 6 , '1' , AttributeNames . i_Konjugaacija , "1" ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , '2' , AttributeNames . i_Konjugaacija , "2" ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , '3' , AttributeNames . i_Konjugaacija , "3" ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'i' , AttributeNames . i_Konjugaacija , AttributeNames . v_Nekaartns ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , '0' , AttributeNames . i_Konjugaacija , AttributeNames . v_NA ) ; // ? Nav tagset
verifyAndSetKamolsAttribute ( avs , tag , 7 , '1' , AttributeNames . i_Person , "1" ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , '2' , AttributeNames . i_Person , "2" ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , '3' , AttributeNames . i_Person , "3" ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , '0' , AttributeNames . i_Person , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 8 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetKamolsAttribute ( avs , tag , 8 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetKamolsAttribute ( avs , tag , 8 , '0' , AttributeNames . i_Number , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 9 , 'a' , AttributeNames . i_Voice , AttributeNames . v_Active ) ; verifyAndSetKamolsAttribute ( avs , tag , 9 , 'p' , AttributeNames . i_Voice , AttributeNames . v_Passive ) ; verifyAndSetKamolsAttribute ( avs , tag , 9 , '0' , AttributeNames . i_Voice , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 10 , 'y' , AttributeNames . i_Noliegums , AttributeNames . v_Yes ) ; verifyAndSetKamolsAttribute ( avs , tag , 10 , 'n' , AttributeNames . i_Noliegums , AttributeNames . v_No ) ; // verifyAndSetKamolsAttribute ( avs , tag , 10 , ' n ' , AttributeNames . i _ Noliegums , null ) ;
} else if ( pos . equalsIgnoreCase ( AttributeNames . v_Verb ) && avs . isMatchingStrong ( AttributeNames . i_Izteiksme , AttributeNames . v_Participle ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "vmnpdmsnapn" ) ; else tag . append ( "v__p_______" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'm' , AttributeNames . i_VerbType , AttributeNames . v_MainVerb ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'a' , AttributeNames . i_VerbType , AttributeNames . v_PaliigDv ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'o' , AttributeNames . i_VerbType , AttributeNames . v_Modaals ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'p' , AttributeNames . i_VerbType , AttributeNames . v_Faazes ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'e' , AttributeNames . i_VerbType , AttributeNames . v_IzpausmesVeida ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_VerbType , AttributeNames . v_Buut ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 't' , AttributeNames . i_VerbType , AttributeNames . v_TiktTapt ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'g' , AttributeNames . i_VerbType , AttributeNames . v_Nebuut ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'n' , AttributeNames . i_Reflexive , AttributeNames . v_No ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'y' , AttributeNames . i_Reflexive , AttributeNames . v_Yes ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'i' , AttributeNames . i_Izteiksme , AttributeNames . v_Iisteniibas ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'r' , AttributeNames . i_Izteiksme , AttributeNames . v_Atstaastiijuma ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'c' , AttributeNames . i_Izteiksme , AttributeNames . v_Veeleejuma ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'd' , AttributeNames . i_Izteiksme , AttributeNames . v_Vajadziibas ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'm' , AttributeNames . i_Izteiksme , AttributeNames . v_Paveeles ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'n' , AttributeNames . i_Izteiksme , AttributeNames . v_Nenoteiksme ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'p' , AttributeNames . i_Izteiksme , AttributeNames . v_Participle ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'd' , AttributeNames . i_Lokaamiiba , AttributeNames . v_Lokaams ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'p' , AttributeNames . i_Lokaamiiba , AttributeNames . v_DaljeejiLokaams ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'u' , AttributeNames . i_Lokaamiiba , AttributeNames . v_Nelokaams ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '0' , AttributeNames . i_Gender , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , '0' , AttributeNames . i_Number , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetKamolsAttribute ( avs , tag , 7 , '0' , AttributeNames . i_Case , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 8 , 'a' , AttributeNames . i_Voice , AttributeNames . v_Active ) ; verifyAndSetKamolsAttribute ( avs , tag , 8 , 'p' , AttributeNames . i_Voice , AttributeNames . v_Passive ) ; verifyAndSetKamolsAttribute ( avs , tag , 8 , '0' , AttributeNames . i_Voice , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 9 , 'p' , AttributeNames . i_Laiks , AttributeNames . v_Tagadne ) ; verifyAndSetKamolsAttribute ( avs , tag , 9 , 's' , AttributeNames . i_Laiks , AttributeNames . v_Pagaatne ) ; verifyAndSetKamolsAttribute ( avs , tag , 9 , 'f' , AttributeNames . i_Laiks , AttributeNames . v_Naakotne ) ; verifyAndSetKamolsAttribute ( avs , tag , 9 , '0' , AttributeNames . i_Laiks , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 10 , 'n' , AttributeNames . i_Definiteness , AttributeNames . v_Indefinite ) ; verifyAndSetKamolsAttribute ( avs , tag , 10 , 'y' , AttributeNames . i_Definiteness , AttributeNames . v_Definite ) ; verifyAndSetKamolsAttribute ( avs , tag , 10 , '0' , AttributeNames . i_Definiteness , AttributeNames . v_NA ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Adjective ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "afmsnnp" ) ; else tag . append ( "a______" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'f' , AttributeNames . i_AdjectiveType , AttributeNames . v_QualificativeAdjective ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'r' , AttributeNames . i_AdjectiveType , AttributeNames . v_RelativeAdjective ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'n' , AttributeNames . i_Definiteness , AttributeNames . v_Indefinite ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'y' , AttributeNames . i_Definiteness , AttributeNames . v_Definite ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'p' , AttributeNames . i_Degree , AttributeNames . v_Positive ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'c' , AttributeNames . i_Degree , AttributeNames . v_Comparative ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 's' , AttributeNames . i_Degree , AttributeNames . v_Superlative ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Pronoun ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "pp1msnn" ) ; else tag . append ( "p______" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'p' , AttributeNames . i_VvTips , AttributeNames . v_Personu ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'x' , AttributeNames . i_VvTips , AttributeNames . v_Atgriezeniskie ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 's' , AttributeNames . i_VvTips , AttributeNames . v_Piederiibas ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'd' , AttributeNames . i_VvTips , AttributeNames . v_Noraadaamie ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'i' , AttributeNames . i_VvTips , AttributeNames . v_Nenoteiktie ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'q' , AttributeNames . i_VvTips , AttributeNames . v_Jautaajamie ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'r' , AttributeNames . i_VvTips , AttributeNames . v_AttieksmesVv ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'g' , AttributeNames . i_VvTips , AttributeNames . v_Noteiktie ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , '1' , AttributeNames . i_Person , "1" ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , '2' , AttributeNames . i_Person , "2" ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , '3' , AttributeNames . i_Person , "3" ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , '0' , AttributeNames . i_Person , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , '0' , AttributeNames . i_Gender , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , '0' , AttributeNames . i_Number , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'u' , AttributeNames . i_Case , AttributeNames . v_Nelokaams ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'n' , AttributeNames . i_Noliegums , AttributeNames . v_No ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'y' , AttributeNames . i_Noliegums , AttributeNames . v_Yes ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Adverb ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "rp_" ) ; else tag . append ( "r__" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'r' , AttributeNames . i_Degree , AttributeNames . v_Relative ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'p' , AttributeNames . i_Degree , AttributeNames . v_Positive ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_Degree , AttributeNames . v_Comparative ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 's' , AttributeNames . i_Degree , AttributeNames . v_Superlative ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , '0' , AttributeNames . i_Degree , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'q' , AttributeNames . i_ApstTips , AttributeNames . v_Meera ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'm' , AttributeNames . i_ApstTips , AttributeNames . v_Veida ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'p' , AttributeNames . i_ApstTips , AttributeNames . v_Vietas ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 't' , AttributeNames . i_ApstTips , AttributeNames . v_Laika ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'c' , AttributeNames . i_ApstTips , AttributeNames . v_Ceelonja ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Preposition ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "sppgn" ) ; else tag . append ( "s____" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'p' , AttributeNames . i_Novietojums , AttributeNames . v_Pirms ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 't' , AttributeNames . i_Novietojums , AttributeNames . v_Peec ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , '0' , AttributeNames . i_Number , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'g' , AttributeNames . i_Rekcija , AttributeNames . v_Genitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'd' , AttributeNames . i_Rekcija , AttributeNames . v_Dative ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'a' , AttributeNames . i_Rekcija , AttributeNames . v_Accusative ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , '0' , AttributeNames . i_Rekcija , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'y' , AttributeNames . i_VietasApstNoziime , AttributeNames . v_Yes ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'n' , AttributeNames . i_VietasApstNoziime , AttributeNames . v_No ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Conjunction ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "ccs" ) ; else tag . append ( "c__" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_SaikljaTips , AttributeNames . v_Sakaartojuma ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 's' , AttributeNames . i_SaikljaTips , AttributeNames . v_Pakaartojuma ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 's' , AttributeNames . i_Uzbuuve , AttributeNames . v_Vienkaarshs ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'd' , AttributeNames . i_Uzbuuve , AttributeNames . v_Divkaarshs ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'c' , AttributeNames . i_Uzbuuve , AttributeNames . v_Salikts ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'r' , AttributeNames . i_Uzbuuve , AttributeNames . v_Atkaartots ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Numeral ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "mcs_snv" ) ; else tag . append ( "m______" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_SkaitljaTips , AttributeNames . v_PamataSv ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'o' , AttributeNames . i_SkaitljaTips , AttributeNames . v_Kaartas ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'f' , AttributeNames . i_SkaitljaTips , AttributeNames . v_Daljskaitlis ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 's' , AttributeNames . i_Uzbuuve , AttributeNames . v_Vienkaarshs ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'c' , AttributeNames . i_Uzbuuve , AttributeNames . v_Salikts ) ; verifyAndSetKamolsAttribute ( avs , tag , 2 , 'j' , AttributeNames . i_Uzbuuve , AttributeNames . v_Savienojums ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetKamolsAttribute ( avs , tag , 3 , '0' , AttributeNames . i_Gender , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetKamolsAttribute ( avs , tag , 4 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetKamolsAttribute ( avs , tag , 5 , '0' , AttributeNames . i_Case , AttributeNames . v_NA ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'v' , AttributeNames . i_Order , AttributeNames . v_Ones ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'p' , AttributeNames . i_Order , AttributeNames . v_Teens ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'd' , AttributeNames . i_Order , AttributeNames . v_Tens ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 's' , AttributeNames . i_Order , AttributeNames . v_Hundreds ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 't' , AttributeNames . i_Order , AttributeNames . v_Thousands ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'm' , AttributeNames . i_Order , AttributeNames . v_Millions ) ; verifyAndSetKamolsAttribute ( avs , tag , 6 , 'r' , AttributeNames . i_Order , AttributeNames . v_Billions ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Interjection ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "is" ) ; else tag . append ( "i_" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 's' , AttributeNames . i_Uzbuuve , AttributeNames . v_Vienkaarshs ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_Uzbuuve , AttributeNames . v_Salikts ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Particle ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "qs" ) ; else tag . append ( "q_" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 's' , AttributeNames . i_Uzbuuve , AttributeNames . v_Vienkaarshs ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_Uzbuuve , AttributeNames . v_Salikts ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Punctuation ) ) { tag . setLength ( 0 ) ; if ( defaults ) tag . append ( "zc" ) ; else tag . append ( "z_" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'c' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Komats ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'q' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Peedinja ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 's' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Punkts ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'b' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Iekava ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'd' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Domuziime ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'o' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Kols ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'x' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Cita ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Abbreviation ) ) { tag . setLength ( 0 ) ; tag . append ( "y" ) ; } else if ( pos . equalsIgnoreCase ( AttributeNames . v_Residual ) ) { tag . setLength ( 0 ) ; tag . append ( "xx" ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'f' , AttributeNames . i_ResidualType , AttributeNames . v_Foreign ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 't' , AttributeNames . i_ResidualType , AttributeNames . v_Typo ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'n' , AttributeNames . i_ResidualType , AttributeNames . v_Number ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'o' , AttributeNames . i_ResidualType , AttributeNames . v_Ordinal ) ; verifyAndSetKamolsAttribute ( avs , tag , 1 , 'u' , AttributeNames . i_ResidualType , AttributeNames . v_URI ) ; } return tag ;


signature:
public class MarkupConverter { /** * Check if tag has given value in specified position and if so then set
 * corresponding attribute - value pair in the given attribute - value
 * structure . */
private static void verifyAndSetAVSAttribute ( String tag , FeatureStructure avs , int index , char tagValue , String attribute , String attributeValue ) { } }

implementation:
// TODO - šī metode ' silently fails ' uz jauniem variantiem / simboliem
// marķējumā . Normāli atrisinās tikai šīs klases pāreja uz xml
// konfigfaila apstrādi
if ( index >= tag . length ( ) ) return ; if ( tag . charAt ( index ) == tagValue ) avs . addAttribute ( attribute , attributeValue ) ;


signature:
public class MarkupConverter { /** * Remove formating from Kamols - style tag . */
public static String removeKamolsMarkupFormating ( String tag ) { } }

implementation: String result = "" ; if ( ! tag . contains ( "," ) ) return "x" ; int depth = 0 ; int commas = 0 ; for ( char c : tag . toCharArray ( ) ) { if ( c == '[' ) depth ++ ; if ( c == ']' ) depth -- ; if ( depth == 1 && c == ',' ) commas ++ ; if ( commas == 2 ) result = result + c ; } result = result . replaceAll ( "_[A-Z0-9]*" , "_" ) ; result = result . replaceAll ( "(\\[|\\]|\\,| )" , "" ) ; return result ;


signature:
public class MarkupConverter { /** * Convert SemTi - Kamols markup tag to internal attribute - value structure . */
public static AttributeValues fromKamolsMarkup ( String tag ) { } }

implementation:
AttributeValues attributes = new AttributeValues ( ) ; if ( tag == null || tag . equals ( "" ) ) return attributes ; switch ( tag . charAt ( 0 ) ) { case 'n' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Noun ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_NounType , AttributeNames . v_CommonNoun ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'p' , AttributeNames . i_NounType , AttributeNames . v_ProperNoun ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'k' , AttributeNames . i_Gender , AttributeNames . v_Kopdzimte ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'v' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'v' , AttributeNames . i_NumberSpecial , AttributeNames . v_SingulareTantum ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'd' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'd' , AttributeNames . i_NumberSpecial , AttributeNames . v_PlurareTantum ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 's' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '1' , AttributeNames . i_Declension , "1" ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '2' , AttributeNames . i_Declension , "2" ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '3' , AttributeNames . i_Declension , "3" ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '4' , AttributeNames . i_Declension , "4" ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '5' , AttributeNames . i_Declension , "5" ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '6' , AttributeNames . i_Declension , "6" ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'r' , AttributeNames . i_Declension , AttributeNames . v_Reflexive ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '0' , AttributeNames . i_Declension , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 's' , AttributeNames . i_Declension , AttributeNames . v_InflexibleGenitive ) ; break ; case 'v' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Verb ) ; if ( tag . length ( ) < 4 || tag . charAt ( 3 ) != 'p' ) { // nav divdabis
verifyAndSetAVSAttribute ( tag , attributes , 1 , 'm' , AttributeNames . i_VerbType , AttributeNames . v_MainVerb ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'a' , AttributeNames . i_VerbType , AttributeNames . v_PaliigDv ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'o' , AttributeNames . i_VerbType , AttributeNames . v_Modaals ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'p' , AttributeNames . i_VerbType , AttributeNames . v_Faazes ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'e' , AttributeNames . i_VerbType , AttributeNames . v_IzpausmesVeida ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_VerbType , AttributeNames . v_Buut ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 't' , AttributeNames . i_VerbType , AttributeNames . v_TiktTapt ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'g' , AttributeNames . i_VerbType , AttributeNames . v_Nebuut ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'n' , AttributeNames . i_Reflexive , AttributeNames . v_No ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'y' , AttributeNames . i_Reflexive , AttributeNames . v_Yes ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'i' , AttributeNames . i_Izteiksme , AttributeNames . v_Iisteniibas ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'r' , AttributeNames . i_Izteiksme , AttributeNames . v_Atstaastiijuma ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'c' , AttributeNames . i_Izteiksme , AttributeNames . v_Veeleejuma ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'd' , AttributeNames . i_Izteiksme , AttributeNames . v_Vajadziibas ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'm' , AttributeNames . i_Izteiksme , AttributeNames . v_Paveeles ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'n' , AttributeNames . i_Izteiksme , AttributeNames . v_Nenoteiksme ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'p' , AttributeNames . i_Izteiksme , AttributeNames . v_Participle ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'p' , AttributeNames . i_Laiks , AttributeNames . v_Tagadne ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'f' , AttributeNames . i_Laiks , AttributeNames . v_Naakotne ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 's' , AttributeNames . i_Laiks , AttributeNames . v_Pagaatne ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , '0' , AttributeNames . i_Laiks , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 't' , AttributeNames . i_Transitivity , AttributeNames . v_Transitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'i' , AttributeNames . i_Transitivity , AttributeNames . v_Intransitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '0' , AttributeNames . i_Transitivity , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , '1' , AttributeNames . i_Konjugaacija , "1" ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , '2' , AttributeNames . i_Konjugaacija , "2" ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , '3' , AttributeNames . i_Konjugaacija , "3" ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'i' , AttributeNames . i_Konjugaacija , AttributeNames . v_Nekaartns ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , '0' , AttributeNames . i_Konjugaacija , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , '1' , AttributeNames . i_Person , "1" ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , '2' , AttributeNames . i_Person , "2" ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , '3' , AttributeNames . i_Person , "3" ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , '0' , AttributeNames . i_Person , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 8 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetAVSAttribute ( tag , attributes , 8 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetAVSAttribute ( tag , attributes , 8 , '0' , AttributeNames . i_Number , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 9 , 'a' , AttributeNames . i_Voice , AttributeNames . v_Active ) ; verifyAndSetAVSAttribute ( tag , attributes , 9 , 'p' , AttributeNames . i_Voice , AttributeNames . v_Passive ) ; verifyAndSetAVSAttribute ( tag , attributes , 9 , '0' , AttributeNames . i_Voice , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 10 , 'n' , AttributeNames . i_Noliegums , AttributeNames . v_No ) ; verifyAndSetAVSAttribute ( tag , attributes , 10 , 'y' , AttributeNames . i_Noliegums , AttributeNames . v_Yes ) ; } else { // ir divdabis
verifyAndSetAVSAttribute ( tag , attributes , 1 , 'm' , AttributeNames . i_VerbType , AttributeNames . v_MainVerb ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'a' , AttributeNames . i_VerbType , AttributeNames . v_PaliigDv ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'o' , AttributeNames . i_VerbType , AttributeNames . v_Modaals ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'p' , AttributeNames . i_VerbType , AttributeNames . v_Faazes ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'e' , AttributeNames . i_VerbType , AttributeNames . v_IzpausmesVeida ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_VerbType , AttributeNames . v_Buut ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 't' , AttributeNames . i_VerbType , AttributeNames . v_TiktTapt ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'g' , AttributeNames . i_VerbType , AttributeNames . v_Nebuut ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'n' , AttributeNames . i_Reflexive , AttributeNames . v_No ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'y' , AttributeNames . i_Reflexive , AttributeNames . v_Yes ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'i' , AttributeNames . i_Izteiksme , AttributeNames . v_Iisteniibas ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'r' , AttributeNames . i_Izteiksme , AttributeNames . v_Atstaastiijuma ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'c' , AttributeNames . i_Izteiksme , AttributeNames . v_Veeleejuma ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'd' , AttributeNames . i_Izteiksme , AttributeNames . v_Vajadziibas ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'm' , AttributeNames . i_Izteiksme , AttributeNames . v_Paveeles ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'n' , AttributeNames . i_Izteiksme , AttributeNames . v_Nenoteiksme ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'p' , AttributeNames . i_Izteiksme , AttributeNames . v_Participle ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'd' , AttributeNames . i_Lokaamiiba , AttributeNames . v_Lokaams ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'p' , AttributeNames . i_Lokaamiiba , AttributeNames . v_DaljeejiLokaams ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'u' , AttributeNames . i_Lokaamiiba , AttributeNames . v_Nelokaams ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '0' , AttributeNames . i_Gender , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , '0' , AttributeNames . i_Number , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , '0' , AttributeNames . i_Case , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 8 , 'a' , AttributeNames . i_Voice , AttributeNames . v_Active ) ; verifyAndSetAVSAttribute ( tag , attributes , 8 , 'p' , AttributeNames . i_Voice , AttributeNames . v_Passive ) ; verifyAndSetAVSAttribute ( tag , attributes , 8 , '0' , AttributeNames . i_Voice , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 9 , 'p' , AttributeNames . i_Laiks , AttributeNames . v_Tagadne ) ; verifyAndSetAVSAttribute ( tag , attributes , 9 , 'f' , AttributeNames . i_Laiks , AttributeNames . v_Naakotne ) ; verifyAndSetAVSAttribute ( tag , attributes , 9 , 's' , AttributeNames . i_Laiks , AttributeNames . v_Pagaatne ) ; verifyAndSetAVSAttribute ( tag , attributes , 9 , '0' , AttributeNames . i_Laiks , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 10 , 'n' , AttributeNames . i_Definiteness , AttributeNames . v_Indefinite ) ; verifyAndSetAVSAttribute ( tag , attributes , 10 , 'y' , AttributeNames . i_Definiteness , AttributeNames . v_Definite ) ; verifyAndSetAVSAttribute ( tag , attributes , 10 , '0' , AttributeNames . i_Definiteness , AttributeNames . v_NA ) ; } break ; case 'a' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Adjective ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'f' , AttributeNames . i_AdjectiveType , AttributeNames . v_QualificativeAdjective ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'r' , AttributeNames . i_AdjectiveType , AttributeNames . v_RelativeAdjective ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'n' , AttributeNames . i_Definiteness , AttributeNames . v_Indefinite ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'y' , AttributeNames . i_Definiteness , AttributeNames . v_Definite ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'p' , AttributeNames . i_Degree , AttributeNames . v_Positive ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'c' , AttributeNames . i_Degree , AttributeNames . v_Comparative ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 's' , AttributeNames . i_Degree , AttributeNames . v_Superlative ) ; break ; case 'p' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Pronoun ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'p' , AttributeNames . i_VvTips , AttributeNames . v_Personu ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'x' , AttributeNames . i_VvTips , AttributeNames . v_Atgriezeniskie ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 's' , AttributeNames . i_VvTips , AttributeNames . v_Piederiibas ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'd' , AttributeNames . i_VvTips , AttributeNames . v_Noraadaamie ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'i' , AttributeNames . i_VvTips , AttributeNames . v_Nenoteiktie ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'q' , AttributeNames . i_VvTips , AttributeNames . v_Jautaajamie ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'r' , AttributeNames . i_VvTips , AttributeNames . v_AttieksmesVv ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'g' , AttributeNames . i_VvTips , AttributeNames . v_Noteiktie ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , '1' , AttributeNames . i_Person , "1" ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , '2' , AttributeNames . i_Person , "2" ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , '3' , AttributeNames . i_Person , "3" ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , '0' , AttributeNames . i_Person , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , '0' , AttributeNames . i_Gender , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , '0' , AttributeNames . i_Number , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'u' , AttributeNames . i_Case , AttributeNames . v_Nelokaams ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'n' , AttributeNames . i_Noliegums , AttributeNames . v_No ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'y' , AttributeNames . i_Noliegums , AttributeNames . v_Yes ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , 'a' , AttributeNames . i_Anafora , AttributeNames . v_Adjektiivu ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , 's' , AttributeNames . i_Anafora , AttributeNames . v_Substantiivu ) ; verifyAndSetAVSAttribute ( tag , attributes , 7 , '0' , AttributeNames . i_Anafora , AttributeNames . v_NA ) ; break ; case 'r' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Adverb ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'p' , AttributeNames . i_Degree , AttributeNames . v_Positive ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_Degree , AttributeNames . v_Comparative ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 's' , AttributeNames . i_Degree , AttributeNames . v_Superlative ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'r' , AttributeNames . i_Degree , AttributeNames . v_Relative ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , '0' , AttributeNames . i_Degree , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'q' , AttributeNames . i_ApstTips , AttributeNames . v_Meera ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'm' , AttributeNames . i_ApstTips , AttributeNames . v_Veida ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'p' , AttributeNames . i_ApstTips , AttributeNames . v_Vietas ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 't' , AttributeNames . i_ApstTips , AttributeNames . v_Laika ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'c' , AttributeNames . i_ApstTips , AttributeNames . v_Ceelonja ) ; break ; case 's' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Preposition ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'p' , AttributeNames . i_Novietojums , AttributeNames . v_Pirms ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 't' , AttributeNames . i_Novietojums , AttributeNames . v_Peec ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , '0' , AttributeNames . i_Number , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'g' , AttributeNames . i_Rekcija , AttributeNames . v_Genitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'd' , AttributeNames . i_Rekcija , AttributeNames . v_Dative ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'a' , AttributeNames . i_Rekcija , AttributeNames . v_Accusative ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , '0' , AttributeNames . i_Rekcija , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'y' , AttributeNames . i_VietasApstNoziime , AttributeNames . v_Yes ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'n' , AttributeNames . i_VietasApstNoziime , AttributeNames . v_No ) ; break ; case 'c' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Conjunction ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_SaikljaTips , AttributeNames . v_Sakaartojuma ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 's' , AttributeNames . i_SaikljaTips , AttributeNames . v_Pakaartojuma ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 's' , AttributeNames . i_Uzbuuve , AttributeNames . v_Vienkaarshs ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'd' , AttributeNames . i_Uzbuuve , AttributeNames . v_Divkaarshs ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'c' , AttributeNames . i_Uzbuuve , AttributeNames . v_Salikts ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'r' , AttributeNames . i_Uzbuuve , AttributeNames . v_Atkaartots ) ; break ; case 'm' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Numeral ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_SkaitljaTips , AttributeNames . v_PamataSv ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'o' , AttributeNames . i_SkaitljaTips , AttributeNames . v_Kaartas ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'f' , AttributeNames . i_SkaitljaTips , AttributeNames . v_Daljskaitlis ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 's' , AttributeNames . i_Uzbuuve , AttributeNames . v_Vienkaarshs ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'c' , AttributeNames . i_Uzbuuve , AttributeNames . v_Salikts ) ; verifyAndSetAVSAttribute ( tag , attributes , 2 , 'j' , AttributeNames . i_Uzbuuve , AttributeNames . v_Savienojums ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'm' , AttributeNames . i_Gender , AttributeNames . v_Masculine ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , 'f' , AttributeNames . i_Gender , AttributeNames . v_Feminine ) ; verifyAndSetAVSAttribute ( tag , attributes , 3 , '0' , AttributeNames . i_Gender , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 's' , AttributeNames . i_Number , AttributeNames . v_Singular ) ; verifyAndSetAVSAttribute ( tag , attributes , 4 , 'p' , AttributeNames . i_Number , AttributeNames . v_Plural ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'n' , AttributeNames . i_Case , AttributeNames . v_Nominative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'g' , AttributeNames . i_Case , AttributeNames . v_Genitive ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'd' , AttributeNames . i_Case , AttributeNames . v_Dative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'a' , AttributeNames . i_Case , AttributeNames . v_Accusative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'v' , AttributeNames . i_Case , AttributeNames . v_Vocative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , 'l' , AttributeNames . i_Case , AttributeNames . v_Locative ) ; verifyAndSetAVSAttribute ( tag , attributes , 5 , '0' , AttributeNames . i_Case , AttributeNames . v_NA ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'v' , AttributeNames . i_Order , AttributeNames . v_Ones ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'p' , AttributeNames . i_Order , AttributeNames . v_Teens ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'd' , AttributeNames . i_Order , AttributeNames . v_Tens ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 's' , AttributeNames . i_Order , AttributeNames . v_Hundreds ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 't' , AttributeNames . i_Order , AttributeNames . v_Thousands ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'm' , AttributeNames . i_Order , AttributeNames . v_Millions ) ; verifyAndSetAVSAttribute ( tag , attributes , 6 , 'r' , AttributeNames . i_Order , AttributeNames . v_Billions ) ; break ; case 'i' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Interjection ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 's' , AttributeNames . i_Uzbuuve , AttributeNames . v_Vienkaarshs ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_Uzbuuve , AttributeNames . v_Salikts ) ; break ; case 'q' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Particle ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 's' , AttributeNames . i_Uzbuuve , AttributeNames . v_Vienkaarshs ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_Uzbuuve , AttributeNames . v_Salikts ) ; break ; case 'x' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Residual ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'f' , AttributeNames . i_ResidualType , AttributeNames . v_Foreign ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 't' , AttributeNames . i_ResidualType , AttributeNames . v_Typo ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'n' , AttributeNames . i_ResidualType , AttributeNames . v_Number ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'o' , AttributeNames . i_ResidualType , AttributeNames . v_Ordinal ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'u' , AttributeNames . i_ResidualType , AttributeNames . v_URI ) ; break ; case 'y' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Abbreviation ) ; break ; case 'z' : attributes . addAttribute ( AttributeNames . i_PartOfSpeech , AttributeNames . v_Punctuation ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'c' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Komats ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'q' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Peedinja ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 's' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Punkts ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'b' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Iekava ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'd' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Domuziime ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'o' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Kols ) ; verifyAndSetAVSAttribute ( tag , attributes , 1 , 'x' , AttributeNames . i_PieturziimesTips , AttributeNames . v_Cita ) ; break ; } return attributes ;


signature:
public class MarkupConverter { /** * Converts Kamols - style markup to Prolog list . */
public static String charsToPrologList ( String chars ) { } }

implementation: StringBuilder sb = new StringBuilder ( chars . length ( ) * 2 + 1 ) ; charsToPrologList ( chars , sb ) ; return sb . toString ( ) ;


signature:
public class MarkupConverter { /** * Converts Kamols - style markup to Prolog list . */
public static void charsToPrologList ( String chars , StringBuilder sb ) { } }

implementation:
sb . append ( '[' ) ; for ( int i = 0 ; i < chars . length ( ) ; i ++ ) { if ( i > 0 ) sb . append ( ',' ) ; // FIXME - ne īstā vieta kristīnes marķējuma loģikai
// FIXME - aizvākt visas anaforas prom . / Lauma
if ( ( chars . startsWith ( "p" ) && i == 7 ) // elements , kurš ir kā saraksts no viena elem jādod
|| ( chars . startsWith ( "s" ) && i == 4 ) || ( chars . startsWith ( "m" ) && i == 6 ) ) sb . append ( "[" + chars . charAt ( i ) + "]" ) ; else sb . append ( chars . charAt ( i ) ) ; } if ( ( chars . startsWith ( "p" ) && chars . length ( ) < 8 ) ) // tagi tagad saīsināti , compatibility ar veco čunkeri
sb . append ( ",[0]" ) ; sb . append ( ']' ) ;


signature:
public class MarkupConverter { /** * Converts Word object to Prolog format necessary for chunker ( A - table
 * record ) .
 * @ param wordWord to be converted .
 * @ param toolgeneratedhow the source for this word should be identified
 * - ' tool ' or ' guess ' / ' dict ' .
 * Nobody remembers the practical consequences . : )
 * Probably this is used , when deciding whether to
 * delete these records from A - table before rechunking .
 * @ returntransformed result . */
public static String wordToChunkerFormat ( Word word , boolean toolgenerated ) { } }

implementation: if ( ! word . isRecognized ( ) ) return ( "[]" ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( '[' ) ; if ( word . getCorrectWordform ( ) != null ) { wordformToChunkerFormat ( word . getToken ( ) , toolgenerated , sb , word . getCorrectWordform ( ) ) ; } else for ( Wordform vf : word . wordforms ) { if ( sb . length ( ) > 1 ) sb . append ( ',' ) ; wordformToChunkerFormat ( word . getToken ( ) , toolgenerated , sb , vf ) ; } sb . append ( ']' ) ; return sb . toString ( ) ;


signature:
public class MetricDataRequest { /** * Perform retrieval of metrics from AppDynamics using specified parameters .
 * @ return list of metric data .
 * @ throws RequestException
 * when there was an error with request .
 * @ throws UnauthorizedException
 * when unable to authorize with given credentials . */
public List < MetricData > get ( ) throws RequestException , UnauthorizedException { } }

implementation: HttpResponse < String > response ; try { response = Unirest . get ( this . appdURL + "/controller/rest/applications/" + appName + "/metric-data" ) . header ( "accept" , "application/json" ) . basicAuth ( this . appdUsername , this . appdPassword ) . queryString ( getQueryString ( ) ) . queryString ( "output" , "json" ) . asString ( ) ; } catch ( UnirestException e ) { throw new RequestException ( "Something was wrong with sending request." , e ) ; } if ( response == null ) { throw new RequestException ( "Response is empty." ) ; } switch ( response . getStatus ( ) ) { case 200 : { return process ( new JsonNode ( response . getBody ( ) ) ) ; } case 401 : { throw new UnauthorizedException ( "Authentication failed" ) ; } default : { throw new RequestException ( "Unhandled response code " + response . getStatus ( ) ) ; } }


signature:
public class MetricDataRequest { /** * Generate querystring for the request .
 * @ return map of query strings . */
protected Map < String , Object > getQueryString ( ) { } }

implementation: Map < String , Object > qs = new HashMap < > ( ) ; if ( timeParams != null ) { qs . put ( "time-range-type" , timeParams . type ) ; if ( timeParams . duration > 0 ) { qs . put ( "duration-in-mins" , timeParams . duration ) ; } if ( timeParams . startTime > 0 ) { qs . put ( "start-time" , timeParams . startTime ) ; } if ( timeParams . endTime > 0 ) { qs . put ( "end-time" , timeParams . endTime ) ; } } qs . put ( "rollup" , false ) ; if ( metricPath != null ) { qs . put ( "metric-path" , metricPath ) ; } return qs ;


signature:
public class MetricDataRequest { /** * Process the JSON response from the request .
 * @ param node
 * root node of JSON response .
 * @ return list of { @ link MetricData } */
protected List < MetricData > process ( JsonNode node ) { } }

implementation: JSONArray dataArray = node . getArray ( ) ; List < MetricData > list = new LinkedList < > ( ) ; for ( int i = 0 ; i < dataArray . length ( ) ; i ++ ) { JSONObject data = dataArray . getJSONObject ( i ) ; MetricData metricData = new MetricData ( data . getString ( "frequency" ) , data . getLong ( "metricId" ) , data . getString ( "metricName" ) , data . getString ( "metricPath" ) ) ; list . add ( metricData ) ; JSONArray valueArray = data . getJSONArray ( "metricValues" ) ; for ( int j = 0 ; j < valueArray . length ( ) ; j ++ ) { JSONObject value = valueArray . getJSONObject ( j ) ; metricData . metricValues . add ( new MetricValue ( value . getLong ( "count" ) , value . getLong ( "value" ) , value . getLong ( "max" ) , value . getLong ( "min" ) , value . getLong ( "sum" ) , value . getLong ( "startTimeInMillis" ) ) ) ; } } return list ;


signature:
public class InfoParser { /** * Parse JSON String as configurations that the task should query from AppDynamics .
 * @ param jsonString
 * String of JSON configuration .
 * @ return list of { @ link AppInfo } configurations that the task should query from
 * AppDynamics . */
public static List < AppInfo > parseInfo ( String jsonString ) throws IOException { } }

implementation: ObjectMapper mapper = new ObjectMapper ( ) ; return mapper . readValue ( jsonString , new TypeReference < List < AppInfo > > ( ) { } ) ;


signature:
public class Processor { /** * Process { @ link MetricTimeSeries } and { @ link MetricValue } filtering out data point earlier or
 * equal to timestamp that was marked as already sent .
 * @ param mts
 * MetricTimeSeries for the values
 * @ param metricValues
 * metric values from AppDynamics . Timestamp needs to be incrementally ordered .
 * @ return list of { @ link com . signalfx . metrics . protobuf . SignalFxProtocolBuffers . DataPoint } to be
 * submitted to SignalFx */
public List < SignalFxProtocolBuffers . DataPoint > process ( MetricTimeSeries mts , List < MetricValue > metricValues ) { } }

implementation: Long lastTimestamp = mtsToLastTimestamp . get ( mts ) ; Long latestTimestamp = lastTimestamp ; List < SignalFxProtocolBuffers . DataPoint > dataPoints = new LinkedList < > ( ) ; SignalFxProtocolBuffers . DataPoint . Builder dataPointBuilder = SignalFxProtocolBuffers . DataPoint . newBuilder ( ) . setMetric ( mts . metricName ) ; if ( mts . dimensions != null ) { for ( Map . Entry < String , String > entry : mts . dimensions . entrySet ( ) ) { dataPointBuilder . addDimensions ( SignalFxProtocolBuffers . Dimension . newBuilder ( ) . setKey ( entry . getKey ( ) ) . setValue ( entry . getValue ( ) ) ) ; } } for ( MetricValue metricValue : metricValues ) { if ( lastTimestamp == null || metricValue . startTimeInMillis > lastTimestamp ) { SignalFxProtocolBuffers . DataPoint dataPoint = dataPointBuilder . setTimestamp ( metricValue . startTimeInMillis ) . setValue ( SignalFxProtocolBuffers . Datum . newBuilder ( ) . setIntValue ( metricValue . value ) ) . build ( ) ; dataPoints . add ( dataPoint ) ; latestTimestamp = lastTimestamp == null ? metricValue . startTimeInMillis : Math . max ( metricValue . startTimeInMillis , latestTimestamp ) ; } } if ( lastTimestamp == null || latestTimestamp > lastTimestamp ) { mtsToLastTimestamp . put ( mts , latestTimestamp ) ; } return dataPoints ;


signature:
public class Config { /** * Retrieve configurations by looking up in property param first then environment variable .
 * @ return ConnectionConfig containing AppDynamics URL , Username , Password and SignalFx Token . */
public static ConnectionConfig getConnectionConfig ( ) { } }

implementation: boolean isValid = true ; String appdUsername = getPropertyOrEnv ( "com.signalfx.appd.username" , "APPD_USERNAME" ) ; if ( StringUtils . isEmpty ( appdUsername ) ) { log . error ( "AppDynamics username not specified." ) ; isValid = false ; } String appdPassword = getPropertyOrEnv ( "com.signalfx.appd.password" , "APPD_PASSWORD" ) ; if ( StringUtils . isEmpty ( appdPassword ) ) { log . error ( "AppDynamics password not specified." ) ; isValid = false ; } String appdURL = getPropertyOrEnv ( "com.signalfx.appd.host" , "APPD_HOST" ) ; if ( StringUtils . isEmpty ( appdURL ) ) { log . error ( "AppDynamics host not specified." ) ; isValid = false ; } String fxToken = getPropertyOrEnv ( "com.signalfx.api.token" , "SIGNALFX_TOKEN" ) ; if ( StringUtils . isEmpty ( fxToken ) ) { log . error ( "SignalFx token not specified." ) ; isValid = false ; } if ( isValid ) { return new ConnectionConfig ( appdUsername , appdPassword , appdURL , fxToken ) ; } else { return null ; }


signature:
public class ReportAppD { /** * Perform reading and reporting of AppDynamics metrics to SignalFx
 * @ param timeParams
 * Time paracounters to query metrics from AppDynamics . */
public void perform ( List < AppInfo > apps , MetricDataRequest . TimeParams timeParams ) { } }

implementation:
List < SignalFxProtocolBuffers . DataPoint > dataPoints = new LinkedList < > ( ) ; for ( AppInfo app : apps ) { dataRequest . setAppName ( app . name ) ; for ( MetricInfo metricInfo : app . metrics ) { dataRequest . setTimeParams ( timeParams ) ; dataRequest . setMetricPath ( metricInfo . metricPathQuery ) ; List < MetricData > metricDataList ; try { metricDataList = dataRequest . get ( ) ; } catch ( RequestException e ) { // too bad
log . error ( "Metric query failure for \"{}\"" , metricInfo . metricPathQuery ) ; counterAppDRequestFailure . inc ( ) ; continue ; } catch ( UnauthorizedException e ) { log . error ( "AppDynamics authentication failed" ) ; return ; } if ( metricDataList != null && metricDataList . size ( ) > 0 ) { for ( MetricData metricData : metricDataList ) { MetricTimeSeries mts = metricInfo . getMetricTimeSeries ( metricData . metricPath ) ; List < SignalFxProtocolBuffers . DataPoint > mtsDataPoints = processor . process ( mts , metricData . metricValues ) ; dataPoints . addAll ( mtsDataPoints ) ; if ( ! mtsDataPoints . isEmpty ( ) ) { counterMtsReported . inc ( ) ; } else { counterMtsEmpty . inc ( ) ; } } } else { // no metrics found , something is wrong with selection
log . warn ( "No metric found for query \"{}\"" , metricInfo . metricPathQuery ) ; } } } if ( ! dataPoints . isEmpty ( ) ) { try { reporter . report ( dataPoints ) ; counterDataPointsReported . inc ( dataPoints . size ( ) ) ; } catch ( Reporter . ReportException e ) { log . error ( "There were errors reporting metric" ) ; } }


signature:
public class MetricInfo { /** * Create a { @ link MetricTimeSeries } for a given metric path . It will use the given metric path
 * as dimensions mapping and add extra dimensions as specified in the MetricInfo .
 * @ param actualMetricPath
 * metric path used to mapped to dimensions in metric time series .
 * @ return { @ link MetricTimeSeries } */
public MetricTimeSeries getMetricTimeSeries ( String actualMetricPath ) { } }

implementation: Map < String , String > actualDimensions = new HashMap < > ( ) ; actualDimensions . putAll ( dimensions ) ; String [ ] path = actualMetricPath . split ( "\\|" ) ; for ( int i = 0 ; i < dimensionsPath . length ; i ++ ) { if ( "-" . equals ( dimensionsPath [ i ] ) ) { continue ; } actualDimensions . put ( dimensionsPath [ i ] , path [ i ] ) ; } return new MetricTimeSeries ( path [ path . length - 1 ] , actualDimensions ) ;


signature:
public class GenericodeReader { /** * Create a reader builder for com . helger . genericode . v04 . CodeListDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeReader < com . helger . genericode . v04 . CodeListDocument > gc04CodeList ( ) { } }

implementation: return new GenericodeReader < > ( EGenericodeDocumentType . GC04_CODE_LIST , com . helger . genericode . v04 . CodeListDocument . class ) ;


signature:
public class GenericodeReader { /** * Create a reader builder for com . helger . genericode . v04 . CodeListSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeReader < com . helger . genericode . v04 . CodeListSetDocument > gc04CodeListSet ( ) { } }

implementation: return new GenericodeReader < > ( EGenericodeDocumentType . GC04_CODE_LIST_SET , com . helger . genericode . v04 . CodeListSetDocument . class ) ;


signature:
public class GenericodeReader { /** * Create a reader builder for com . helger . genericode . v04 . ColumnSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeReader < com . helger . genericode . v04 . ColumnSetDocument > gc04ColumnSet ( ) { } }

implementation: return new GenericodeReader < > ( EGenericodeDocumentType . GC04_COLUMN_SET , com . helger . genericode . v04 . ColumnSetDocument . class ) ;


signature:
public class GenericodeReader { /** * Create a reader builder for com . helger . genericode . v10 . CodeListDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeReader < com . helger . genericode . v10 . CodeListDocument > gc10CodeList ( ) { } }

implementation: return new GenericodeReader < > ( EGenericodeDocumentType . GC10_CODE_LIST , com . helger . genericode . v10 . CodeListDocument . class ) ;


signature:
public class GenericodeReader { /** * Create a reader builder for com . helger . genericode . v10 . CodeListSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeReader < com . helger . genericode . v10 . CodeListSetDocument > gc10CodeListSet ( ) { } }

implementation: return new GenericodeReader < > ( EGenericodeDocumentType . GC10_CODE_LIST_SET , com . helger . genericode . v10 . CodeListSetDocument . class ) ;


signature:
public class GenericodeReader { /** * Create a reader builder for com . helger . genericode . v10 . ColumnSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeReader < com . helger . genericode . v10 . ColumnSetDocument > gc10ColumnSet ( ) { } }

implementation: return new GenericodeReader < > ( EGenericodeDocumentType . GC10_COLUMN_SET , com . helger . genericode . v10 . ColumnSetDocument . class ) ;


signature:
public class Genericode10Helper { /** * Get the ID of the passed column element .
 * @ param aColumnElement
 * The column element to use . Must be either a { @ link ColumnRef } or a
 * { @ link Column } .
 * @ return The ID of the object */
@ Nonnull public static String getColumnElementID ( @ Nonnull final Object aColumnElement ) { } }

implementation: if ( aColumnElement instanceof ColumnRef ) return ( ( ColumnRef ) aColumnElement ) . getId ( ) ; if ( aColumnElement instanceof Column ) return ( ( Column ) aColumnElement ) . getId ( ) ; if ( aColumnElement instanceof Key ) { final List < KeyColumnRef > aKeyColumnRefs = ( ( Key ) aColumnElement ) . getColumnRef ( ) ; final KeyColumnRef aKeyColumnRef = CollectionHelper . getFirstElement ( aKeyColumnRefs ) ; if ( aKeyColumnRef == null ) throw new IllegalArgumentException ( "Key contains not KeyColumnRef!!" ) ; final Object aRef = aKeyColumnRef . getRef ( ) ; if ( aRef instanceof Column ) return ( ( Column ) aRef ) . getId ( ) ; throw new IllegalArgumentException ( "Unsupported referenced object: " + aRef + " - " + ClassHelper . getSafeClassName ( aRef ) ) ; } throw new IllegalArgumentException ( "Illegal column element: " + aColumnElement + " - " + ClassHelper . getSafeClassName ( aColumnElement ) ) ;


signature:
public class Genericode10Helper { /** * Get the value of a column identified by an ID within a specified row . This
 * method only handles simple values .
 * @ param aRow
 * The row to scan . May not be < code > null < / code > .
 * @ param sColumnID
 * The ID of the column to search . May not be < code > null < / code > .
 * @ return < code > null < / code > if no such column is contained */
@ Nullable public static String getRowValue ( @ Nonnull final Row aRow , @ Nonnull final String sColumnID ) { } }

implementation: for ( final Value aValue : aRow . getValue ( ) ) { final String sID = getColumnElementID ( aValue . getColumnRef ( ) ) ; if ( sID . equals ( sColumnID ) ) { final SimpleValue aSimpleValue = aValue . getSimpleValue ( ) ; return aSimpleValue != null ? aSimpleValue . getValue ( ) : null ; } } return null ;


signature:
public class Genericode10Helper { /** * Get all contained columns
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ return A non - < code > null < / code > list of all columns . Never
 * < code > null < / code > but maybe empty . */
@ Nonnull @ ReturnsMutableCopy public static ICommonsList < Column > getAllColumns ( @ Nonnull final ColumnSet aColumnSet ) { } }

implementation: final ICommonsList < Column > ret = new CommonsArrayList < > ( ) ; getAllColumns ( aColumnSet , ret ) ; return ret ;


signature:
public class Genericode10Helper { /** * Get all contained columns
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ param aTarget
 * A non - < code > null < / code > list where all columns should be added . May
 * not be < code > null < / code > . */
public static void getAllColumns ( @ Nonnull final ColumnSet aColumnSet , @ Nonnull final Collection < Column > aTarget ) { } }

implementation: CollectionHelper . findAll ( aColumnSet . getColumnChoice ( ) , o -> o instanceof Column , o -> aTarget . add ( ( Column ) o ) ) ;


signature:
public class Genericode10Helper { /** * Get the IDs of all contained columns
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ return A non - < code > null < / code > list of all column IDs . Never
 * < code > null < / code > but maybe empty . */
@ Nonnull @ ReturnsMutableCopy public static ICommonsList < String > getAllColumnIDs ( @ Nonnull final ColumnSet aColumnSet ) { } }

implementation: final ICommonsList < String > ret = new CommonsArrayList < > ( ) ; getAllColumnIDs ( aColumnSet , ret ) ; return ret ;


signature:
public class Genericode10Helper { /** * Get the IDs of all contained columns
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ param aTarget
 * The target collection to be filled . May not be < code > null < / code > . */
public static void getAllColumnIDs ( @ Nonnull final ColumnSet aColumnSet , @ Nonnull final Collection < String > aTarget ) { } }

implementation: CollectionHelper . findAll ( aColumnSet . getColumnChoice ( ) , o -> o instanceof Column , o -> aTarget . add ( ( ( Column ) o ) . getId ( ) ) ) ;


signature:
public class Genericode10Helper { /** * Get the column with the specified ID .
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ param sID
 * The ID to search . May be < code > null < / code > .
 * @ return < code > null < / code > if no such column exists . */
@ Nullable public static Column getColumnOfID ( @ Nonnull final ColumnSet aColumnSet , @ Nullable final String sID ) { } }

implementation: if ( sID != null ) for ( final Column aColumn : getAllColumns ( aColumnSet ) ) if ( aColumn . getId ( ) . equals ( sID ) ) return aColumn ; return null ;


signature:
public class Genericode10Helper { /** * Get all contained keys
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ return A non - < code > null < / code > list of all keys . Never < code > null < / code >
 * but maybe empty . */
@ Nonnull @ ReturnsMutableCopy public static ICommonsList < Key > getAllKeys ( @ Nonnull final ColumnSet aColumnSet ) { } }

implementation: final ICommonsList < Key > ret = new CommonsArrayList < > ( ) ; getAllKeys ( aColumnSet , ret ) ; return ret ;


signature:
public class Genericode10Helper { /** * Get all contained keys
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ param aTarget
 * The target collection to be filled . May not be < code > null < / code > . */
public static void getAllKeys ( @ Nonnull final ColumnSet aColumnSet , @ Nonnull final Collection < Key > aTarget ) { } }

implementation: CollectionHelper . findAll ( aColumnSet . getKeyChoice ( ) , o -> o instanceof Key , o -> aTarget . add ( ( Key ) o ) ) ;


signature:
public class Genericode10Helper { /** * Get the IDs of all contained keys
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ param aTarget
 * The target collection to be filled . May not be < code > null < / code > . */
public static void getAllKeyIDs ( @ Nonnull final ColumnSet aColumnSet , @ Nonnull final Collection < String > aTarget ) { } }

implementation: CollectionHelper . findAll ( aColumnSet . getKeyChoice ( ) , o -> o instanceof Key , o -> aTarget . add ( ( ( Key ) o ) . getId ( ) ) ) ;


signature:
public class Genericode10Helper { /** * Get the key with the specified ID .
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ param sID
 * The ID to search . May be < code > null < / code > .
 * @ return < code > null < / code > if no such key exists . */
@ Nullable public static Key getKeyOfID ( @ Nonnull final ColumnSet aColumnSet , @ Nullable final String sID ) { } }

implementation: if ( sID != null ) for ( final Key aKey : getAllKeys ( aColumnSet ) ) if ( aKey . getId ( ) . equals ( sID ) ) return aKey ; return null ;


signature:
public class Genericode10Helper { /** * Check if the passed column ID is a key column in the specified column set
 * @ param aColumnSet
 * The column set to scan . May not be < code > null < / code > .
 * @ param sColumnID
 * The column ID to search . May be < code > null < / code > .
 * @ return < code > true < / code > if the passed column ID is a key column */
public static boolean isKeyColumn ( @ Nonnull final ColumnSet aColumnSet , @ Nullable final String sColumnID ) { } }

implementation: if ( sColumnID != null ) for ( final Key aKey : getAllKeys ( aColumnSet ) ) for ( final KeyColumnRef aColumnRef : aKey . getColumnRef ( ) ) if ( aColumnRef . getRef ( ) instanceof Column ) if ( ( ( Column ) aColumnRef . getRef ( ) ) . getId ( ) . equals ( sColumnID ) ) return true ; return false ;


signature:
public class Genericode10Helper { /** * Create a { @ link ShortName } object
 * @ param sValue
 * The value to assign
 * @ return Never < code > null < / code > . */
@ Nonnull public static ShortName createShortName ( @ Nullable final String sValue ) { } }

implementation: final ShortName aShortName = s_aFactory . createShortName ( ) ; aShortName . setValue ( sValue ) ; return aShortName ;


signature:
public class Genericode10Helper { /** * Create a { @ link LongName } object
 * @ param sValue
 * The value to assign
 * @ return Never < code > null < / code > . */
@ Nonnull public static LongName createLongName ( @ Nullable final String sValue ) { } }

implementation: final LongName aLongName = s_aFactory . createLongName ( ) ; aLongName . setValue ( sValue ) ; return aLongName ;


signature:
public class Genericode10Helper { /** * Create a { @ link SimpleValue } object
 * @ param sValue
 * The value to assign
 * @ return Never < code > null < / code > . */
@ Nonnull public static SimpleValue createSimpleValue ( @ Nullable final String sValue ) { } }

implementation: final SimpleValue aSimpleValue = s_aFactory . createSimpleValue ( ) ; aSimpleValue . setValue ( sValue ) ; return aSimpleValue ;


signature:
public class Genericode10Helper { /** * Create a { @ link KeyColumnRef } object
 * @ param aColumn
 * The column to reference
 * @ return Never < code > null < / code > . */
@ Nonnull public static KeyColumnRef createKeyColumnRef ( @ Nullable final Column aColumn ) { } }

implementation:
final KeyColumnRef aColumnRef = s_aFactory . createKeyColumnRef ( ) ; // Important : reference the object itself and not just the ID ! ! !
aColumnRef . setRef ( aColumn ) ; return aColumnRef ;


signature:
public class Genericode10Helper { /** * Create a new column to be added to a column set
 * @ param sColumnID
 * The ID of the column
 * @ param eUseType
 * The usage type ( optional or required )
 * @ param sShortName
 * The short name of the column
 * @ param sLongName
 * The long name of the column
 * @ param sDataType
 * The data type to use
 * @ return Never < code > null < / code > . */
@ Nonnull public static Column createColumn ( @ Nonnull @ Nonempty final String sColumnID , @ Nonnull final UseType eUseType , @ Nonnull @ Nonempty final String sShortName , @ Nullable final String sLongName , @ Nonnull @ Nonempty final String sDataType ) { } }

implementation: ValueEnforcer . notEmpty ( sColumnID , "ColumnID" ) ; ValueEnforcer . notNull ( eUseType , "useType" ) ; ValueEnforcer . notEmpty ( sShortName , "ShortName" ) ; ValueEnforcer . notEmpty ( sDataType , "DataType" ) ; final Column aColumn = s_aFactory . createColumn ( ) ; aColumn . setId ( sColumnID ) ; aColumn . setUse ( eUseType ) ; aColumn . setShortName ( createShortName ( sShortName ) ) ; if ( StringHelper . hasText ( sLongName ) ) aColumn . getLongName ( ) . add ( createLongName ( sLongName ) ) ; final Data aData = s_aFactory . createData ( ) ; aData . setType ( sDataType ) ; aColumn . setData ( aData ) ; return aColumn ;


signature:
public class Genericode10Helper { /** * Create a new key to be added to a column set
 * @ param sColumnID
 * The ID of the column
 * @ param sShortName
 * The short name of the column
 * @ param sLongName
 * The long name of the column
 * @ param aColumn
 * The referenced column . May not be < code > null < / code > .
 * @ return Never < code > null < / code > . */
@ Nonnull public static Key createKey ( @ Nonnull @ Nonempty final String sColumnID , @ Nonnull @ Nonempty final String sShortName , @ Nullable final String sLongName , @ Nonnull final Column aColumn ) { } }

implementation: ValueEnforcer . notEmpty ( sColumnID , "ColumnID" ) ; ValueEnforcer . notEmpty ( sShortName , "ShortName" ) ; ValueEnforcer . notNull ( aColumn , "Column" ) ; final Key aKey = s_aFactory . createKey ( ) ; aKey . setId ( sColumnID ) ; aKey . setShortName ( createShortName ( sShortName ) ) ; if ( StringHelper . hasText ( sLongName ) ) aKey . getLongName ( ) . add ( createLongName ( sLongName ) ) ; aKey . getColumnRef ( ) . add ( createKeyColumnRef ( aColumn ) ) ; return aKey ;


signature:
public class ExcelReadOptions { /** * Set the number of lines to skip before the header row starts
 * @ param nLinesToSkip
 * Must be & ge ; 0.
 * @ return this */
@ Nonnull public ExcelReadOptions < USE_TYPE > setLinesToSkip ( @ Nonnegative final int nLinesToSkip ) { } }

implementation: ValueEnforcer . isGE0 ( nLinesToSkip , "LinesToSkip" ) ; m_nLinesToSkip = nLinesToSkip ; return this ;


signature:
public class ExcelReadOptions { /** * Add a single column definition .
 * @ param nIndex
 * The 0 - based index of the column in Excel .
 * @ param sColumnID
 * The ID of the column in Genericode .
 * @ param eUseType
 * Optional or required ?
 * @ param sDataType
 * The XSD data type to be used in Genericode . Use " string " if you ' re
 * unsure .
 * @ param bKeyColumn
 * < code > true < / code > if this is a key column , < code > false < / code >
 * otherwise . Only required columns can be key columns .
 * @ return this */
@ Nonnull public ExcelReadOptions < USE_TYPE > addColumn ( @ Nonnegative final int nIndex , @ Nonnull @ Nonempty final String sColumnID , @ Nonnull final USE_TYPE eUseType , @ Nonnull @ Nonempty final String sDataType , final boolean bKeyColumn ) { } }

implementation: ValueEnforcer . isGE0 ( nIndex , "Index" ) ; final Integer aIndex = Integer . valueOf ( nIndex ) ; if ( m_aColumns . containsKey ( aIndex ) ) throw new IllegalArgumentException ( "The column at index " + nIndex + " is already mapped!" ) ; m_aColumns . put ( aIndex , new ExcelReadColumn < > ( nIndex , sColumnID , eUseType , sDataType , bKeyColumn ) ) ; return this ;


signature:
public class GenericodeWriter { /** * Create a writer builder for com . helger . genericode . v04 . CodeListDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeWriter < com . helger . genericode . v04 . CodeListDocument > gc04CodeList ( ) { } }

implementation: return new GenericodeWriter < > ( EGenericodeDocumentType . GC04_CODE_LIST ) ;


signature:
public class GenericodeWriter { /** * Create a writer builder for com . helger . genericode . v04 . CodeListSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeWriter < com . helger . genericode . v04 . CodeListSetDocument > gc04CodeListSet ( ) { } }

implementation: return new GenericodeWriter < > ( EGenericodeDocumentType . GC04_CODE_LIST_SET ) ;


signature:
public class GenericodeWriter { /** * Create a writer builder for com . helger . genericode . v04 . ColumnSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeWriter < com . helger . genericode . v04 . ColumnSetDocument > gc04ColumnSet ( ) { } }

implementation: return new GenericodeWriter < > ( EGenericodeDocumentType . GC04_COLUMN_SET ) ;


signature:
public class GenericodeWriter { /** * Create a writer builder for com . helger . genericode . v10 . CodeListDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeWriter < com . helger . genericode . v10 . CodeListDocument > gc10CodeList ( ) { } }

implementation: return new GenericodeWriter < > ( EGenericodeDocumentType . GC10_CODE_LIST ) ;


signature:
public class GenericodeWriter { /** * Create a writer builder for com . helger . genericode . v10 . CodeListSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeWriter < com . helger . genericode . v10 . CodeListSetDocument > gc10CodeListSet ( ) { } }

implementation: return new GenericodeWriter < > ( EGenericodeDocumentType . GC10_CODE_LIST_SET ) ;


signature:
public class GenericodeWriter { /** * Create a writer builder for com . helger . genericode . v10 . ColumnSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeWriter < com . helger . genericode . v10 . ColumnSetDocument > gc10ColumnSet ( ) { } }

implementation: return new GenericodeWriter < > ( EGenericodeDocumentType . GC10_COLUMN_SET ) ;


signature:
public class GenericodeValidator { /** * Create a validator builder for com . helger . genericode . v04 . CodeListDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeValidator < com . helger . genericode . v04 . CodeListDocument > gc04CodeList ( ) { } }

implementation: return new GenericodeValidator < > ( EGenericodeDocumentType . GC04_CODE_LIST ) ;


signature:
public class GenericodeValidator { /** * Create a validator builder for
 * com . helger . genericode . v04 . CodeListSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeValidator < com . helger . genericode . v04 . CodeListSetDocument > gc04CodeListSet ( ) { } }

implementation: return new GenericodeValidator < > ( EGenericodeDocumentType . GC04_CODE_LIST_SET ) ;


signature:
public class GenericodeValidator { /** * Create a validator builder for com . helger . genericode . v04 . ColumnSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeValidator < com . helger . genericode . v04 . ColumnSetDocument > gc04ColumnSet ( ) { } }

implementation: return new GenericodeValidator < > ( EGenericodeDocumentType . GC04_COLUMN_SET ) ;


signature:
public class GenericodeValidator { /** * Create a validator builder for com . helger . genericode . v10 . CodeListDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeValidator < com . helger . genericode . v10 . CodeListDocument > gc10CodeList ( ) { } }

implementation: return new GenericodeValidator < > ( EGenericodeDocumentType . GC10_CODE_LIST ) ;


signature:
public class GenericodeValidator { /** * Create a validator builder for
 * com . helger . genericode . v10 . CodeListSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeValidator < com . helger . genericode . v10 . CodeListSetDocument > gc10CodeListSet ( ) { } }

implementation: return new GenericodeValidator < > ( EGenericodeDocumentType . GC10_CODE_LIST_SET ) ;


signature:
public class GenericodeValidator { /** * Create a validator builder for com . helger . genericode . v10 . ColumnSetDocument .
 * @ return The builder and never < code > null < / code > */
@ Nonnull public static GenericodeValidator < com . helger . genericode . v10 . ColumnSetDocument > gc10ColumnSet ( ) { } }

implementation: return new GenericodeValidator < > ( EGenericodeDocumentType . GC10_COLUMN_SET ) ;


signature:
public class Exchange { /** * @ param pair of exchange / coin
 * @ return Returns the last value of the exchange for a given pair
 * coin / exchange . We have to use a double because some exchanges measure
 * values in satoshis ( 10 ^ - 8 ) . A float has just 24 bits of precision which
 * is not enough to represent 8 decimal places .
 * @ throws NumberFormatException
 * @ throws IOException
 * @ throws NoMarketDataException */
public double getLastValue ( Pair pair ) throws NumberFormatException , IOException , NoMarketDataException { } }

implementation: double lastValue = Double . parseDouble ( getTicker ( pair ) ) ; return lastValue ;


signature:
public class SendAppFeedback { /** * Send Logs to Server */
protected static void sendLogsToServer ( boolean setSentTime ) { } }

implementation:
long timeSent = new Date ( ) . getTime ( ) ; String appFeedBackSummary = Utility . convertFileToString ( "AppFeedBackSummary.json" ) ; if ( "" . equals ( appFeedBackSummary ) || "{}" . equals ( appFeedBackSummary ) ) { return ; } else { try { JSONObject appFeedBacksummaryJSON = new JSONObject ( appFeedBackSummary ) ; JSONArray savedArray = ( JSONArray ) appFeedBacksummaryJSON . get ( "saved" ) ; HashMap < String , String > timeSentMap = new HashMap < > ( ) ; // Add timeSent to all the json file ' s which are not set with timeSent
for ( int i = 0 ; i < savedArray . length ( ) ; i ++ ) { String instanceName = ( String ) savedArray . get ( i ) ; String screenFeedBackJsonFile = Utility . getJSONfileName ( instanceName ) ; String actualTimeSent = Utility . addAndFetchSentTimeFromScreenFeedBackJson ( screenFeedBackJsonFile , timeSent , setSentTime ) ; if ( actualTimeSent != null ) { timeSentMap . put ( instanceName , actualTimeSent ) ; } } // Iterate each feedback element which is not yet sent
for ( int i = 0 ; i < savedArray . length ( ) ; i ++ ) { String instanceName = ( String ) savedArray . get ( i ) ; String screenFeedBackJsonFile = Utility . getJSONfileName ( instanceName ) ; String actualTimeSent = timeSentMap . get ( instanceName ) ; String zipFile = Utility . storageDirectory + instanceName + "_" + actualTimeSent + ".zip" ; List < String > fileList = new ArrayList < > ( ) ; fileList . add ( Utility . getImageFileName ( instanceName ) ) ; fileList . add ( screenFeedBackJsonFile ) ; Utility . createZipArchive ( fileList , zipFile ) ; LogPersister . sendInAppFeedBackFile ( zipFile , new FeedBackUploadResponseListener ( instanceName , zipFile , actualTimeSent ) ) ; } } catch ( JSONException je ) { } }


signature:
public class LogPersister { /** * @ exclude
 * For unit testing only . Also unsets static setting fields . */
protected static void unsetContext ( ) { } }

implementation: instances . clear ( ) ; context = null ; capture = null ; analyticsCapture = null ; logFileMaxSize = null ; level = null ; uncaughtExceptionHandler = null ; fileLoggerInstance = null ; LogManager . getLogManager ( ) . getLogger ( "" ) . removeHandler ( julHandler ) ;


signature:
public class LogPersister { /** * Context object must be set in order to use the Logger API . This is called automatically by BMSClient .
 * @ param context Android Context object */
static public void setContext ( final Context context ) { } }

implementation:
// once setContext is called , we can set up the uncaught exception handler since
// it will force logging to the file
if ( null == LogPersister . context ) { // set a custom JUL Handler so we can capture third - party and internal java . util . logging . Logger API calls
LogManager . getLogManager ( ) . getLogger ( "" ) . addHandler ( julHandler ) ; java . util . logging . Logger . getLogger ( "" ) . setLevel ( Level . ALL ) ; LogPersister . context = context ; // now that we have a context , let ' s set the fileLoggerInstance properly unless it was already set by tests
if ( fileLoggerInstance == null || fileLoggerInstance instanceof FileLogger ) { FileLogger . setContext ( context ) ; fileLoggerInstance = FileLogger . getInstance ( ) ; } SharedPreferences prefs = LogPersister . context . getSharedPreferences ( SHARED_PREF_KEY , Context . MODE_PRIVATE ) ; // level
if ( null != level ) { // someone called setLevel method before setContext
setLevelSync ( level ) ; // seems redundant , but we do this to save to SharedPrefs now that we have Context
} else { // set it to the SharedPrefs value , or DEFAULT if no value in SharedPrefs yet
setLevelSync ( Logger . LEVEL . fromString ( prefs . getString ( SHARED_PREF_KEY_level , getLevelDefault ( ) . toString ( ) ) ) ) ; } // logFileMaxSize
if ( null != logFileMaxSize ) { // someone called setMaxStoreSize method before setContext
setMaxLogStoreSize ( logFileMaxSize ) ; // seems redundant , but we do this to save to SharedPrefs now that we have Context
} else { // set it to the SharedPrefs value , or DEFAULT if no value in SharedPrefs yet
setMaxLogStoreSize ( prefs . getInt ( SHARED_PREF_KEY_logFileMaxSize , DEFAULT_logFileMaxSize ) ) ; } // capture
if ( null != capture ) { // someone called setCapture method before setContext
setCaptureSync ( capture ) ; // seems redundant , but we do this to save to SharedPrefs now that we have Context
} else { // set it to the SharedPrefs value , or DEFAULT if no value in SharedPrefs yet
setCaptureSync ( prefs . getBoolean ( SHARED_PREF_KEY_logPersistence , DEFAULT_capture ) ) ; } uncaughtExceptionHandler = new UncaughtExceptionHandler ( ) ; Thread . setDefaultUncaughtExceptionHandler ( uncaughtExceptionHandler ) ; }


signature:
public class LogPersister { /** * Set the level and above at which log messages should be saved / printed .
 * For example , passing LEVEL . INFO will log INFO , WARN , ERROR , and FATAL . A
 * null parameter value is ignored and has no effect .
 * @ param desiredLevel @ see LEVEL */
static public void setLogLevel ( final Logger . LEVEL desiredLevel ) { } }

implementation:
ThreadPoolWorkQueue . execute ( new Runnable ( ) { @ Override public void run ( ) { setLevelSync ( desiredLevel ) ; // we do this mostly to enable unit tests to logger . wait ( 100 ) instead of
// Thread . sleep ( 100 ) - - it ' s faster , more stable , and more deterministic that way
synchronized ( WAIT_LOCK ) { WAIT_LOCK . notifyAll ( ) ; } } } ) ;


signature:
public class LogPersister { /** * Get the current Logger . LEVEL .
 * @ return Logger . LEVEL */
static public Logger . LEVEL getLogLevel ( ) { } }

implementation: final Future < Logger . LEVEL > task = ThreadPoolWorkQueue . submit ( new Callable < Logger . LEVEL > ( ) { @ Override public Logger . LEVEL call ( ) { return getLevelSync ( ) ; } } ) ; try { return task . get ( ) ; } catch ( Exception e ) { return getLevelSync ( ) ; }


signature:
public class LogPersister { /** * Global setting : turn persisting of log data passed to this class ' s log methods on or off .
 * @ param shouldStoreLogs flag to indicate if log data should be saved persistently */
static public void storeLogs ( final boolean shouldStoreLogs ) { } }

implementation:
ThreadPoolWorkQueue . execute ( new Runnable ( ) { @ Override public void run ( ) { setCaptureSync ( shouldStoreLogs ) ; // we do this mostly to enable unit tests to logger . wait ( 100 ) instead of
// Thread . sleep ( 100 ) - - it ' s faster , more stable , and more deterministic that way
synchronized ( WAIT_LOCK ) { WAIT_LOCK . notifyAll ( ) ; } } } ) ;


signature:
public class LogPersister { /** * Get the current value of the capture flag , indicating that the Logger is recording log calls persistently .
 * @ return current value of capture flag */
static public boolean getCapture ( ) { } }

implementation: final Future < Boolean > task = ThreadPoolWorkQueue . submit ( new Callable < Boolean > ( ) { @ Override public Boolean call ( ) { return getCaptureSync ( ) ; } } ) ; try { return task . get ( ) ; } catch ( Exception e ) { return getCaptureSync ( ) ; }


signature:
public class LogPersister { /** * @ exclude
 * Global setting : turn persisting of analytics data passed to this class ' s analytics methods on or off .
 * @ param capture flag to indicate if analytics data should be saved persistently */
static public void setAnalyticsCapture ( final boolean capture ) { } }

implementation:
ThreadPoolWorkQueue . execute ( new Runnable ( ) { @ Override public void run ( ) { setAnalyticsCaptureSync ( capture ) ; // we do this mostly to enable unit tests to logger . wait ( 100 ) instead of
// Thread . sleep ( 100 ) - - it ' s faster , more stable , and more deterministic that way
synchronized ( WAIT_LOCK ) { WAIT_LOCK . notifyAll ( ) ; } } } ) ;


signature:
public class LogPersister { /** * @ exclude
 * Get the current value of the analyticsCapture flag , indicating that the Logger is recording analytics calls persistently .
 * @ return current value of analyticsCapture flag */
static public boolean getAnalyticsCapture ( ) { } }

implementation: final Future < Boolean > task = ThreadPoolWorkQueue . submit ( new Callable < Boolean > ( ) { @ Override public Boolean call ( ) { return getAnalyticsCaptureSync ( ) ; } } ) ; try { return task . get ( ) ; } catch ( Exception e ) { return getAnalyticsCaptureSync ( ) ; }