{"id":13504211,"url":"https://github.com/riege/one-record-converter","last_synced_at":"2025-03-29T19:30:48.980Z","repository":{"id":40469312,"uuid":"402872293","full_name":"riege/one-record-converter","owner":"riege","description":"Cargo-XML XFWB/XFZB to ONE Record Converter","archived":false,"fork":false,"pushed_at":"2024-12-20T18:27:13.000Z","size":1789,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-20T19:35:34.740Z","etag":null,"topics":["java","library","onerecord"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riege.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-03T19:02:17.000Z","updated_at":"2024-10-29T13:16:11.000Z","dependencies_parsed_at":"2024-04-02T13:40:45.365Z","dependency_job_id":"7f779665-6158-4543-8fc0-6c2767de407e","html_url":"https://github.com/riege/one-record-converter","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riege%2Fone-record-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riege%2Fone-record-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riege%2Fone-record-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riege%2Fone-record-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riege","download_url":"https://codeload.github.com/riege/one-record-converter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246234694,"owners_count":20745020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","library","onerecord"],"created_at":"2024-07-31T23:01:00.658Z","updated_at":"2025-03-29T19:30:48.009Z","avatar_url":"https://github.com/riege.png","language":"Java","funding_links":[],"categories":["Table of Contents"],"sub_categories":["Software Packages"],"readme":"# Cargo-XML XFWB / XFZB to ONE Record Converter\nNote: A live demo of this converter is available at https://onerecord.riege.com/\n\n## Release versioning and IATA Ontology versions\n\nThe IATA Ontology version is reflected by the version of the Riege [one-record-ontologymodel library](https://github.com/riege/one-record-ontologymodel).\n\nIt is highly recommended to use converter library 2.1 / Ontology version 2.1 or younger for \nconverting XFWB or XFZB to ONE Record. Note IATA Ontology version 2.0 added major improvements for \neAWB data fields.\n\nVersions of the converter library:\n* 2.1.x / `branch_2.1`: based upon IATA Ontology 2.1, the ONE Record datamodel as per December 2022, see https://github.com/IATA-Cargo/ONE-Record/tree/master/December-2022-standard\n  \u003cbr\u003eUses one-record-ontologydatamodel version **0.2.x**\n* 1.0.x / `branch_1.0`: based upon IATA Ontology 2.0, the ONE Record datamodel as per May 2022, see https://github.com/IATA-Cargo/ONE-Record/tree/master/May-2022-standard-COTB-endorsed.\n  \u003cbr\u003eUses one-record-ontologymodel version **2.0.x**\n* 0.9.x / `branch_0.9`: based upon IATA Ontology 1.1, the ONE Record datamodel as per June 2021, see https://github.com/IATA-Cargo/ONE-Record/tree/master/June-2021-standard-COTB-endorsed.\n  \u003cbr\u003eUses one-record-ontologymodel version **1.1.x**\n* current development / `main`: based on IATA ONE Record datamodel working draft, see https://github.com/IATA-Cargo/ONE-Record/tree/master/working_draft/ontology\n\n## General Backgound Information\nThis converter intentionally does neither set IDs nor makes use of persisted data for linked-data purposes.\n\nThe converter is based on two main data structures to convert from Cargo-XML to ONE Record:\n\n* For parsing Cargo-XML the converter uses Java classes which had been generated from the \n  Cargo-XML schema. These generated classes are included via library\n  https://github.com/riege/cargoxml-jaxb.\n  Please note that the cargoxml-jaxb package does not contain any schema information from the IATA Cargo-XML\n  Toolkit.\n  Please also note that the schema information from \n  the _IATA Cargo-XML Toolkit_ is published on \n  the _IATA Cargo-XML validation portal_ available at\n  https://cargo-xml-autocheck.iata.org/Docs/IATA/XML%20Waybill%20Message%20XFWB%203.00/011.htm\n* For generating ONE Record Logistics Object structures, IATA provides Java classes \n  in project https://github.com/IATA-Cargo/one-record-server-java \n  (see https://github.com/IATA-Cargo/one-record-server-java/tree/master/src/main/generated-sources/org/iata/cargo).\n  These classes have been updated with recently IATA endorsed Ontology via the project \n  https://github.com/riege/one-record-ontologymodel which is used by this converter.\n\nCodes and units are copied 1:1 from the provided Cargo-XML message where applicable.\n\nLine breaks are respected for some fields if provided in XML, e.g. for multi-line goods description or address name/street. Line breaks are intentionally used in GoodsDescription to preserve and indicate descriptions from more than one field if applicaple from original XML\n\nVersion 0.9 is limited to map the Cargo-XML XFWB3 message to ONE Record JSON.\nVersion 1.0 adds a basic mapping for the Cargo-XML XFZB3 message.\nPlease note that the 1R converter is not mapping all possible data yet and has focus on the use-case 'message from a forwarder to an airline'.\n\n## Usage\n\n### Programming \n\n#### XFWB\nThe main Cargo-XML class for XFWB3 is `com.riege.cargoxml.schema.xfwb3.WaybillType`.\n\nThe `com.riege.onerecord.converter.XFWB3toOneRecordConverter` converts a provided \nCargo-XML XFWB `WaybillType`\ninto validation results plus hints and especially into ONE Record logistics data model\n`org.iata.cargo.model.Waybill`:\n\n    InputStream is = ...\n    WaybillType xfwb = new ConverterUtil().unmarshalXFWB3(is);\n    XFWB3toOneRecordConverter converter = new XFWB3toOneRecordConverter(xfwb);\n    for (ValidationMessage msg : converter.getValidationHints()) {\n        System.out.println(\"HINT: \" + msg.getMessage());\n    }\n    for (ValidationMessage msg : converter.getValidationWarnings()) {\n        System.out.println(\"WARNING: \" + msg.getMessage());\n    }\n    for (ValidationMessage msg : converter.getValidationErrors()) {\n        System.out.println(\"ERROR: \" + msg.getMessage());\n    }\n    Waybill oneRecordWaybill = converter.getOneRecordResult();\n\nThe `Waybill` can be serialized easily into JSON, e.g. with https://github.com/FasterXML/jackson\n\n#### XFZB\nFor XFZB3, the main Cargo-XML class is `com.riege.cargoxml.schema.xfzb3.HouseWaybillType`.\n\nThe `com.riege.onerecord.converter.XFZB3toOneRecordConverter` converts in a similar way\nfrom `HouseWaybillType` into `org.iata.cargo.model.Waybill`.\n\n### Library usage\nThe converter library is not published on mavenCentral (yet).\n\nNevertheless releases are available for download at https://github.com/riege/one-record-converter/releases \nand it can be also integrated into a Java project as a depencency via https://jitpack.io/#riege/one-record-converter:\n\n[gradle](https://gradle.org/):\n\n    repositories {\n      ...\n      maven { url 'https://jitpack.io' }\n    }\n\n    dependencies {\n      implementation 'com.github.riege:one-record-converter:1.0.+'\n    }\n\n[maven](https://maven.apache.org):\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.github.riege\u003c/groupId\u003e\n      \u003cartifactId\u003eone-record-converter\u003c/artifactId\u003e\n      \u003cversion\u003e1.0.2\u003c/version\u003e\n    \u003c/dependency\u003e\n\nSee https://jitpack.io/#riege/one-record-converter for more details.\n\n### Java version\n**Update for version 0.9 and above**: The one-record-converter published jar includes \nthe required Ontologymodel classes, Cargo-XML JAXB classes as well as \n`jakarta.xml.bind-api` and `jaxb-impl` classes. \n\n\n**Only for version 0.8 and older**:\nThe converter uses Jakarta XML Binding (JAXB), which was part of \nthe Java Enterprise Edition with Java version 8,\ndeprecated in the following Java versions and finally removed in Java 11.\n\nWhen this library is used with Java 11 or younger, a dependency needs to be added,\ne.g. for Java EE 8, in use with maven:\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003ejakarta.xml.bind\u003c/groupId\u003e\n      \u003cartifactId\u003ejakarta.xml.bind-api\u003c/artifactId\u003e\n      \u003cversion\u003e2.3.3\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.sun.xml.bind\u003c/groupId\u003e\n      \u003cartifactId\u003ejaxb-impl\u003c/artifactId\u003e\n      \u003cversion\u003e2.3.5\u003c/version\u003e\n      \u003cscope\u003eruntime\u003c/scope\u003e\n    \u003c/dependency\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friege%2Fone-record-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friege%2Fone-record-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friege%2Fone-record-converter/lists"}