bindings.xjb 1.79 KB
<jxb:bindings version="1.0"
              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
              xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <jxb:bindings schemaLocation="../xsd/response.xsd" node="/xs:schema">

        <jxb:globalBindings localScoping="toplevel"/>

        <jxb:bindings node="//xs:element[@name='tabela_kursow']">

            <jxb:class name="ExchangeRateTable"/>

            <jxb:bindings node=".//xs:element[@name='numer_tabeli']">
                <jxb:property name="number"/>
            </jxb:bindings>

            <jxb:bindings node=".//xs:element[@name='data_publikacji']">
                <jxb:property name="publicationDate"/>
            </jxb:bindings>

            <jxb:bindings node=".//xs:element[@name='pozycja']">
                <jxb:property name="items"/>

                <jxb:bindings node=".//xs:element[@name='nazwa_waluty']">
                    <jxb:property name="currencyName"/>
                </jxb:bindings>

                <jxb:bindings node=".//xs:element[@name='kod_waluty']">
                    <jxb:property name="currencySymbol"/>
                </jxb:bindings>

                <jxb:bindings node=".//xs:element[@name='kurs_sredni']">
                    <jxb:property name="value">
                        <jxb:baseType>
                            <jxb:javaType name="java.math.BigDecimal"
                                          parseMethod="pl.labno.bernard.nbp.exchangerate.rest.RateConverter.convert"/>
                        </jxb:baseType>
                    </jxb:property>
                </jxb:bindings>
            </jxb:bindings>

            <jxb:bindings node=".//xs:element[@name='pozycja']/xs:complexType">
                <jxb:class name="ExchangeRate"/>
            </jxb:bindings>

        </jxb:bindings>

    </jxb:bindings>
</jxb:bindings>