<?xml version="1.0"?>
<!--

    Aipo is a groupware program developed by Aimluck,Inc.
    Copyright (C) 2004-2011 Aimluck,Inc.
    http://www.aipo.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->

<mapping>
  <class name="org.apache.jetspeed.services.registry.RegistryFragment">
    <map-to xml="registry"/>
                                   
    <field name="portlets"
           type="org.apache.jetspeed.om.registry.base.BasePortletEntry"
           collection="vector">
      <bind-xml name="portlet-entry"/>
    </field>

    <field name="controls"
           type="org.apache.jetspeed.om.registry.base.BasePortletControlEntry"
           collection="vector">
      <bind-xml name="portlet-control-entry"/>
    </field>

    <field name="controllers"
           type="org.apache.jetspeed.om.registry.base.BasePortletControllerEntry"
           collection="vector">
      <bind-xml name="portlet-controller-entry"/>
    </field>

    <field name="medias"
           type="org.apache.jetspeed.om.registry.base.BaseMediaTypeEntry"
           collection="vector">
      <bind-xml name="media-type-entry"/>
    </field>

    <field name="skins"
           type="org.apache.jetspeed.om.registry.base.BaseSkinEntry"
           collection="vector">
      <bind-xml name="skin-entry"/>
    </field>

    <field name="securityEntries"
           type="org.apache.jetspeed.om.registry.base.BaseSecurityEntry"
           collection="vector">
      <bind-xml name="security-entry"/>
    </field>

    <field name="clients"
           type="org.apache.jetspeed.om.registry.base.BaseClientEntry"
           collection="vector">
      <bind-xml name="client-entry"/>
    </field>
  </class>

  <class name="org.apache.jetspeed.om.registry.base.BasePortletEntry">
    <map-to xml="portlet-entry"/>
                                   
    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="hidden" type="boolean">
      <bind-xml name="hidden" node="attribute"/>
    </field>

    <field name="baseSecurity"
           type="org.apache.jetspeed.om.registry.base.BaseSecurity">
      <bind-xml name="security"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

    <field name="classname" type="java.lang.String">
      <bind-xml name="classname" node="element"/>
    </field>
    
    <field name="tools"
           type="org.apache.jetspeed.om.registry.base.BaseToolDescriptor"
           collection="vector">
      <bind-xml name="tool"/>
    </field>

    <field name="parameters"
           type="org.apache.jetspeed.om.registry.base.BaseCachedParameter"
           collection="vector">
      <bind-xml name="parameter"/>
    </field>

    <field name="mediaTypes"
          type="org.apache.jetspeed.om.registry.base.BaseMediaType"
          collection="vector">
      <bind-xml name="media-type"/>
    </field>

    <field name="type" type="java.lang.String">
      <bind-xml name="type" node="attribute"/>
    </field>

    <field name="parent" type="java.lang.String">
      <bind-xml name="parent" node="attribute"/>
    </field>

    <field name="application" type="boolean">
      <bind-xml name="application" node="attribute"/>
    </field>

    <field name="contentURL" type="org.apache.jetspeed.om.registry.base.BaseContentURL">
      <bind-xml name="url" node="element"/>
    </field>

    <field name="categories" type="org.apache.jetspeed.om.registry.base.BaseCategory"
                                collection="vector">
      <bind-xml name="category" node="element"/>
    </field>

  </class>

  <class name="org.apache.jetspeed.om.registry.base.BasePortletControlEntry">
    <map-to xml="portlet-control-entry"/>

    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="hidden" type="boolean">
      <bind-xml name="hidden" node="attribute"/>
    </field>

    <field name="baseSecurity"
           type="org.apache.jetspeed.om.registry.base.BaseSecurity">
      <bind-xml name="security"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

    <field name="classname" type="java.lang.String">
      <bind-xml name="classname" node="element"/>
    </field>
    
    <field name="parameters"
           type="org.apache.jetspeed.om.registry.base.BaseParameter"
           collection="vector">
      <bind-xml name="parameter"/>
    </field>

    <field name="mediaTypes"
          type="org.apache.jetspeed.om.registry.base.BaseMediaType"
          collection="vector">
      <bind-xml name="media-type"/>
    </field>

  </class>

  <class name="org.apache.jetspeed.om.registry.base.BasePortletControllerEntry">
    <map-to xml="portlet-controller-entry"/>

    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="hidden" type="boolean">
      <bind-xml name="hidden" node="attribute"/>
    </field>

    <field name="baseSecurity"
           type="org.apache.jetspeed.om.registry.base.BaseSecurity">
      <bind-xml name="security"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

    <field name="classname" type="java.lang.String">
      <bind-xml name="classname" node="element"/>
    </field>
    
    <field name="parameters"
           type="org.apache.jetspeed.om.registry.base.BaseParameter"
           collection="vector">
      <bind-xml name="parameter"/>
    </field>

    <field name="mediaTypes"
          type="org.apache.jetspeed.om.registry.base.BaseMediaType"
          collection="vector">
      <bind-xml name="media-type"/>
    </field>

  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseMediaTypeEntry">
    <map-to xml="media-type-entry"/>

    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="hidden" type="boolean">
      <bind-xml name="hidden" node="attribute"/>
    </field>

    <field name="baseSecurity"
           type="org.apache.jetspeed.om.registry.base.BaseSecurity">
      <bind-xml name="security"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

    <field name="mimeType" type="java.lang.String">
      <bind-xml name="mime-type" node="element"/>
    </field>

    <field name="characterSet" type="java.lang.String">
      <bind-xml name="character-set" node="element"/>
    </field>
    
    <field name="capabilities"
           type="org.apache.jetspeed.om.registry.base.BaseCapabilityMap">
      <bind-xml name="capability-map" node="element"/>
    </field>

  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseSkinEntry">
    <map-to xml="skin-entry"/>

    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="hidden" type="boolean">
      <bind-xml name="hidden" node="attribute"/>
    </field>

    <field name="baseSecurity"
           type="org.apache.jetspeed.om.registry.base.BaseSecurity">
      <bind-xml name="security"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

    <field name="parameters"
           type="org.apache.jetspeed.om.registry.base.BaseParameter"
           collection="vector">
      <bind-xml name="property"/>
    </field>

  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
    <map-to xml="meta-info"/>
                                   
    <field name="title" type="java.lang.String">
      <bind-xml name="title" node="element"/>
    </field>

    <field name="description" type="java.lang.String">
      <bind-xml name="description" node="element"/>
    </field>

    <field name="image" type="java.lang.String">
      <bind-xml name="image" node="element"/>
    </field>
  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseToolDescriptor">
    <map-to xml="tool"/>
                                   
    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="element"/>
    </field>

    <field name="scope" type="java.lang.String">
      <bind-xml name="scope" node="element"/>
    </field>

    <field name="classname" type="java.lang.String">
      <bind-xml name="classname" node="element"/>
    </field>
  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseSecurity">
    <map-to xml="security"/>
                                   
    <field name="role" type="java.lang.String">
      <bind-xml name="role" node="attribute"/>
    </field>
  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseMediaType">
    <map-to xml="media-type"/>
                                   
    <field name="ref" type="java.lang.String">
      <bind-xml name="ref" node="attribute"/>
    </field>
  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseParameter">
    <map-to xml="parameter"/>
                                   
    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="value" type="java.lang.String">
      <bind-xml name="value" node="attribute"/>
    </field>

    <field name="type" type="java.lang.String">
      <bind-xml name="type" node="attribute"/>
    </field>

    <field name="hidden" type="boolean">
      <bind-xml name="hidden" node="attribute"/>
    </field>

    <field name="baseSecurity"
           type="org.apache.jetspeed.om.registry.base.BaseSecurity">
      <bind-xml name="security"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseCachedParameter">
    <map-to xml="parameter"/>
                                   
    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="value" type="java.lang.String">
      <bind-xml name="value" node="attribute"/>
    </field>

    <field name="type" type="java.lang.String">
      <bind-xml name="type" node="attribute"/>
    </field>

    <field name="hidden" type="boolean">
      <bind-xml name="hidden" node="attribute"/>
    </field>

    <field name="baseSecurity"
           type="org.apache.jetspeed.om.registry.base.BaseSecurity">
      <bind-xml name="security"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

         <field name="cachedOnName" type="boolean">
                <bind-xml name="cachedOnName" node="attribute"/>                
         </field>       
         <field name="cachedOnValue" type="boolean">
                <bind-xml name="cachedOnValue" node="attribute"/>               
         </field>       

  </class>


        <class name="org.apache.jetspeed.om.registry.base.BaseContentURL">
                <map-to xml="url"/>     
                <field name="URL" type="java.lang.String">
                        <bind-xml name="url" node="text"/>
                </field>
                <field name="cachedOnURL" type="boolean">
                        <bind-xml name="cachedOnURL" node="attribute"/>         
                </field>        
        </class>

        <class name="org.apache.jetspeed.om.registry.base.BaseCategory">
                <map-to xml="category"/>        
                <field name="name" type="java.lang.String">
                        <bind-xml name="category" node="text"/>
                </field>
                <field name="group" type="java.lang.String">
                        <bind-xml name="group" node="attribute"/>               
                </field>        
        </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseSecurityEntry">
    <map-to xml="security-entry"/>
    
    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

    <field name="accesses"
           type="org.apache.jetspeed.om.registry.base.BaseSecurityAccess"
           collection="vector">
      <bind-xml name="access"/>
    </field>
    
  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseSecurityAccess">
    <map-to xml="access"/>
    
    <field name="action" type="java.lang.String">
      <bind-xml name="action" node="attribute"/>
    </field>
    
    <field name="allows"
           type = "org.apache.jetspeed.om.registry.base.BaseSecurityAllow"
           collection="vector">
      <bind-xml name="allow-if"/>
    </field>
    <field name="ownerAllows"
           type = "org.apache.jetspeed.om.registry.base.BaseSecurityAllowOwner"
           collection="vector">
      <bind-xml name="allow-if-owner"/>
    </field>
    
  </class>
  
  <class name="org.apache.jetspeed.om.registry.base.BaseSecurityAllow">
    <map-to xml="allow-if"/>
    
    <field name="role" type="java.lang.String">
      <bind-xml name="role" node="attribute"/>
    </field>

    <field name="group" type="java.lang.String">
      <bind-xml name="group" node="attribute"/>
    </field>
    
    <field name="user" type="java.lang.String">
      <bind-xml name="user" node="attribute"/>
    </field>
    
  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseSecurityAllowOwner">
    <map-to xml="allow-if-owner"/>
  </class>

  <class name="org.apache.jetspeed.om.BaseSecurityReference">
    <map-to xml="security-ref"/>

    <field name="parent" type="java.lang.String">
      <bind-xml name="parent" node="attribute"/>
    </field>
  
  </class>

  <!-- Class mapping for the Client Registry definition -->
  
  <class name="org.apache.jetspeed.om.registry.base.BaseClientEntry">
    <map-to xml="client-entry"/>

    <field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="hidden" type="boolean">
      <bind-xml name="hidden" node="attribute"/>
    </field>

    <field name="baseSecurity"
           type="org.apache.jetspeed.om.registry.base.BaseSecurity">
      <bind-xml name="security"/>
    </field>

    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
      <bind-xml name="security-ref"/>
    </field>

    <field name="baseMetaInfo"
           type="org.apache.jetspeed.om.registry.base.BaseMetaInfo">
      <bind-xml name="meta-info"/>
    </field>

    <field name="useragentpattern" type="java.lang.String">
      <bind-xml name="user-agent-pattern" node="element"/>
    </field>

    <field name="manufacturer" type="java.lang.String">
      <bind-xml name="manufacturer" node="element"/>
    </field>

    <field name="model" type="java.lang.String">
      <bind-xml name="model" node="element"/>
    </field>

    <field name="version" type="java.lang.String">
      <bind-xml name="version" node="element"/>
    </field>

    <field name="mimetypes"
           type="org.apache.jetspeed.om.registry.base.BaseMimetypeMap">
      <bind-xml name="mimetype-map" node="element"/>
    </field>

    <field name="capabilities"
           type="org.apache.jetspeed.om.registry.base.BaseCapabilityMap">
      <bind-xml name="capability-map" node="element"/>
    </field>

  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseMimetypeMap">
    <map-to xml="mimetype-map"/>

    <field name="mimetypesVector"
           type="java.lang.String"
           collection="vector">
      <bind-xml name="mimetype" node="element"/>
    </field>
  </class>

  <class name="org.apache.jetspeed.om.registry.base.BaseCapabilityMap">
    <map-to xml="capability-map"/>

    <field name="caps"
           type="java.lang.String"
           collection="vector">
      <bind-xml name="capability" node="element"/>
    </field>
  </class>

</mapping>