<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.rse.subsystems.files.ftp" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
      <appinfo>
         <meta.schema plugin="org.eclipse.rse.subsystems.files.ftp" id="ftpListingParsers" name="FTP Directory Listing Parsers"/>
      </appinfo>
      <documentation>
         Extension point that allows providing extra parsers for the FTP LIST command output.
Apache commons net provides some APIs and factories to costumize the parser and this extension 
provides an easy way to setup a custom parser and integrate it into RSE.
The provided extension points will be available as a list in the property &quot;FTP Settings&quot;, 
allowing the user to select them overriding the default parser.
The string attributes &lt;code&gt;defaultDateFormatStr&lt;/code&gt; &lt;code&gt;recentDateFormatStr&lt;/code&gt;
 &lt;code&gt;serverLanguageCode&lt;/code&gt; &lt;code&gt;serverTimeZoneId&lt;/code&gt; &lt;code&gt;shortMonthNames&lt;/code&gt; have to 
 follow the format described by &lt;code&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/code&gt;
 Each parser can also specify one or more FTP commands to be sent after establishing the connection in the &lt;code&gt;initCommands&lt;/code&gt; attribute.
      </documentation>
   </annotation>

   <element name="extension">
      <complexType>
         <sequence minOccurs="1" maxOccurs="unbounded">
            <element ref="parser"/>
         </sequence>
         <attribute name="point" type="string" use="required">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
         <attribute name="id" type="string">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
         <attribute name="name" type="string">
            <annotation>
               <documentation>
                  
               </documentation>
               <appinfo>
                  <meta.attribute translatable="true"/>
               </appinfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="parser">
      <complexType>
         <sequence minOccurs="0" maxOccurs="unbounded">
            <element ref="initCommand"/>
         </sequence>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
         <attribute name="label" type="string" use="required">
            <annotation>
               <documentation>
                  Name that will be displayed in the FTP Settings dialog
               </documentation>
               <appinfo>
                  <meta.attribute translatable="true"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  Extension of &lt;code&gt;org.apache.commons.net.ftp.Configurable,org.apache.commons.net.ftp.FTPFileEntryParser&lt;/code&gt; implementing the parser for the specific server
               </documentation>
               <appinfo>
                  <meta.attribute kind="java" basedOn="org.apache.commons.net.ftp.Configurable,org.apache.commons.net.ftp.FTPFileEntryParser"/>
               </appinfo>
            </annotation>
         </attribute>
         <attribute name="defaultDateFormatStr" type="string">
            <annotation>
               <documentation>
                  This property specifies the main date format that will be used by a parser configured by this configuration to parse file timestamps.  If this is not specified, such a parser will use as a default value, the most commonly used format which will be in as used in &lt;code&gt;en_US&lt;/code&gt; locales. This should be in the format described for &lt;code&gt;java.text.SimpleDateFormat&lt;/code&gt;. property.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="recentDateFormatStr" type="string">
            <annotation>
               <documentation>
                  This property specifies a secondary date format that will be used by a parser configured by this configuration to parse file timestamps, typically those less than a year old.  If this is  not specified, such a parser will not attempt to parse using an alternate format.
This is used primarily in unix-based systems.
This should be in the format described for &lt;code&gt;java.text.SimpleDateFormat&lt;/code&gt;.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="serverLanguageCode" type="string">
            <annotation>
               <documentation>
                  This property allows user to specify a &lt;a href=&quot;http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt&quot;&gt;
two-letter ISO-639 language code&lt;/a&gt; that will be used to configure the set of month names used by the file timestamp parser.
If neither this nor the shortMonthNames is specified, parsing will assume English month names, which may or may not be significant, depending on whether the date format(s) specified via  defaultDateFormatStr and/or recentDateFormatStr are using 
 numeric or alphabetic month names.
If the code supplied is not supported here, &lt;code&gt;en_US&lt;/code&gt;
month names will be used.  We are supporting here those language 
codes which, when a &lt;code&gt; java.util.Locale&lt;/code&gt; is constucted
using it, and a &lt;code&gt;java.text.SimpleDateFormat&lt;/code&gt; is 
constructed using that Locale, the array returned by the 
SimpleDateFormat&apos;s &lt;code&gt;getShortMonths()&lt;/code&gt; method consists solely of three 8-bit ASCII character strings.  Additionally, 
languages which do not meet this requirement are included if a 
common alternative set of short month names is known to be used.
This means that users who can tell us of additional such encodings
may get them added to the list of supported languages by contacting
the Apache Commons Net team.
&lt;strong&gt; Please note that this attribute will NOT be used to determine a locale-based date format for the language.  &lt;/strong&gt;  
Experience has shown that many if not most FTP servers outside the
United States employ the standard &lt;code&gt;en_US&lt;/code&gt; date format 
orderings of &lt;code&gt;MMM d yyyy&lt;/code&gt; and &lt;code&gt;MMM d HH:mm&lt;/code&gt; 
and attempting to deduce this automatically here would cause more
problems than it would solve.  The date format must be changed 
via the defaultDateFormatStr and/or recentDateFormatStr parameters.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="shortMonthNames" type="string">
            <annotation>
               <documentation>
                  This property allows the user to specify a set of month names used by the server that is different from those that may be specified using the setServerLanguageCode property.
