1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
<?xml version="1.0"?>
<cbf:binding xmlns:cbf="http://www.castor.org/SourceGenerator/Binding"
defaultBindingType='element'>
<!--define the {namespace,package} binding -->
<cbf:package>
<cbf:name>test</cbf:name>
<cbf:namespace>http://castor.exolab.org/Test/Invoice</cbf:namespace>
</cbf:package>
<!-- Binding the Invoice element to a class -->
<cbf:elementBinding name="/invoice">
<cbf:java-class name="MyInvoice" final="true" equals="true"/>
</cbf:elementBinding>
<!-- Binding for the Item element -->
<cbf:elementBinding name="/item">
<cbf:java-class package="test.business" final="true" equals="true">
<!--<cbf:extends>ItemLogic</cbf:extends>-->
</cbf:java-class>
<!-- nested declaration for the price -->
<cbf:elementBinding name="Price">
<cbf:member name="specialPrice" java-type="double"/>
</cbf:elementBinding>
</cbf:elementBinding>
<!-- avoid name collisions -->
<cbf:elementBinding name="group:customer/address">
<cbf:java-class name="AddressElement"/>
</cbf:elementBinding>
<cbf:complexTypeBinding name="/complexType:address">
<cbf:java-class name="MyAddress"/>
<!--special name for the second street -->
<cbf:elementBinding name='street2'>
<cbf:member name="SecondStreet" type="string"/>
</cbf:elementBinding>
</cbf:complexTypeBinding>
</cbf:binding>
|