Skip to content

OpenRoberta/jaxb-and-transport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository generates JAXB and Transport resources for the OpenRoberta lab. These resources change almost never. So this project is seldom used.

  1. the OpenRoberta lab reads XML generated by blockly and creates an AST for further code generation. This process is facilitated by using jaxb2 to create a Java bean tree matching the XML tree. Actual Java has removed jaxb support (xjc, parts in rt.jar). Thus this project uses the ancient Java 8 for a stable build of the Java source classes.

    • after a change in the xsd found at src/main/resources/blockly.xsd
    • the Java bean tree has to be (re-)generated (this are Java source classes) by executing mvn clean install and
    • then use the "organize import"-function of your IDE for the whole directory src/main/java/de/fhg/iais/roberta/blockly/generated and
    • copy all files manually from src/main/java/de/fhg/iais/roberta/blockly/generated to the openroberta-lab project OpenRobertaRobot into the same package.
  2. the OpenRoberta lab front end (written in typescript) and the back end (written in Java) communicate using POST commands in the style of REST. The payload of the POSTs are JSON objects. To reduce the amount of errors when these JSON objects are constructed, sent and destructed, the maven plugin de.fhg.iais.tools:TransportGenerator:16.0.0 found in the maven repository at https://maven.iais.fraunhofer.de/artifactory/openroberta-release is used as the bean generator. The definitions of all the JSON objects are found in the resource restEntities.json.

    • after a change in the resource src/main/resources/restEntities.json
    • the Javas have to be (re-)generated (this are Java source classes) by executing mvn clean install and
    • then use the "organize import"-function of your IDE for the whole directory src/main/java/de/fhg/iais/roberta/generated/restEntities and
    • copy all files manually from src/main/java/de/fhg/iais/roberta/generated/restEntities to the openroberta-lab project OpenRobertaServer into the same package.

If you are an open source developer and like to design a better solution to this please contact reinhard.budde at iais.fraunhofer.de

About

jaxb and transport bean generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages