<?xml version="1.0"?>
<mapping>
  <class name="org.apache.jetspeed.om.common.impl.CastorJdoApplication">
    <map-to xml="portlet-app"/>

    <field name="name" type="string">
      <bind-xml name="id" node="attribute"/>
    </field>
    <field name="version" type="java.lang.String">
      <bind-xml name="version" node="attribute"/>
    </field>
    
    <field name="portlets"
           type="org.apache.jetspeed.om.common.impl.CastorJdoPortletEntity"
           get-method="getPortletsByXML"
           collection="arraylist">
      <bind-xml name="portlet"/>
    </field>
  </class>
  
  <class name="org.apache.jetspeed.om.common.impl.CastorJdoPortletEntity">
    <map-to xml="portlet"/>
        <field name="id" type="string">
          <bind-xml name="id" node="attribute"/>
        </field>
        
        <field name="name" type="string">
          <bind-xml name="portlet-name" node="element"/>
        </field>
        
        <field name="portletClass" type="string">
          <bind-xml name="portlet-class" node="element"/>
        </field>
        
        <field name="expirationCache" type="long">
          <bind-xml name="expiration-cache" node="element"/>
        </field>
            
        <field name="displayNames"
               type="org.apache.jetspeed.om.common.base.BaseDisplayName"
               collection="array">
          <bind-xml name="display-name"/>
        </field>
        
        
        <field name="supports"
               type="org.apache.jetspeed.om.common.base.BaseSupport"
               collection="array">
          <bind-xml name="supports"/>
        </field>
        
        <field name="portletInfo"
               type="org.apache.jetspeed.om.common.base.BasePortletInfo" >
          <bind-xml name="portlet-info"/>
        </field>
        
        <field name="initParameters"
               type="org.apache.jetspeed.om.common.impl.CastorJdoPortletInitParameter"
               collection="array">
          <bind-xml name="init-param"/>
        </field>      
    </class>
    
    <class name="org.apache.jetspeed.om.common.base.BaseDisplayName">
    <map-to xml="display-name"/>
        <field name="name" type="string">
          <bind-xml name="display-name" node="text"/>
        </field>
        
        <field name="language" type="string">
          <bind-xml name="lang" node="attribute"/>
        </field> 
    </class>
    
    <class name="org.apache.jetspeed.om.common.base.BaseSupport">
    <map-to xml="supports"/>
        <field name="id" type="string">
          <bind-xml name="id" node="attribute"/>
        </field>
       
        <field name="MimeType" type="string">
          <bind-xml name="mime-type" node="element"/>
        </field>
        
        <field name="PortletMode" type="string" collection="array">
          <bind-xml name="portlet-mode" node="element"/>
        </field>     
    </class>
    

    <class name="org.apache.jetspeed.om.common.base.BasePortletInfo">
    <map-to xml="portletInfo"/>
        <field name="id" type="string">
          <bind-xml name="id" node="element"/>
        </field>
        
        <field name="title" type="string">
          <bind-xml name="title" node="element"/>
        </field>
        <field name="shortTitle" type="string">
          <bind-xml name="short-title" node="element"/>
        </field>
        <field name="keywords" type="string">
          <bind-xml name="keywords" node="element"/>
        </field>
        <field name="resourceBundle" type="string">
          <bind-xml name="resource-bundle" node="element"/>
        </field>
     </class>
     
    <class name="org.apache.jetspeed.om.common.impl.CastorJdoPortletDescription">
    <map-to xml="description"/>
     <field name="description" type="string">
          <bind-xml name="description" node="text"/>
        </field>      
        <field name="language" type="string">
          <bind-xml name="lang" node="attribute"/>
        </field> 
    </class>
    
    <class name="org.apache.jetspeed.om.common.impl.CastorJdoPortletInitParameter">
    <map-to xml="initParameters"/>
        <field name="id" type="string">
          <bind-xml name="id" node="element"/>
        </field>
        
        <field name="name" type="string">
          <bind-xml name="name" node="element"/>
        </field>
        
        <field name="value" type="string">
          <bind-xml name="value" node="element"/>
        </field>
        
        <field name="descriptions"
               type="org.apache.jetspeed.om.common.impl.CastorJdoPortletDescription"
               collection="array">
          <bind-xml name="description"/>
        </field>
        
    </class>
    

        
</mapping>
