<?xml version="1.0" ?>

<!--

    Portlet Layout mapping file controls mappings between layout descriptors and
    org.gridlab.gridsphere.layout.* classes

    $Id: layout-mapping.xml 4633 2006-03-09 16:44:16Z wehrens $

-->

<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN" "http://castor.exolab.org/mapping.dtd">
<mapping>

    <class name="org.gridlab.gridsphere.layout.PortletPage">
        <map-to xml="page-layout"/>
        <field name="PortletTabbedPane" type="org.gridlab.gridsphere.layout.PortletTabbedPane">
            <bind-xml name="portlet-tabbed-pane"/>
        </field>
        <field name="PortletHeader" type="org.gridlab.gridsphere.layout.PortletContainer">
            <bind-xml name="portlet-header"/>
        </field>
        <field name="PortletFooter" type="org.gridlab.gridsphere.layout.PortletContainer">
            <bind-xml name="portlet-footer"/>
        </field>
        <field name="Title" type="string">
            <bind-xml name="title" node="attribute"/>
        </field>
        <field name="Theme" type="string">
            <bind-xml name="theme" node="attribute"/>
        </field>
        <field name="Keywords" type="string">
            <bind-xml name="keywords" node="attribute"/>
        </field>
        <field name="Icon" type="string">
            <bind-xml name="icon" node="attribute"/>
        </field>
        <field name="Refresh" type="int">
            <bind-xml name="refresh" node="attribute"/>
        </field>
        <field name="RenderKit" type="string">
            <bind-xml name="renderkit" node="attribute"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.BasePortletComponent">
        <field name="Name" type="string">
            <bind-xml name="name" node="attribute"/>
        </field>
        <field name="Label" type="string">
            <bind-xml name="label" node="attribute"/>
        </field>
        <field name="Width" type="string">
            <bind-xml name="width" node="attribute"/>
        </field>
        <field name="Height" type="string">
            <bind-xml name="height" node="attribute"/>
        </field>
        <field name="Visible" type="boolean">
            <bind-xml name="visible" node="attribute"/>
        </field>
        <field name="CanModify" type="boolean">
            <bind-xml name="can-modify" node="attribute"/>
        </field>
        <field name="RequiredRole" type="string">
            <bind-xml name="required-role" node="attribute"/>
        </field>
        <field name="Group" type="string">
            <bind-xml name="group" node="attribute"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletContainer">
        <field name="PortletComponents" type="org.gridlab.gridsphere.layout.PortletComponent" collection="arraylist">
            <bind-xml auto-naming="deriveByClass"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletFrameLayout" extends="org.gridlab.gridsphere.layout.BasePortletComponent">
        <field name="PortletComponents" type="org.gridlab.gridsphere.layout.PortletComponent" collection="arraylist">
            <bind-xml auto-naming="deriveByClass"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletTableLayout" extends="org.gridlab.gridsphere.layout.PortletFrameLayout">
        <map-to xml="table-layout"/>
        <field name="Style" type="string">
            <bind-xml name="style" node="attribute"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletRowLayout" extends="org.gridlab.gridsphere.layout.PortletFrameLayout">
        <map-to xml="row-layout"/>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletColumnLayout" extends="org.gridlab.gridsphere.layout.PortletFrameLayout">
        <map-to xml="column-layout"/>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletFrame" extends="org.gridlab.gridsphere.layout.BasePortletComponent">
        <map-to xml="portlet-frame"/>
        <field name="PortletClass" type="string">
            <bind-xml name="portlet-class"/>
        </field>
        <field name="Transparent" type="boolean">
            <bind-xml name="transparent" node="attribute"/>
        </field>
        <field name="InnerPadding" type="string">
            <bind-xml name="inner-padding" node="attribute"/>
        </field>
        <field name="OuterPadding" type="string">
            <bind-xml name="outer-padding" node="attribute"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletContent" extends="org.gridlab.gridsphere.layout.BasePortletComponent">
        <map-to xml="portlet-content"/>
        <field name="Include" type="string">
            <bind-xml name="include" node="attribute"/>
        </field>
        <field name="Context" type="string">
            <bind-xml name="context" node="attribute"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletStaticContent" extends="org.gridlab.gridsphere.layout.BasePortletComponent">
        <map-to xml="portlet-static-content"/>
        <field name="Include" type="string">
            <bind-xml name="include" node="attribute"/>
        </field>
        <field name="Encoding" type="string">
            <bind-xml name="encoding" node="attribute"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.core.persistence.castor.descriptor.Description">
        <map-to xml="title"/>
        <field name="Lang" type="string">
            <bind-xml name="lang" node="attribute"/>
        </field>
        <field name="Text" type="string">
            <bind-xml name="PCDATA" node="text"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletTabbedPane" extends="org.gridlab.gridsphere.layout.BasePortletComponent">
        <map-to xml="portlet-tabbed-pane"/>
        <field name="PortletTabs" type="org.gridlab.gridsphere.layout.PortletTab" collection="arraylist">
            <bind-xml name="portlet-tab"/>
        </field>
        <field name="Style" type="string">
            <bind-xml name="style" node="attribute"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.PortletTab" extends="org.gridlab.gridsphere.layout.BasePortletComponent">
        <map-to xml="portlet-tab"/>
        <field name="Titles" type="org.gridlab.gridsphere.core.persistence.castor.descriptor.Description" collection="arraylist">
            <bind-xml name="title"/>
        </field>
        <field name="Title" type="string">
            <bind-xml name="title" node="attribute"/>
        </field>
        <field name="Url" type="string">
            <bind-xml name="url" node="attribute"/>
        </field>
        <field name="TabOrder" type="integer">
            <bind-xml name="order" node="attribute"/>
        </field>
        <field name="PortletComponent" type="org.gridlab.gridsphere.layout.PortletComponent">
            <bind-xml auto-naming="deriveByClass"/>
        </field>
    </class>

    <class name="org.gridlab.gridsphere.layout.SelectionContainer" extends="org.gridlab.gridsphere.layout.BasePortletComponent">
        <map-to xml="selection-container"/>
        <field name="PortletComponents" type="org.gridlab.gridsphere.layout.PortletComponent" collection="arraylist">
            <bind-xml auto-naming="deriveByClass"/>
        </field>
        <field name="DefaultLabel" type="string">
            <bind-xml name="default"/>
        </field>
    </class>

</mapping>
