1+ package br .com .swconsultoria .nfe .dom .enuns ;
2+
3+ import br .com .swconsultoria .nfe .exception .NfeException ;
4+ import br .com .swconsultoria .nfe .schema .consCad .TConsCad ;
5+ import br .com .swconsultoria .nfe .schema .distdfeint .DistDFeInt ;
6+ import br .com .swconsultoria .nfe .schema .retConsCad .TRetConsCad ;
7+ import br .com .swconsultoria .nfe .schema .retdistdfeint .RetDistDFeInt ;
8+ import br .com .swconsultoria .nfe .schema_4 .consReciNFe .TConsReciNFe ;
9+ import br .com .swconsultoria .nfe .schema_4 .consSitNFe .TConsSitNFe ;
10+ import br .com .swconsultoria .nfe .schema_4 .consStatServ .TConsStatServ ;
11+ import br .com .swconsultoria .nfe .schema_4 .enviNFe .TEnviNFe ;
12+ import br .com .swconsultoria .nfe .schema_4 .enviNFe .TNFe ;
13+ import br .com .swconsultoria .nfe .schema_4 .enviNFe .TNfeProc ;
14+ import br .com .swconsultoria .nfe .schema_4 .inutNFe .TInutNFe ;
15+ import br .com .swconsultoria .nfe .schema_4 .inutNFe .TProcInutNFe ;
16+ import br .com .swconsultoria .nfe .schema_4 .retConsReciNFe .TRetConsReciNFe ;
17+ import br .com .swconsultoria .nfe .schema_4 .retConsSitNFe .TRetConsSitNFe ;
18+ import br .com .swconsultoria .nfe .schema_4 .retConsStatServ .TRetConsStatServ ;
19+ import br .com .swconsultoria .nfe .schema_4 .retEnviNFe .TRetEnviNFe ;
20+ import br .com .swconsultoria .nfe .schema_4 .retInutNFe .TRetInutNFe ;
21+ import lombok .Getter ;
22+ import lombok .RequiredArgsConstructor ;
23+
24+ @ Getter
25+ @ RequiredArgsConstructor
26+ public enum XsdEnum {
27+
28+ //Consulta Cadastro
29+ CONS_CAD (TConsCad .class , "ConsCad" ),
30+ RET_CONS_CAD (TRetConsCad .class , "retConsCad" ),
31+
32+ //Consulta Status Serviço
33+ CONS_STAT_SERV (TConsStatServ .class , "consStatServ" ),
34+ RET_STAT_SERV (TRetConsStatServ .class , "retConsStatServ" ),
35+
36+ //Consulta Recibo
37+ CONS_RECI_NFE (TConsReciNFe .class , "consReciNFe" ),
38+ RET_CONS_RECI_NFE (TRetConsReciNFe .class , "retConsReciNFe" ),
39+
40+ //Consulta Situacao
41+ CONS_SIT_NFE (TConsSitNFe .class , "consSitNFe" ),
42+ RET_CONS_SIT_NFE (TRetConsSitNFe .class , "retConsSitNFe" ),
43+
44+ //NFe
45+ NFE (TNFe .class , "NFe" ),
46+ ENVI_NFE (TEnviNFe .class , "enviNFe" ),
47+ RET_ENVI_NFE (TRetEnviNFe .class , "retEnviNFe" ),
48+ NFE_PROC (TNfeProc .class , "nfeProc" ),
49+
50+ //Inutilização
51+ INUT_NFE (TInutNFe .class , "inutNFe" ),
52+ PROC_INUT_NFE (TProcInutNFe .class , "procInutNFe" ),
53+ RET_INUT_NFE (TRetInutNFe .class , "retInutNFe" ),
54+
55+ //Prot
56+ ENVI_PROT_NFE (br .com .swconsultoria .nfe .schema_4 .enviNFe .TProtNFe .class , "protNFe" ),
57+ CONS_PROT_NFE (br .com .swconsultoria .nfe .schema_4 .consSitNFe .TProtNFe .class , "protNFe" ),
58+ CONS_RECI_PROT_NFE (br .com .swconsultoria .nfe .schema_4 .consReciNFe .TProtNFe .class , "protNFe" ),
59+
60+ //Cancelamento
61+ CANC_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancNFe .TProcEvento .class , "procEventoNFe" ),
62+ CANC_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancNFe .TEnvEvento .class , "procEventoNFe" ),
63+ CANC_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancNFe .TRetEnvEvento .class , "procEventoNFe" ),
64+
65+ //Cancelamento Substituicao
66+ CANC_SUBS_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancSubst .TProcEvento .class , "procEvento" ),
67+ CANC_SUBS_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancSubst .TEnvEvento .class , "envEvento" ),
68+ CANC_SUBS_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancSubst .TRetEnvEvento .class , "retEnvEvento" ),
69+
70+ //Ator Interessado
71+ ATOR_INTER_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envEventoAtorInteressado .TProcEvento .class , "procEvento" ),
72+ ATOR_INTER_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoAtorInteressado .TEnvEvento .class , "envEvento" ),
73+ ATOR_INTER_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoAtorInteressado .TRetEnvEvento .class , "retEnvEvento" ),
74+
75+ //Carta Correcao
76+ CCE_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envcce .TProcEvento .class , "procEvento" ),
77+ CCE_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envcce .TEnvEvento .class , "envEvento" ),
78+ CCE_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envcce .TRetEnvEvento .class , "retEnvEvento" ),
79+
80+ //EPEC
81+ EPEC_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envEpec .TProcEvento .class , "procEvento" ),
82+ EPEC_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEpec .TEnvEvento .class , "envEvento" ),
83+ EPEC_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEpec .TRetEnvEvento .class , "retEnvEvento" ),
84+
85+ //MANIFESTACAO
86+ MAN_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envConfRecebto .TProcEvento .class , "procEvento" ),
87+ MAN_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envConfRecebto .TEnvEvento .class , "envEvento" ),
88+ MAN_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envConfRecebto .TRetEnvEvento .class , "retEnvEvento" ),
89+
90+ //INSUCESSO
91+ INS_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envEventoInsucessoNFe .TProcEvento .class , "procEvento" ),
92+ INS_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoInsucessoNFe .TEnvEvento .class , "envEvento" ),
93+ INS_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoInsucessoNFe .TRetEnvEvento .class , "retEnvEvento" ),
94+
95+ //CANC INSUCESSO
96+ _PROC_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancInsucessoNFe .TProcEvento .class , "procEvento" ),
97+ _ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancInsucessoNFe .TEnvEvento .class , "envEvento" ),
98+ _RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancInsucessoNFe .TRetEnvEvento .class , "retEnvEvento" ),
99+
100+ //ECONF
101+ ECONF_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envEventoEConf .TProcEvento .class , "procEvento" ),
102+ ECONF_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoEConf .TEnvEvento .class , "envEvento" ),
103+ ECONF_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoEConf .TRetEnvEvento .class , "retEnvEvento" ),
104+
105+ //CANC ECONF
106+ CANC_ECONF_PROC_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancEConf .TProcEvento .class , "procEvento" ),
107+ CANC_ECONF_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancEConf .TEnvEvento .class , "envEvento" ),
108+ CANC_ECONF_RET_ENV_EVENTO (br .com .swconsultoria .nfe .schema .envEventoCancEConf .TRetEnvEvento .class , "retEnvEvento" ),
109+
110+ //DistDfe
111+ DIST_DFE_INT (DistDFeInt .class , "distDFeInt" ),
112+ RET_DIST_DFE_INT (RetDistDFeInt .class , "retDistDFeInt" );
113+
114+ private final Class <?> clazz ;
115+ private final String name ;
116+
117+ public static XsdEnum getByClassName (String simpleClassName ) throws NfeException {
118+ for (XsdEnum e : values ()) {
119+ if (e .clazz .getName ().equals (simpleClassName )) return e ;
120+ }
121+ throw new NfeException ("Xsd Não mapeado: " + simpleClassName );
122+ }
123+ }
0 commit comments