Skip to content

Commit

Permalink
feat: add XJC bindings file and config
Browse files Browse the repository at this point in the history
This adds example binding for anonymous oBDS 3 'Geschlecht'
type, that should have related Java enum and should not
be mapped to Java string.
  • Loading branch information
pcvolkmer committed Oct 25, 2024
1 parent 5353935 commit f459004
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ tasks.register('xsd2java') {
ant.xjc(
destdir: "${jaxbTargetDir}",
package: 'de.basisdatensatz.obds.v3',
schema: 'src/main/resources/schema/oBDS_v3.0.3.xsd'
schema: 'src/main/resources/schema/oBDS_v3.0.3.xsd',
binding: 'src/main/resources/schema/oBDS_v3.0.3.bindings.xjb'
)

}
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/schema/oBDS_v3.0.3.bindings.xjb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings jaxb:version="3.0" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jaxb:bindings schemaLocation="oBDS_v3.0.3.xsd">
<jaxb:bindings node="//xs:element[@name='Geschlecht']/xs:simpleType">
<jaxb:typesafeEnumClass name="Geschlecht" />
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>

0 comments on commit f459004

Please sign in to comment.