Skip to content

taok-monitor/taok-collector-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taok-Collector-API

It is an API to be used in the "taok-collector" project. This module will help create a pattern to any java developer can contribute.

Collector

This is main Component to any implementation, any implementation should return a CollectedLaunch List using this interface.

public interface Collector {

	public List<CollectedLaunch> collectNow(Search search);
}

Standard

Exist some Classes that we will used by default, this classes will create in:

br.com.taok.collector.api.model.standard

CollectedLaunch

This is a class that will represent the a Launch, any API of Portal da Transparencia must return data that can be used to create this Object.

public class CollectedLaunch {

	private String identify;
	private City city;
	private PublicCompany publicCompany;
	private Provider provider;
	private LocalDate date;
	private BigDecimal value;
}

Attributes

  • identity

This field will represent the identity launch in your API, can be a 'Código do Empenho'

NormalizeLaunch

public interface NormalizeLaunch {

	public List<CollectedLaunch> normalize(List<String[]> datas);
}

Each implementation must implement this interface to normalize its data before persisting into the database.

Search

public class Search {

	private LocalDate startDate;
	private LocalDate endDate;
	private Provider provider;
	private PublicCompany publicCompany;
}

This class we'll to send filter to be used for collector implementation, the implementation can used any attribute this class.

Releases

No releases published

Packages

No packages published

Languages