Initial import of OXM module

This commit is contained in:
Arjen Poutsma
2009-01-06 11:18:27 +00:00
parent d116c8733a
commit 03582973d7
109 changed files with 8496 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
log4j.rootCategory=INFO, stdout
log4j.logger.org.springframework.oxm=DEBUG
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n

View File

@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">
<mapping>
<description>Castor generated mapping file</description>
<class name="org.springframework.oxm.castor.Flights">
<description>
Default mapping for class
org.springframework.oxm.castor.Flights
</description>
<map-to xml="flights"
ns-uri="http://samples.springframework.org/flight" ns-prefix="tns"/>
<field name="flight"
type="org.springframework.oxm.castor.Flight"
required="true" collection="array">
<bind-xml name="tns:flight" node="element" QName-prefix="tns"
xmlns:tns="http://samples.springframework.org/flight"/>
</field>
</class>
<class name="org.springframework.oxm.castor.Flight">
<description>
Default mapping for class
org.springframework.oxm.castor.Flight
</description>
<map-to xml="flight"
ns-uri="http://samples.springframework.org/flight" ns-prefix="tns"/>
<field name="number" type="long" required="true">
<bind-xml name="tns:number" node="element"
xmlns:tns="http://samples.springframework.org/flight"/>
</field>
</class>
</mapping>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oxm="http://www.springframework.org/schema/oxm" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd">
<oxm:jaxb2-marshaller id="contextPathMarshaller" contextPath="org.springframework.oxm.jaxb2"/>
<oxm:jaxb2-marshaller id="classesMarshaller">
<oxm:class-to-be-bound name="org.springframework.oxm.jaxb2.Flights"/>
<oxm:class-to-be-bound name="org.springframework.oxm.jaxb2.FlightType"/>
</oxm:jaxb2-marshaller>
</beans>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oxm="http://www.springframework.org/schema/oxm" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd">
<oxm:jaxb1-marshaller id="jaxb1Marshaller" contextPath="org.springframework.oxm.jaxb1"/>
<oxm:jibx-marshaller id="jibxMarshaller" target-class="org.springframework.oxm.jibx.Flights"/>
<oxm:xmlbeans-marshaller id="xmlBeansMarshaller" options="xmlBeansOptions"/>
<bean id="xmlBeansOptions" class="org.springframework.oxm.xmlbeans.XmlOptionsFactoryBean">
<property name="options">
<props>
<prop key="SAVE_PRETTY_PRINT">true</prop>
</props>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://samples.springframework.org/flight"
xmlns:tns="http://samples.springframework.org/flight">
<element name="flights">
<complexType>
<sequence>
<element name="flight" type="tns:flightType"
maxOccurs="unbounded">
</element>
</sequence>
</complexType>
</element>
<element name="flight" type="tns:flightType"/>
<complexType name="flightType">
<sequence>
<element name="number" type="long"/>
</sequence>
</complexType>
</schema>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<binding>
<mapping name="flights" class="org.springframework.oxm.jibx.Flights">
<namespace uri="http://samples.springframework.org/flight" default="elements"/>
<collection field="flightList">
<structure map-as="org.springframework.oxm.jibx.FlightType"/>
</collection>
</mapping>
<mapping name="flight" class="org.springframework.oxm.jibx.FlightType">
<namespace uri="http://samples.springframework.org/flight" default="elements"/>
<value name="number" field="number" usage="required"/>
</mapping>
</binding>