mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
275 lines
13 KiB
XML
275 lines
13 KiB
XML
<?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 "FTP Settings",
|
|
allowing the user to select them overriding the default parser.
|
|
The string attributes <code>defaultDateFormatStr</code> <code>recentDateFormatStr</code>
|
|
<code>serverLanguageCode</code> <code>serverTimeZoneId</code> <code>shortMonthNames</code> have to
|
|
follow the format described by <code>org.apache.commons.net.ftp.FTPClientConfig</code>
|
|
Each parser can also specify one or more FTP commands to be sent after establishing the connection in the <code>initCommands</code> 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 <code>org.apache.commons.net.ftp.Configurable,org.apache.commons.net.ftp.FTPFileEntryParser</code> 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 <code>en_US</code> locales. This should be in the format described for <code>java.text.SimpleDateFormat</code>. 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 <code>java.text.SimpleDateFormat</code>.
|
|
</documentation>
|
|
</annotation>
|
|
</attribute>
|
|
<attribute name="serverLanguageCode" type="string">
|
|
<annotation>
|
|
<documentation>
|
|
This property allows user to specify a <a href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt">
|
|
two-letter ISO-639 language code</a> 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, <code>en_US</code>
|
|
month names will be used. We are supporting here those language
|
|
codes which, when a <code> java.util.Locale</code> is constucted
|
|
using it, and a <code>java.text.SimpleDateFormat</code> is
|
|
constructed using that Locale, the array returned by the
|
|
SimpleDateFormat's <code>getShortMonths()</code> 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.
|
|
<strong> Please note that this attribute will NOT be used to determine a locale-based date format for the language. </strong>
|
|
Experience has shown that many if not most FTP servers outside the
|
|
United States employ the standard <code>en_US</code> date format
|
|
orderings of <code>MMM d yyyy</code> and <code>MMM d HH:mm</code>
|
|
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 <code>"jan|feb|mar|apr|ma&#xED;|j&#xFA;n|j&#xFA;l|&#xE1;g&#xFA;|sep|okt|n&#xF3;v|des"</code>.
|
|
</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 <code>java.util.TimeZone</code> to refer to time zones, for example, <code>America/Chicago</code> or <code>Asia/Rangoon</code>.
|
|
</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 <code>ftpSystemTypes</code> 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 <code>Integer.MAX_VALUE</code>.
|
|
</documentation>
|
|
</annotation>
|
|
</attribute>
|
|
<attribute name="listCommandModifiers" type="string">
|
|
<annotation>
|
|
<documentation>
|
|
Modifiers of the FTP "LIST" command. As an example if the LIST command has to be "LIST -l", the contents of this optional field has to be "-l"
|
|
</documentation>
|
|
</annotation>
|
|
</attribute>
|
|
</complexType>
|
|
</element>
|
|
|
|
<element name="initCommand">
|
|
<annotation>
|
|
<documentation>
|
|
FTP initialization command to perform after connecting to the remote server, when the server'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>
|
|
<!-- Default UNIX parser provided by Apache commons net package -->
|
|
<parser
|
|
class="org.apache.commons.net.ftp.parser.UnixFTPEntryParser"
|
|
name="UNIX">
|
|
</parser>
|
|
|
|
<!-- Custom parser implementing org.apache.commons.net.ftp.Configurable and org.apache.commons.net.ftp.FTPFileEntryParser -->
|
|
<!-- sending FTP list command "LIST -l" with priority 1-->
|
|
<parser
|
|
class="com.mycompany.MyParser"
|
|
label="MyParser"
|
|
listCommandModifiers="-l"
|
|
priority="1">
|
|
</parser>
|
|
|
|
<!-- UNIX server that uses Danish month names and "European" date formatting in Denmark's time zone -->
|
|
<parser
|
|
class="org.apache.commons.net.ftp.parser.UnixFTPEntryParser"
|
|
label="UNIX_Danish"
|
|
defaultDateFormatStr = "d MMM yyyy"
|
|
recentDateFormatStr = "d MMM HH:mm"
|
|
serverLanguageCode = "da"
|
|
serverTimeZoneId = "Europe/Copenhagen"
|
|
>
|
|
</parser>
|
|
|
|
<!-- VMS server that uses month names in a language not supported but uses the standard date formatting -->
|
|
<parser
|
|
class="org.apache.commons.net.ftp.parser.VMSFTPEntryParser"
|
|
label="VMS_custom"
|
|
shortMonthNames="jan|feb|mar|apr|ma\u00ED|j\u00FAn|j\u00FAl|\u00e1g\u00FA|sep|okt|n\u00F3v|des"
|
|
>
|
|
</parser>
|
|
</documentation>
|
|
</annotation>
|
|
|
|
<annotation>
|
|
<appinfo>
|
|
<meta.section type="apiInfo"/>
|
|
</appinfo>
|
|
<documentation>
|
|
The provider of a new FTPEntryParser must implement <samp>org.apache.commons.net.ftp.Configurable</samp> and <samp>org.apache.commons.net.ftp.FTPFileEntryParser</samp>
|
|
</documentation>
|
|
</annotation>
|
|
|
|
|
|
<annotation>
|
|
<appinfo>
|
|
<meta.section type="implementation"/>
|
|
</appinfo>
|
|
<documentation>
|
|
Customized VMS and WinNT implementations are supplied in the <code>org.eclipse.rse.subsystems.files.ftp</code> 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 "initCommands" slot for ftpListingParsers extension point
|
|
</documentation>
|
|
</annotation>
|
|
|
|
</schema>
|