Skip to content

Commit

Permalink
Versão 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-merelis committed Jun 2, 2014
1 parent c4bd0d1 commit 59b6840
Show file tree
Hide file tree
Showing 36 changed files with 130 additions and 127 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ Exemplo:
//Escrever o objeto no arquivo
sintegraWriter.write(sintegra);

sintegraWriter.writerFlush();
sintegraWriter.writerClose();
sintegraWriter.flush();
sintegraWriter.close();
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<dependency>
<groupId>coffeepot</groupId>
<artifactId>coffeepot-bean-wr</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/Sintegra.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.br.sintegra.registros.*;
import java.util.Collections;
import java.util.Comparator;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro10.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.Convenio;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro11.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro50.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.Emitente;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro51.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.SituacaoDocumentoFiscal;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro53.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.DocumentoFiscal;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro54.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.DocumentoFiscal;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro55.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import java.util.Date;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro56.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.DocumentoFiscal;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro57.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.DocumentoFiscal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.types.Align;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro61.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.DocumentoFiscal;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro70.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.DocumentoFiscal;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro71.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.DocumentoFiscal;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro74.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import coffeepot.br.sintegra.tipos.CodigoDePosse;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro75.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;
import java.util.Date;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/registros/Registro90.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/


import coffeepot.bean.wr.anotation.Field;
import coffeepot.bean.wr.anotation.Record;
import coffeepot.bean.wr.annotation.Field;
import coffeepot.bean.wr.annotation.Record;
import coffeepot.bean.wr.typeHandler.DefaultStringHandler;
import coffeepot.bean.wr.types.Align;

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/coffeepot/br/sintegra/tipos/CodigoDePosse.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

