GithubHelp home page GithubHelp logo

orienteering-oss / iof-xml Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 6.82 MB

Java classes generated from IOF XSD v3 and v2

Home Page: https://orienteering-oss.github.io/iof-xml

License: GNU General Public License v3.0

Java 97.85% Kotlin 2.15%
iof orienteering unmarshalling xml-parser

iof-xml's People

Contributors

mikaello avatar nothing02 avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar

iof-xml's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update dependency gradle to v8.10
  • fix(deps): update dependency org.junit:junit-bom to v5.11.0

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/build-and-test.yml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/actions v3
.github/workflows/docs.yml
  • actions/checkout v4
  • actions/setup-java v4
  • peaceiris/actions-gh-pages v4
gradle
gradle.properties
settings.gradle
build.gradle
  • org.jetbrains.dokka 1.9.20
  • org.jetbrains.kotlin.jvm 2.0.10
  • org.glassfish.jaxb:jaxb-xjc 4.0.5
  • org.glassfish.jaxb:jaxb-runtime 4.0.5
  • org.glassfish.jaxb:jaxb-runtime 4.0.5
  • org.glassfish.jaxb:jaxb-runtime 4.0.5
  • jakarta.xml.bind:jakarta.xml.bind-api 4.0.2
  • com.fasterxml.jackson.module:jackson-module-jsonSchema 2.17.2
  • org.junit:junit-bom 5.10.3
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.9
regex
.github/workflows/build-and-test.yml
  • java-jdk 21.0.4+7.0.LTS

  • Check this box to trigger a request for Renovate to run again on this repository

Create tests for IOF v2 unmarshal functions

Fill these with meaningful content:

@Test
fun unmarshalIofV2PersonList() {
}
@Test
fun unmarshalIofV2CompetitorList() {
}
@Test
fun unmarshalIofV2RankList() {
}
@Test
fun unmarshalIofV2ClubList() {
}
@Test
fun unmarshalIofV2EventList() {
}
@Test
fun unmarshalIofV2ServiceRequestList() {
}
@Test
fun unmarshalIofV2EntryList() {
}
@Test
fun unmarshalIofV2StartList() {
}
@Test
fun unmarshalIofV2ResultList() {
}
@Test
fun unmarshalIofV2ClassData() {
}
@Test
fun unmarshalIofV2CourseData() {
}
}

Create marshal function for IOF v2 objects

Should be pretty equal to how v3 objects are marshalled:

/**
* Convert an object of IOF V3 type to XML string
*/
fun marshallIofV3(obj: Any, prettyPrint: Boolean = true): String {
val jaxbContext: JAXBContext = JAXBContext.newInstance(obj.javaClass)
val jaxbMarshaller = jaxbContext.createMarshaller()
jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, prettyPrint)
val writer = StringWriter()
jaxbMarshaller.marshal(obj, writer)
return writer.toString()
}

Remember to create a corresponding test in https://github.com/orienteering-oss/iof-xml/blob/main/src/test/kotlin/iofXml/V2MarshallersKtTest.kt

Convert XML to JSON

Would it be a nice feature to make it possible to convert an XML file to a JSON file? This could be done by unmarshal the XML document, and then marshal back into JSON.

This may be better suited for another project to keep the functionality of this project clean.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.