io.citrine:jpif

This package includes java objects for all items in the Physical Information File (PIF), http://www.citrine.io/pif. Files formatted in the PIF schema can be serialized and deserialized using included methods.

License

License

GroupId

GroupId

io.citrine
ArtifactId

ArtifactId

jpif
Last Version

Last Version

2.7.2
Release Date

Release Date

Type

Type

jar
Description

Description

io.citrine:jpif
This package includes java objects for all items in the Physical Information File (PIF), http://www.citrine.io/pif. Files formatted in the PIF schema can be serialized and deserialized using included methods.
Project URL

Project URL

https://github.com/CitrineInformatics/jpif
Source Code Management

Source Code Management

http://github.com/CitrineInformatics/jpif/tree/master

Download jpif

How to add to project

<!-- https://jarcasting.com/artifacts/io.citrine/jpif/ -->
<dependency>
    <groupId>io.citrine</groupId>
    <artifactId>jpif</artifactId>
    <version>2.7.2</version>
</dependency>
// https://jarcasting.com/artifacts/io.citrine/jpif/
implementation 'io.citrine:jpif:2.7.2'
// https://jarcasting.com/artifacts/io.citrine/jpif/
implementation ("io.citrine:jpif:2.7.2")
'io.citrine:jpif:jar:2.7.2'
<dependency org="io.citrine" name="jpif" rev="2.7.2">
  <artifact name="jpif" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.citrine', module='jpif', version='2.7.2')
)
libraryDependencies += "io.citrine" % "jpif" % "2.7.2"
[io.citrine/jpif "2.7.2"]

Dependencies

compile (6)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-core jar 2.10.0.pr2
com.fasterxml.jackson.core : jackson-annotations jar 2.10.0.pr2
com.fasterxml.jackson.core : jackson-databind jar 2.10.0.pr2
com.fasterxml.jackson.module : jackson-module-jsonSchema jar 2.10.0.pr2
commons-beanutils : commons-beanutils jar 1.9.4
commons-validator : commons-validator jar 1.6

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
commons-lang : commons-lang jar 2.6

Project Modules

There are no modules declared in this project.

JPIF

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.

Compilation

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.

Usages

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 PIF records

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);
io.citrine

Citrine Informatics

Versions

Version
2.7.2
2.7.1
2.7.0
2.6.0
2.5.0
2.4.0
2.3.0
2.2.0
2.1.9
2.1.8
2.1.4
2.1.0