/**
*
* @author Jeandeson O. Merelis <jean.merelis@gmail.com>
* @author Jeandeson O. Merelis
*/
public enum CodigoDePosse implements EnumCodificado {

PROPRIEDADE_INFORMANTE_POSSE_INFORMATANTE("1", "Mercadorias de propriedade do Informante e em seu poder"),
PROPRIEDADE_INFORMANTE_POSSE_TERCEIROS("2", "Mercadorias de propriedade do Informante em poder de terceiros"),
PROPRIEDADE_TERCEIROS_POSSE_INFORMANTE("3", "Mercadorias de propriedade de terceiros em poder do Informante");
private String codigo;
private String descricao;
private final String codigo;
private final String descricao;

private CodigoDePosse(String codigo, String descricao) {
this.codigo = codigo;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/coffeepot/br/sintegra/tipos/Convenio.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public enum Convenio implements EnumCodificado {
CONV_1_5795_3002("1", "1 - Convênio 57/95 Versão 31/99 Alt. 30/02"),
CONV_2_5795_14202("2", "2 - Convênio 57/95 Versão 69/02 Alt. 142/02"),
CONV_3_5795_7603("3", "3 - Convênio 57/95 Alt. 76/03");
private String codigo;
private String descricao;
private final String codigo;
private final String descricao;

private Convenio(String codigo, String descricao) {
this.codigo = codigo;
Expand Down
90 changes: 51 additions & 39 deletions src/main/java/coffeepot/br/sintegra/tipos/DocumentoFiscal.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,56 +19,68 @@
* limitations under the License.
* #L%
*/


/**
*
* @author Jeandeson O. Merelis
*/
public enum DocumentoFiscal implements EnumCodificado {
AUTORIZACAO_CARREGAMENTO_TRANSPORTE(24,"Autorização de Carregamento e Transporte, modelo 24"),
BILHETE_PASSAGEM_AQUAVIARIO(14,"Bilhete de Passagem Aquaviário, modelo 14"),
BILHETE_PASSAGEM_FERROVIARIO(16,"Bilhete de Passagem Ferroviário, modelo 16"),
BILHETE_PASSAGEM_NOTA_BAGAGEM(15,"Bilhete de Passagem e Nota de Bagagem, modelo 15"),
BILHETE_PASSAGEM_RODOVIARIO(13,"Bilhete de Passagem Rodoviário, modelo 13"),
CONHECIMENTO_AEREO(10,"Conhecimento Aéreo, modelo 10"),
CONHECIMENTO_TRANSPORTE_AQUAVIARIO_CARGAS(9,"Conhecimento de Transporte Aquaviário de Cargas, modelo 9"),
CONHECIMENTO_TRANSPORTE_ELETRONICO(57,"Conhecimento de Transporte Eletrônico, modelo 57"),
CONHECIMENTO_TRANSPORTE_FERROVIARIO_CARGAS(11,"Conhecimento de Transporte Ferroviário de Cargas, modelo 11"),
CONHECIMENTO_TRANSPORTE_MULTIMODAL_CARGAS(26,"Conhecimento de Transporte Multimodal de Cargas, modelo 26"),
CONHECIMENTO_TRANSPORTE_RODOVIARIO_CARGAS(8,"Conhecimento de Transporte Rodoviário de Cargas, modelo 8"),
DESPACHO_TRANSPORTE(17,"Despacho de Transporte, modelo 17"),
MANIFESTO_DE_CARGA(25,"Manifesto de Carga, modelo 25"),
NOTA_FISCAL(1,"Nota Fiscal, modelo 1"),
NOTA_FISCAL_ELETRONICA(55,"Nota Fiscal Eletrônica, modelo 55"),
NOTA_FISCAL_ENERGIA_ELETRICA(6,"Nota Fiscal de Energia Elétrica, modelo 6"),
NOTA_FISCAL_ENTRADA(3,"Nota Fiscal de Entrada, modelo 3"),
NOTA_FISCAL_PRODUTOR(4,"Nota Fiscal de Produtor, modelo 4"),
NOTA_FISCAL_SERVICO_COMUNICACAO(21,"Nota Fiscal de Serviço de Comunicação, modelo 21"),
NOTA_FISCAL_SERVICO_TELECOMUNICACAO(22,"Nota Fiscal de Serviço de Telecomunicações, modelo 22"),
NOTA_FISCAL_SERVICO_TRANSPORTE(7,"Nota Fiscal de Serviço de Transporte, modelo 7"),
NOTA_FISCAL_SERVICO_TRANSPORTE_FERROVIARIO(27,"Nota Fiscal de Serviço de Transporte Ferroviário, modelo 27"),
NOTA_FISCAL_VENDA_CONSUMIDOR(2,"Nota Fiscal de Venda a Consumidor, modelo 02"),
ORDEM_COLETA_CARGA(20,"Ordem de Coleta de Carga, modelo 20"),
RESUMO_MOVIMENTO_DIARIO(18,"Resumo Movimento Diário, modelo 18");
private int codigo;
private String descricao;
private DocumentoFiscal(int codigo, String descricao){
public enum DocumentoFiscal implements EnumCodificado {

AUTORIZACAO_CARREGAMENTO_TRANSPORTE(24, "Autorização de Carregamento e Transporte, modelo 24"),
BILHETE_PASSAGEM_AQUAVIARIO(14, "Bilhete de Passagem Aquaviário, modelo 14"),
BILHETE_PASSAGEM_FERROVIARIO(16, "Bilhete de Passagem Ferroviário, modelo 16"),
BILHETE_PASSAGEM_NOTA_BAGAGEM(15, "Bilhete de Passagem e Nota de Bagagem, modelo 15"),
BILHETE_PASSAGEM_RODOVIARIO(13, "Bilhete de Passagem Rodoviário, modelo 13"),
CONHECIMENTO_AEREO(10, "Conhecimento Aéreo, modelo 10"),
CONHECIMENTO_TRANSPORTE_AQUAVIARIO_CARGAS(9, "Conhecimento de Transporte Aquaviário de Cargas, modelo 9"),
CONHECIMENTO_TRANSPORTE_ELETRONICO(57, "Conhecimento de Transporte Eletrônico, modelo 57"),
CONHECIMENTO_TRANSPORTE_FERROVIARIO_CARGAS(11, "Conhecimento de Transporte Ferroviário de Cargas, modelo 11"),
CONHECIMENTO_TRANSPORTE_MULTIMODAL_CARGAS(26, "Conhecimento de Transporte Multimodal de Cargas, modelo 26"),
CONHECIMENTO_TRANSPORTE_RODOVIARIO_CARGAS(8, "Conhecimento de Transporte Rodoviário de Cargas, modelo 8"),
DESPACHO_TRANSPORTE(17, "Despacho de Transporte, modelo 17"),
MANIFESTO_DE_CARGA(25, "Manifesto de Carga, modelo 25"),
NOTA_FISCAL(1, "Nota Fiscal, modelo 1"),
NOTA_FISCAL_ELETRONICA(55, "Nota Fiscal Eletrônica, modelo 55"),
NOTA_FISCAL_ENERGIA_ELETRICA(6, "Nota Fiscal de Energia Elétrica, modelo 6"),
NOTA_FISCAL_ENTRADA(3, "Nota Fiscal de Entrada, modelo 3"),
NOTA_FISCAL_PRODUTOR(4, "Nota Fiscal de Produtor, modelo 4"),
NOTA_FISCAL_SERVICO_COMUNICACAO(21, "Nota Fiscal de Serviço de Comunicação, modelo 21"),
NOTA_FISCAL_SERVICO_TELECOMUNICACAO(22, "Nota Fiscal de Serviço de Telecomunicações, modelo 22"),
NOTA_FISCAL_SERVICO_TRANSPORTE(7, "Nota Fiscal de Serviço de Transporte, modelo 7"),
NOTA_FISCAL_SERVICO_TRANSPORTE_FERROVIARIO(27, "Nota Fiscal de Serviço de Transporte Ferroviário, modelo 27"),
NOTA_FISCAL_VENDA_CONSUMIDOR(2, "Nota Fiscal de Venda a Consumidor, modelo 02"),
ORDEM_COLETA_CARGA(20, "Ordem de Coleta de Carga, modelo 20"),
RESUMO_MOVIMENTO_DIARIO(18, "Resumo Movimento Diário, modelo 18");

private final int codigo;
private final String descricao;

private DocumentoFiscal(int codigo, String descricao) {
this.codigo = codigo;
this.descricao = descricao;
}

@Override
public String getCodigo(){
public String getCodigo() {
return String.valueOf(codigo);
}
public String getDescricao(){

public String getDescricao() {
return descricao;
}


public static DocumentoFiscal fromCodigoInt(int i) {
DocumentoFiscal[] v = DocumentoFiscal.values();
for (DocumentoFiscal df : v) {
if (df.codigo == i) {
return df;
}
}
return null;
}

public static DocumentoFiscal fromCodigoStr(String s) {
int i = Integer.parseInt(s);
return fromCodigoInt(i);
}

}
Loading

0 comments on commit 59b6840

Please sign in to comment.