This should be a string containing twelve strings each composed of
three characters, delimited by pipe (|) characters.  Currently, 
only 8-bit ASCII characters are known to be supported.  For example, a set of month names used by a hypothetical Icelandic FTP server might conceivably be specified as  &lt;code&gt;&quot;jan|feb|mar|apr|ma&amp;#xED;|j&amp;#xFA;n|j&amp;#xFA;l|&amp;#xE1;g&amp;#xFA;|sep|okt|n&amp;#xF3;v|des&quot;&lt;/code&gt;.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="serverTimeZoneId" type="string">
            <annotation>
               <documentation>
                  This property allows a time zone to be specified corresponding to that known to be used by an FTP server in file listings.  This might be particularly useful to clients such as Ant that try to use these timestamps for dependency checking. This should be one of the identifiers used by &lt;code&gt;java.util.TimeZone&lt;/code&gt; to refer to time zones, for example, &lt;code&gt;America/Chicago&lt;/code&gt; or &lt;code&gt;Asia/Rangoon&lt;/code&gt;.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="systemTypeRegex" type="string">
            <annotation>
               <documentation>
                  Regular expression used to match with the string returned by the FTP SYST command to autodetect the parser if not specified by the user
               </documentation>
            </annotation>
         </attribute>
         <attribute name="priority" type="string">
            <annotation>
               <documentation>
                  Priority used if more than one extension matches the regular expression given by the &lt;code&gt;ftpSystemTypes&lt;/code&gt; attribute. Integer values are allowed.
In case of more than one parser with a matching regular expression, the parser with lower priority number will be used. 
If no priority is specified, the default value will be &lt;code&gt;Integer.MAX_VALUE&lt;/code&gt;.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="listCommandModifiers" type="string">
            <annotation>
               <documentation>
                  Modifiers of the FTP &quot;LIST&quot; command. As an example if the LIST command has to be &quot;LIST -l&quot;, the contents of this optional field has to be &quot;-l&quot;
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="initCommand">
      <annotation>
         <documentation>
            FTP initialization command to perform  after connecting to the remote server, when the server&apos;s system type is detected to match the current listing parser.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="cmd" type="string" use="required">
            <annotation>
               <documentation>
                  Command string to execute
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <annotation>
      <appinfo>
         <meta.section type="since"/>
      </appinfo>
      <documentation>
         RSE 2.0
      </documentation>
   </annotation>

   <annotation>
      <appinfo>
         <meta.section type="examples"/>
      </appinfo>
      <documentation>
         &lt;!-- Default UNIX parser provided by Apache commons net package --&gt;
&lt;parser
 class=&quot;org.apache.commons.net.ftp.parser.UnixFTPEntryParser&quot;
    name=&quot;UNIX&quot;&gt;
&lt;/parser&gt;

&lt;!-- Custom parser implementing org.apache.commons.net.ftp.Configurable and org.apache.commons.net.ftp.FTPFileEntryParser --&gt;
&lt;!-- sending FTP list command &quot;LIST -l&quot; with priority 1--&gt;
&lt;parser
    class=&quot;com.mycompany.MyParser&quot;
    label=&quot;MyParser&quot;
    listCommandModifiers=&quot;-l&quot;
    priority=&quot;1&quot;&gt;
&lt;/parser&gt;

&lt;!--  UNIX server that uses Danish month names and &quot;European&quot; date formatting in Denmark&apos;s time zone --&gt;
&lt;parser
    class=&quot;org.apache.commons.net.ftp.parser.UnixFTPEntryParser&quot;
    label=&quot;UNIX_Danish&quot;
    defaultDateFormatStr = &quot;d MMM yyyy&quot;
    recentDateFormatStr = &quot;d MMM HH:mm&quot;
    serverLanguageCode = &quot;da&quot;
    serverTimeZoneId = &quot;Europe/Copenhagen&quot;
    &gt;
&lt;/parser&gt;

&lt;!--  VMS server that uses month names in a language not supported but uses the standard date formatting --&gt;
&lt;parser
    class=&quot;org.apache.commons.net.ftp.parser.VMSFTPEntryParser&quot;
    label=&quot;VMS_custom&quot;
    shortMonthNames=&quot;jan|feb|mar|apr|ma\u00ED|j\u00FAn|j\u00FAl|\u00e1g\u00FA|sep|okt|n\u00F3v|des&quot; 
    &gt;
&lt;/parser&gt;
      </documentation>
   </annotation>

   <annotation>
      <appinfo>
         <meta.section type="apiInfo"/>
      </appinfo>
      <documentation>
         The provider of a new FTPEntryParser must implement &lt;samp&gt;org.apache.commons.net.ftp.Configurable&lt;/samp&gt; and &lt;samp&gt;org.apache.commons.net.ftp.FTPFileEntryParser&lt;/samp&gt;
      </documentation>
   </annotation>


   <annotation>
      <appinfo>
         <meta.section type="implementation"/>
      </appinfo>
      <documentation>
         Customized VMS and WinNT implementations are supplied in the &lt;code&gt;org.eclipse.rse.subsystems.files.ftp&lt;/code&gt; plug-in.
      </documentation>
   </annotation>

   <annotation>
      <appinfo>
         <meta.section type="copyright"/>
      </appinfo>
      <documentation>
         Copyright (c) 2007, 2008 Symbian Software Ltd. and others. All rights reserved.
This program and the accompanying materials are made available under the terms
of the Eclipse Public License v1.0 which accompanies this distribution, and is 
available at http://www.eclipse.org/legal/epl-v10.html

Contributors:
   Javier Montalvo Orus (Symbian) - initial API and implementation
   Javier Montalvo Orus (Symbian) - added ftpSystemTypes and priority
   Javier Montalvo Orus (Symbian) - [212382] additional &quot;initCommands&quot; slot for ftpListingParsers extension point
      </documentation>
   </annotation>

</schema>
