Skip to content

HHS/ASPR-ms-taskit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPL LICENSE GitHub tag (with filter) GitHub contributors GitHub Workflow Status (with event) GitHub Workflow Status (with event)

Translation And Serialization Toolkit

The Translation and Serialization Tookkil (Taskit) is a library that was created to faciliate converting from various input files into Java Objects. This is espcially useful for Simulation Models such as GCM.

Currently there is only 1 supported serialzation format, and that is protobuf. Other formats such as binary will follow in the future.

As of v3.2.0, this project is in Maven Central.

License

Distributed under the GPLv3 License. See LICENSE for more information.

Please read the HHS vulnerability discloure.

Usage

To use this project in your project, simply add the following dependency to your dependencies section of your pom.xml file.

<dependency>
    <groupId>gov.hhs.aspr.ms.taskit</groupId>
    <artifactId>core</artifactId>
    <version>4.0.0</version>
</dependency>

To use the protobuf library of taskit, simply add the following dependency to your dependencies section of your pom.xml file.

<dependency>
    <groupId>gov.hhs.aspr.ms.taskit</groupId>
    <artifactId>protobuf</artifactId>
    <version>4.0.0</version>
</dependency>

Overview

Currently Taskit is composed of a Core library and a Protobuf library.

Core

Core is the base taskit engine and contains the root level functionality that drives the translation and serialization. This library contains the base TranslationController class, the base TranslationSpec class and the base TranslationEngine class.

TranslationController

The TranslationController class handles the delgation of reading/writing from/to input/output files.

TranslationSpec

The TranslationSpec class is an abstract class that must be impleneted to define how to convert between two Java Types, generally the input Java type and the application Java Type.

TranslationEngine

The TranslationEngine class delgates the converting of one type to another via TranslationSpecs as well as doing the actual reading/writing as delegated by the TranslationController.

Protobuf

Protobuf is a version of taskit made specifically to be used with protobuf. This library builds on the Core library described above and adds a distinct TranslationEngine and TranslationSpecs needed to fully support protobuf.

Supported types

This library supports the following proto message types:

  • messages
  • enums
  • Any
  • basic types (int32, double, etc)
  • Date

See TestObject for an example proto file.

Building from Source

Requirements

  • Maven 3.8.x
  • Java 17
  • Favorite IDE for Java development
  • Modeling Utilities located here

*Note that Modeling Utilities is in Maven Central, so there is no need to clone and build it.

Building

To build this project:

  • Clone the repo
  • open a command line terminal
  • navigate to the root folder of this project
  • run the command: mvn clean install

Documentation

Documentation has yet to be created. In the interim, the code is mostly commented and the javadocs do provide good detail with regards to method and class expectations.

About

ASPR Modeling - the toolkit for translation and serialization of java classes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages