TraceProv is available on Maven Central. To use it, put this in the dependencies section of your pom.xml:
<dependency>
<groupId>eu.trentorise.opendata</groupId>
<artifactId>traceprov</artifactId>
<version>0.2.3</version>
</dependency>
In case updates are available, version numbers follow semantic versioning rules.
Most objects in TraceProv are immutable, and make heavy use of Guava immutable collections . In TraceProv, wherever you see a class called AbstractSomething
, there will always be an immutable class Something
implementing it.
Immutable classes don't have public constructors, they only have factory methods called of(). So for example, to create a CellRef referring to a cell at row 1 and column 2 you would call:
CellRef cellRef = CellRef.of(1,2);
If the class has many fields, it will also provide a mutable Builder to create instances. So for example to build a DcatDataset object setting a fields title and landingPage you would call:
DcatDataset dataset = DcatDataset
.builder()
.setTitle(Dict.of(Locale.ITALIAN, "Impianti di risalita, ViviFiemme 2013"))
.setLandingPage("http://dati.trentino.it/dataset/impianti-di-risalita-vivifiemme-2013")
.build();
Builder is mutable, while dataset object created after build is perfectly immutable.
TraceProv uses native Java logging system (JUL). If you have an application which uses SLF4J logging system and want to see TraceProv logs, you can route logging with JUL to SLF4J bridge, just remember to programmatically install it first.