A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/CitrineInformatics/jpif below:

CitrineInformatics/jpif: Java tools for working with PIF's

Java tools for working with Physical Information Files (http://www.citrine.io/pif).

This package includes java objects for all items in the Physical Information File (PIF). Files formatted in the PIF schema can be serialized and deserialized using included methods.

It is possible to build a jar for this package using mvn clean install.

An uber jar containing all of the dependencies can be created using mvn clean install -Pvalidator. This jar can in turn be executed using java -jar target/jpif-validator.jar path/to/pif [max records to validate] in order to validate the content of a file that contains PIF records.

An uber jar containing all of the dependencies can be created using mvn clean install -Pparser. This jar can in turn be executed using java -jar target/jpif-parser.jar path/to/pif in order to read the content of a PIF file, convert to a rigid schema, and print to standard out.

Reading PIF-formatted sources

Given an input stream, reader, or string, PIF systems can be read using e.g.

PifObjectStream pifObjectStream = new PifObjectStream(inputStream);
for (System system : pifObjectStream) {
    // Do work on system
}
pifObjectStream.close();

Writing a single PIF system to a string:

System system = new System();
String systemString = PifObjectMapper.getInstance().writeValueAsString(system);

Writing a list of PIF systems to a string:

List<System> systems = new ArrayList<>();
String systemsString = PifObjectMapper.getInstance().getSystemListWriter().writeValueAsString(systems);

Converting a PIF system, list of PIF systems, or PifObjectStream to an InputStream:

InputStream inputStream = new PifInputStream(pifObjectStream);

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4