Scope
- The XML Editor can export an XML configuration as used for YADE 1.11 to a compatible .ini format as used for YADE 1.10 and earlier.
- The following samples examples have been created by use of the XML Editor
- Each sample file references the XSD
scheme JADE
Examples
All examples are used for JADE Configuration XSD schema http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd
Getting Started
Code Block |
---|
language | xml |
---|
title | XML Configuration File: getting_started.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<FTPFragment name="ftp_server_2_local">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port>21</Port>
</BasicConnection>
<BasicAuthentication>
<Account><![CDATA[demo]]></Account>
<Password><![CDATA[demo]]></Password>
</BasicAuthentication>
<PassiveMode>true</PassiveMode>
</FTPFragment>
<SFTPFragment name="sftp_server_2_local_pass">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port>22</Port>
</BasicConnection>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftp_server_2_local">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<FTPFragmentRef ref="ftp_server_2_local" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[.*]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
<DisableOverwriteFiles>false</DisableOverwriteFiles>
</TargetFileOptions>
</CopyTarget>
<TransferOptions>
<Transactional>true</Transactional>
</TransferOptions>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_pass">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_server_2_local_pass" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[.*]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
<DisableOverwriteFiles>true</DisableOverwriteFiles>
</TargetFileOptions>
</CopyTarget>
<TransferOptions>
<Transactional>true</Transactional>
</TransferOptions>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: getting_started.ini
- Each sample is available in compatible .xml and .ini formats for your reference.
- The samples are based on configuration examples as explained in the YADE - Tutorials.
Prerequisites
The XML Editor feature for exporting compatible configuration files makes use of a Java based Plugin.
- Use of this feature requires a Java Run-Time Environment starting from version 1.8 to be available.
Configuring the XML Editor
Activating the YADE Xml2Ini Converter Plugin
The XML Editor comes with a sub-folder plugins
in the installation directory.
- By default all Plugins that are deployed with this folder are available with the XML Editor. Therefore the Xml2Ini Converter is active by default.
- Should the sub-folder
plugins
not be available, e.g. should this folder have been renamed, then you cannot use the conversion feature. - If the Xml2Ini Converter is available then you can use the respective operation from the main menu and from the tab context menu.
- The XML Editor shows a file dialog and suggests an .ini export file with the same basename as the current .xml configuration file.
Configuring the XML Editor for automated Conversion
The XML Editor comes with the feature to auto-save configuration files in the .ini format when saving to the .xml format, i.e. doing the conversion automatically.
- To activate this feature adjust the check-box "Autosave ini file" to be checked. We recommend to use this feature if you want to create compatible .xml and .ini configuration files for YADE releases 1.10 and 1.11.
- This allows to manage configurations for YADE 1.11 in XML format and to have a parallel .ini file being created for use with YADE 1.10. Keeping both .xml and .ini configuration files in sync will allow a smooth migration to YADE 1.11 - as long as you would not manually modify the .ini file.
- In autosave mode the .ini file will be overwritten whenever the .xml file is saved.
- In addition you can enable desktop notifications to be created if a .ini file is being saved.
Image Added
Assigning the YADE XSD Schema
When creating a new XML configuration file then the following dialog appears for schema assignment:
Image Added
For YADE configuration files please assign the XSD Schema that matches your YADE release:
- either assign the XSD schema from the SOS Web Site: http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd
- or download the XSD schema to some local location and assign it by using the Open File dialog.
The schema will be accessed by the XML Editor when validating, saving and converting files. The following operations for schema assignment for existing files are available from the tab context menu:
- Reload schema: reload and apply the current XSD schema.
- Reassign schema: open the assignment dialog and assign an XSD schema.
Examples
- All examples are used for the YADE Configuration XSD schema http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd
- All examples are compatible for use with YADE 1.10 (.ini) and YADE 1.11 (.xml)
Getting Started
Code Block |
---|
language | xml |
---|
title | XML Configuration File: getting_started.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<FTPFragment name="ftp_server_2_local">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
|
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: getting_started.ini |
---|
collapse | true |
---|
|
[protocol_fragment_ftp@ftp_server_2_local]
protocol = ftp
host = test.sos-berlin.com
port = 21
user = demo
password = demo
passive_mode = true
[protocol_fragment_sftp@sftp_server_2_local_pass]
protocol = sftp
host = test.sos-berlin.com
port = 22
user = demo
ssh_auth_method = password
password = demo
[profile@ftp_server_2_local]
operation = copy
source_include = protocol_fragment_ftp@ftp_server_2_local
file_spec = .*
source_dir = /
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\a
overwrite_files = true
transactional = true
[profile@sftp_server_2_local_pass]
operation <Port>21</Port>
</BasicConnection>
= copy
source_include<BasicAuthentication>
<Account><![CDATA[demo]]></Account>
= protocol_fragment_sftp@sftp_server_2_local_pass
file_spec<Password><![CDATA[demo]]></Password>
</BasicAuthentication>
<PassiveMode>true</PassiveMode>
</FTPFragment>
<SFTPFragment name= .*
source_dir"sftp_server_2_local_pass">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
= <Port>22</Port>
target_protocol </BasicConnection>
<SSHAuthentication>
= local
target_host <Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
= localhost
target_dir <Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
= ${USERPROFILE}\jade_demo\a
overwrite_files</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftp_server_2_local">
= false<Operation>
transactional <Copy>
<CopySource>
= true |
Simple File Selection
Code Block |
---|
language | xml |
---|
title | XML Configuration: simple_file_selection.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<CopySourceFragmentRef>
<FTPFragmentRef ref="ftp_server_2_local" />
</CopySourceFragmentRef>
<SourceFileOptions>
<SFTPFragment name="sftp_test">
<Selection>
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname><FileSpecSelection>
<Port><![CDATA[22]]></Port>
</BasicConnection><FileSpec><![CDATA[.*]]></FileSpec>
<SSHAuthentication>
<Account><<Directory><![CDATA[demo/]]></Account>
Directory>
<AuthenticationMethodPassword></FileSpecSelection>
<Password><![CDATA[demo]]></Password>
</Selection>
</AuthenticationMethodPassword>SourceFileOptions>
</SSHAuthentication>CopySource>
</SFTPFragment>
</ProtocolFragments><CopyTarget>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_select_recursive">
<CopyTargetFragmentRef>
<Operation>
<LocalTarget <Copy>/>
<CopySource></CopyTargetFragmentRef>
<CopySourceFragmentRef><Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
<SFTPFragmentRef ref="sftp_test" />
<<DisableOverwriteFiles>false</CopySourceFragmentRef>DisableOverwriteFiles>
<SourceFileOptions></TargetFileOptions>
</CopyTarget>
<Selection>
<TransferOptions>
<FileSpecSelection><Transactional>true</Transactional>
</TransferOptions>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_pass">
<Directory><![CDATA[/rec]]></Directory><Operation>
<Copy>
<Recursive><![CDATA[true]]></Recursive><CopySource>
<CopySourceFragmentRef>
</FileSpecSelection>
<SFTPFragmentRef </Selection>ref="sftp_server_2_local_pass" />
</SourceFileOptions>CopySourceFragmentRef>
</CopySource>
<SourceFileOptions>
<CopyTarget><Selection>
<CopyTargetFragmentRef>
<FileSpecSelection>
<LocalTarget />
<FileSpec><![CDATA[.*]]></FileSpec>
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a/]]></Directory>
</CopyTarget>
</Copy>FileSpecSelection>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: simple_file_selection.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: simple_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_select_recursive]
protocolSelection>
</SourceFileOptions>
</CopySource>
= sftp
host <CopyTarget>
<CopyTargetFragmentRef>
= test.sos-berlin.com
port<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= 22<TargetFileOptions>
user <DisableOverwriteFiles>true</DisableOverwriteFiles>
</TargetFileOptions>
= demo
ssh_auth_method</CopyTarget>
<TransferOptions>
= password<Transactional>true</Transactional>
password </TransferOptions>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: getting_started.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: getting_started.ini |
---|
collapse | true |
---|
|
= demo
[protocol_fragment_sftp@sftpftp@ftp_server_2_local_zero_byte]
protocol = sftpftp
host = test.sos-berlin.com
port = 2221
user = demo
ssh_auth_method = password
password = demo
[profile@sftp_server_2_local_select_recursive]
operation passive_mode = copy
source_include = true
[protocol_fragment_sftp@sftp_server_2_local_select_recursive
file_specpass]
protocol = ^test_.\.txt$
source_dir sftp
host = /rec
recursive = test.sos-berlin.com
port = true
target_protocol = 22
user = local
target_host = localhostdemo
target_dirssh_auth_method = password
password = ${USERPROFILE}\jade_demo\a
overwrite_files = falsedemo
[profile@sftpprofile@ftp_server_2_local_zero_byte]
operation = copy
source_include = protocol_fragment_sftp@sftpftp@ftp_server_2_local_zero_byte
file_spec = ^test_[0-9]\.txt$
source_dir = /.*
zero_byte_transfer source_dir = relaxed
target_protocol = local/
target_host protocol = localhostlocal
target_dir host = ${USERPROFILE}\jade_demo\a |
More Advanced File Selection
Code Block |
---|
language | xml |
---|
title | XML Configuration: more_advanced_file_selection.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
= localhost
target_dir <SFTPFragment name="sftp_server_2_local_poll_minfiles">
= ${USERPROFILE}\jade_demo\a
overwrite_files <BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
= true
transactional <Port>22</Port>
</BasicConnection>
<SSHAuthentication>
= true
[profile@sftp_server_2_local_pass]
operation <Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
= copy
source_include <Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
= protocol_fragment_sftp@sftp_server_2_local_pass
file_spec </SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_poll_minfiles">
= <Operation>.*
source_dir <Copy>
<CopySource>
= /
target_protocol <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_server_2_local_poll_minfiles" />
= local
target_host </CopySourceFragmentRef>
= <SourceFileOptions>localhost
target_dir <Selection>
= ${USERPROFILE}\jade_demo\a
overwrite_files <FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= false
transactional = true |
Simple File Selection
Code Block |
---|
language | xml |
---|
title | XML Configuration: simple_file_selection.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations <Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
</Selection>xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<Polling><SFTPFragment name="sftp_test">
<PollInterval>20</PollInterval><BasicConnection>
<PollTimeout>1</PollTimeout><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<MinFiles>5</MinFiles><Port><![CDATA[22]]></Port>
</BasicConnection>
<PollingServer>false</PollingServer><SSHAuthentication>
<PollForever>false</PollForever><Account><![CDATA[demo]]></Account>
</Polling><AuthenticationMethodPassword>
</SourceFileOptions><Password><![CDATA[demo]]></Password>
</CopySource>AuthenticationMethodPassword>
<CopyTarget></SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
<CopyTargetFragmentRef></Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_select_recursive">
<LocalTarget />
<Operation>
</CopyTargetFragmentRef><Copy>
<CopySource>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget><CopySourceFragmentRef>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: more_advanced_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_poll_minfiles]
protocol<SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
<SourceFileOptions>
= sftp
host <Selection>
<FileSpecSelection>
= test.sos-berlin.com
port <FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<Directory><![CDATA[/rec]]></Directory>
= 22
user <Recursive><![CDATA[true]]></Recursive>
</FileSpecSelection>
= demo
ssh_auth_method </Selection>
= password</SourceFileOptions>
password </CopySource>
<CopyTarget>
= demo
[profile@sftp_server_2_local_poll_minfiles]
operation <CopyTargetFragmentRef>
<LocalTarget />
= copy
source_include</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= protocol_fragment_sftp@sftp_server_2_local_poll_minfiles
file_spec</CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: simple_file_selection.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: simple_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_select_recursive]
protocol = ^test_[0-9]\.txt$
source_dir = /
poll_interval sftp
host = 20
poll_timeout = test.sos-berlin.com
port = 1
poll_minfiles = 522
polling_serveruser = false
polling_server_poll_forever = falsedemo
targetssh_auth_protocolmethod = local
target_hostpassword
password = localhost
target_dir demo
[protocol_fragment_sftp@sftp_server_2_local_zero_byte]
protocol = ${USERPROFILE}\jade_demo\a |
File Transfer
Code Block |
---|
language | xml |
---|
title | XML Configuration: file_transfer.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations>
<Fragments>
<ProtocolFragments>
<SFTPFragment name="sftp_server_2_local_cumulate">
= sftp
host <BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port>22</Port>
= test.sos-berlin.com
port </BasicConnection>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
= <AuthenticationMethodPassword>22
user <Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
= demo
ssh_auth_method </SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="replace_local_datestamp">
= <Operation>password
password <Copy>
<CopySource>
= demo
[profile@sftp_server_2_local_select_recursive]
operation <CopySourceFragmentRef>
<LocalSource>
= copy
source_include <Rename>
<ReplaceWhat><![CDATA[^(test)(_)[0-9]\.txt]]></ReplaceWhat>
= protocol_fragment_sftp@sftp_server_2_local_select_recursive
file_spec <ReplaceWith><![CDATA[file_;[date:yyyy-MM-dd]_]]></ReplaceWith>
= ^test_.\.txt$
source_dir </Rename>
= /rec
recursive </LocalSource>
</CopySourceFragmentRef>
= <SourceFileOptions>
true
target_protocol = <Selection>local
target_host <FileSpecSelection>
= localhost
target_dir <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
overwrite_files </FileSpecSelection>
</Selection>
= false
[profile@sftp_server_2_local_zero_byte]
operation </SourceFileOptions>
</CopySource>
= <CopyTarget>
copy
source_include <CopyTargetFragmentRef>
= protocol_fragment_sftp@sftp_server_2_local_zero_byte
file_spec <LocalTarget />
</CopyTargetFragmentRef>
= <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
^test_[0-9]\.txt$
source_dir </CopyTarget>
</Copy>
</Operation>
= </Profile>
<Profile profile_id="sftp_server_2_local_cumulate">
zero_byte_transfer <Operation>
<Copy>
= relaxed
target_protocol <CopySource>
<CopySourceFragmentRef>
= local
target_host <SFTPFragmentRef ref="sftp_server_2_local_cumulate" />
</CopySourceFragmentRef>
= localhost
target_dir <SourceFileOptions>
<Selection>
= ${USERPROFILE}\jade_demo\a |
More Advanced File Selection
Code Block |
---|
language | xml |
---|
title | XML Configuration: more_advanced_file_selection.xml |
---|
collapse | true |
---|
|
<?xml <FileSpecSelection>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
</FileSpecSelection><SFTPFragment name="sftp_server_2_local_poll_minfiles">
</Selection><BasicConnection>
</SourceFileOptions><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
<Port>22</Port>
</BasicConnection>
</CopyTargetFragmentRef>
<SSHAuthentication>
<Directory><<Account><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>Account>
<AuthenticationMethodPassword>
<TargetFileOptions>
<Password><![CDATA[demo]]></Password>
<CumulateFiles>
</AuthenticationMethodPassword>
</SSHAuthentication>
<CumulativeFileSeparator><![CDATA[--- File: %{SourceFileName} ---]]></CumulativeFileSeparator> </SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename><Profile profile_id="sftp_server_2_local_poll_minfiles">
<Operation>
</CumulateFiles><Copy>
<CopySource>
</TargetFileOptions>
</CopyTarget><CopySourceFragmentRef>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: file_transfer.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: file_transfer.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_<SFTPFragmentRef ref="sftp_server_2_local_cumulate]
protocolpoll_minfiles" />
</CopySourceFragmentRef>
<SourceFileOptions>
= sftp
host <Selection>
<FileSpecSelection>
= test.sos-berlin.com
port <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
= 22
user </FileSpecSelection>
</Selection>
= demo
ssh_auth_method <Polling>
= password
password<PollInterval>20</PollInterval>
<PollTimeout>1</PollTimeout>
= demo
[profile@replace_local_datestamp]
operation<MinFiles>5</MinFiles>
<PollingServer>false</PollingServer>
= copy
source_protocol <PollForever>false</PollForever>
</Polling>
= local
source_host </SourceFileOptions>
</CopySource>
= localhost<CopyTarget>
replacing <CopyTargetFragmentRef>
= ^(test)(_)[0-9]\.txt
replacement<LocalTarget />
</CopyTargetFragmentRef>
= file_;[date:yyyy-MM-dd]_
file_spec<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: more_advanced_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_poll_minfiles]
protocol = ^test_[0-9]\.txt$
source_dir = ${USERPROFILE}\jade_demo\a
target_protocol sftp
host = local
target_host = test.sos-berlin.com
port = localhost
target_dir = 22
user = ${USERPROFILE}\jade_demo\b
[profile@sftp_server_2_local_cumulate]
operation = copydemo
source_include ssh_auth_method = protocol_fragment_sftp@sftp_server_2_local_cumulate
file_specpassword
password = ^test_.\.txt$
source_dirdemo
[profile@sftp_server_2_local_poll_minfiles]
operation = /copy
targetsource_protocolinclude = protocol_fragment_sftp@sftp_server_2_local_poll_minfiles
targetfile_hostspec = localhost
target^test_[0-9]\.txt$
source_dir = ${USERPROFILE}\jade_demo\a
cumulate_files/
poll_interval = true20
cumulative_file_separatorpoll_timeout = --- File: %{SourceFileName} ---
cumulative_file_name = 1
poll_minfiles = text-files.txt |
Simple File Transfer Operations with multiple Profiles
Code Block |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.work.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
= 5
polling_server <ProtocolFragments>
<FTPFragment name="ftp_test">
= false
polling_server_poll_forever = <BasicConnection>false
target_protocol <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port><![CDATA[21]]></Port>
= local
target_host </BasicConnection>
<BasicAuthentication>
= localhost
target_dir <Account><![CDATA[demo]]></Account>
<Password><![CDATA[demo]]></Password>
= ${USERPROFILE}\jade_demo\a |
File Transfer
Code Block |
---|
language | xml |
---|
title | XML Configuration: file_transfer.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations>
<Fragments>
</BasicAuthentication>
</FTPFragment><ProtocolFragments>
<SFTPFragment name="sftp_test"sftp_server_2_local_cumulate">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port><![CDATA[22]]><<Port>22</Port>
</BasicConnection>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="replace_local_datestamp">
<Operation>
<Copy>
<CopySource>
</AuthenticationMethodPassword>
<CopySourceFragmentRef>
</SSHAuthentication>
<LocalSource>
</SFTPFragment>
<SFTPFragment name="sftp_test_key"> <Rename>
<BasicConnection>
<Hostname><<ReplaceWhat><![CDATA[test.sos-berlin.com^(test)(_)[0-9]\.txt]]></Hostname>
ReplaceWhat>
<Port><<ReplaceWith><![CDATA[22file_;[date:yyyy-MM-dd]_]]></Port>
/ReplaceWith>
</Rename>
</BasicConnection>LocalSource>
<SSHAuthentication>
</CopySourceFragmentRef>
<Account><![CDATA[demo]]></Account>
<SourceFileOptions>
<AuthenticationMethodPublickey>
<Selection>
<AuthenticationFile><![CDATA[${USERPROFILE}\jade_demo\demo_id_rsa]]></AuthenticationFile>
<FileSpecSelection>
</AuthenticationMethodPublickey>
</SSHAuthentication>
</SFTPFragment><FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftp_server_2_local">
<Operation><Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<Copy>
</FileSpecSelection>
<CopySource>
<CopySourceFragmentRef></Selection>
<FTPFragmentRef ref="ftp_test" />
</SourceFileOptions>
</CopySourceFragmentRef>CopySource>
<SourceFileOptions><CopyTarget>
<Selection><CopyTargetFragmentRef>
<LocalTarget <FileSpecSelection>/>
<FileSpec><![CDATA[.*]]></FileSpec>
</CopyTargetFragmentRef>
<Directory><![CDATA[/${USERPROFILE}\jade_demo\b]]></Directory>
</CopyTarget>
</FileSpecSelection>Copy>
</Operation>
</Profile>
</Selection><Profile profile_id="sftp_server_2_local_cumulate">
</SourceFileOptions><Operation>
</CopySource><Copy>
<CopyTarget><CopySource>
<CopyTargetFragmentRef><CopySourceFragmentRef>
<LocalTarget<SFTPFragmentRef ref="sftp_server_2_local_cumulate" />
</CopyTargetFragmentRef>CopySourceFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
<SourceFileOptions>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_pass">
<Selection>
<Operation>
<Copy><FileSpecSelection>
<CopySource>
<CopySourceFragmentRef>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<SFTPFragmentRef ref="sftp_test" /> <Directory><![CDATA[/]]></Directory>
</CopySourceFragmentRef>FileSpecSelection>
<SourceFileOptions>
</Selection>
<Selection></SourceFileOptions>
</CopySource>
<FileSpecSelection>
<CopyTarget>
<FileSpec><![CDATA[.*]]></FileSpec><CopyTargetFragmentRef>
<Directory><![CDATA[/]]></Directory>
<LocalTarget />
</FileSpecSelection>CopyTargetFragmentRef>
</Selection><Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</SourceFileOptions><TargetFileOptions>
</CopySource>
<CumulateFiles>
<CopyTarget>
<CumulativeFileSeparator><![CDATA[--- File: <CopyTargetFragmentRef>%{SourceFileName} ---]]></CumulativeFileSeparator>
<LocalTarget />
<CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename>
</CopyTargetFragmentRef>CumulateFiles>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory></TargetFileOptions>
</CopyTarget>
</Copy>
</Operation>
</Profile>
</Operation>
</Profile>
<Profile profile_id="sftp</Profiles>
</Configurations> |
- Flat File Configuration: file_transfer.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: file_transfer.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_select_recursive">
cumulate]
protocol <Operation>
<Copy>
<CopySource>
= sftp
host <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
= test.sos-berlin.com
port <SourceFileOptions>
<Selection>
<FileSpecSelection>
= 22
user <FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<Directory><![CDATA[/rec]]></Directory>
= demo
ssh_auth_method <Recursive><![CDATA[true]]></Recursive>
= password
password </FileSpecSelection>
</Selection>
= demo
[profile@replace_local_datestamp]
operation </SourceFileOptions>
</CopySource>
= copy
source_protocol <CopyTarget>
<CopyTargetFragmentRef>
= local
source_host <LocalTarget />
</CopyTargetFragmentRef>
= localhost
replacing <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
</Copy>
= ^(test)(_)[0-9]\.txt
replacement </Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_zero_byte">
<Operation>
<Copy>
= file_;[date:yyyy-MM-dd]_
file_spec <CopySource>
<CopySourceFragmentRef>
= ^test_[0-9]\.txt$
source_dir <SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
= ${USERPROFILE}\jade_demo\a
target_protocol <SourceFileOptions>
= local
target_host <Selection>
<FileSpecSelection>
= localhost
target_dir <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
= ${USERPROFILE}\jade_demo\b
[profile@sftp_server_2_local_cumulate]
operation </FileSpecSelection>
= </Selection>
copy
source_include <Directives>
<TransferZeroByteFiles><![CDATA[relaxed]]></TransferZeroByteFiles>
= protocol_fragment_sftp@sftp_server_2_local_cumulate
file_spec </Directives>
</SourceFileOptions>
= ^test_.\.txt$
source_dir </CopySource>
<CopyTarget>
= /
target_protocol <CopyTargetFragmentRef>
<LocalTarget />
= local
target_host </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= localhost
target_dir </CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_poll_minfiles">
= ${USERPROFILE}\jade_demo\a
cumulate_files <Operation>
<Copy>
= true
cumulative_file_separator <CopySource>
= --- File: <CopySourceFragmentRef>
%{SourceFileName} ---
cumulative_file_name = text-files.txt |
Checking Files for Completenss
Code Block |
---|
language | xml |
---|
title | XML Configuration: checking_files_for_completeness.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec><SFTPFragment name="sftp_server_2_local_atomic">
<BasicConnection>
<Directory><<Hostname><![CDATA[/test.sos-berlin.com]]></Directory>Hostname>
</FileSpecSelection>
<Port>22</Port>
</Selection>
<Polling>
<PollInterval><![CDATA[20]]></PollInterval>
BasicConnection>
<SSHAuthentication>
<PollTimeout><<Account><![CDATA[1demo]]></PollTimeout>
Account>
<AuthenticationMethodPassword>
<MinFiles><<Password><![CDATA[3demo]]></MinFiles>Password>
</AuthenticationMethodPassword>
<KeepConnection><![CDATA[true]]></KeepConnection> </SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Polling>Fragments>
<Profiles>
<Profile profile_id="local_2_local_create_md5">
</SourceFileOptions><Operation>
</CopySource><Copy>
<CopyTarget><CopySource>
<CopyTargetFragmentRef><CopySourceFragmentRef>
<LocalTarget<LocalSource />
</CopyTargetFragmentRef>CopySourceFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory><SourceFileOptions>
</CopyTarget>
</Copy><Selection>
</Operation>
</Profile>
<Profile profile_id="replace_local_datestamp"> <FileSpecSelection>
<Operation>
<Copy>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<CopySource>
<CopySourceFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<LocalSource </>FileSpecSelection>
</CopySourceFragmentRef>Selection>
<SourceFileOptions></SourceFileOptions>
</CopySource>
<Selection>
<CopyTarget>
<FileSpecSelection>
<CopyTargetFragmentRef>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec><LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\ab]]></Directory>
<TargetFileOptions>
</FileSpecSelection>
<CheckIntegrityHash>
</Selection>
<<CreateIntegrityHashFile>true</SourceFileOptions>CreateIntegrityHashFile>
</CopySource>CheckIntegrityHash>
<CopyTarget>
</TargetFileOptions>
<CopyTargetFragmentRef></CopyTarget>
</Copy>
<LocalTarget></Operation>
</Profile>
<Profile profile_id="local_2_local_check_md5">
<Rename><Operation>
<ReplaceWhat><![CDATA[^(test)(_)[0-9]\.txt]]></ReplaceWhat>
<Copy>
<CopySource>
<ReplaceWith><![CDATA[file_;[date:yyyy-MM-dd]_]]></ReplaceWith><CopySourceFragmentRef>
<LocalSource </Rename>>
</LocalTarget>CopySourceFragmentRef>
</CopyTargetFragmentRef><SourceFileOptions>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<Selection>
</CopyTarget>
<FileSpecSelection>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_cumulate">
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<Operation>
<Copy>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<CopySource>
</FileSpecSelection>
<CopySourceFragmentRef>
</Selection>
<SFTPFragmentRef ref="sftp_test" </>SourceFileOptions>
</CopySourceFragmentRef>CopySource>
<CopyTarget>
<SourceFileOptions>
<CopyTargetFragmentRef>
<Selection>
<LocalTarget />
<FileSpecSelection>
</CopyTargetFragmentRef>
<FileSpec><<Directory><![CDATA[^test_.\.txt$${USERPROFILE}\jade_demo\b]]></FileSpec>Directory>
<TargetFileOptions>
<Directory><![CDATA[/]]></Directory>
<CheckIntegrityHash />
</FileSpecSelection>TargetFileOptions>
</CopyTarget>
</Selection>Copy>
</Operation>
</SourceFileOptions>Profile>
<Profile profile_id="sftp_server_2_local_atomic">
</CopySource><Operation>
<CopyTarget><Copy>
<CopySource>
<CopyTargetFragmentRef>
<CopySourceFragmentRef>
<LocalTarget />
<SFTPFragmentRef </CopyTargetFragmentRef>ref="sftp_server_2_local_atomic" />
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory></CopySourceFragmentRef>
<TargetFileOptions><SourceFileOptions>
<CumulateFiles><Selection>
<CumulativeFileSeparator><![CDATA[--- File: %{SourceFileName} ---]]></CumulativeFileSeparator>
<FileSpecSelection>
<CumulativeFilename><<FileSpec><![CDATA[text-files.txt^test_large_1\.txt$]]></CumulativeFilename>FileSpec>
<CumulativeFileDelete>< <Directory><![CDATA[true/large/]]></CumulativeFileDelete>Directory>
</CumulateFiles>FileSpecSelection>
</TargetFileOptions>
Selection>
</CopyTarget>
</Copy>SourceFileOptions>
</Operation>
</Profile>CopySource>
<Profile profile_id="local_2_local_create_md5">
<Operation><CopyTarget>
<Copy>
<CopyTargetFragmentRef>
<CopySource>
<CopySourceFragmentRef><LocalTarget />
<LocalSource /></CopyTargetFragmentRef>
</CopySourceFragmentRef>
<SourceFileOptions><Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<Selection><TargetFileOptions>
<FileSpecSelection><Atomicity>
<FileSpec><<AtomicPrefix><![CDATA[^test_[0-9]\.txt$~]]></FileSpec>AtomicPrefix>
<Directory><<AtomicSuffix><![CDATA[${USERPROFILE}\jade_demo\a~]]></Directory>AtomicSuffix>
</FileSpecSelection>Atomicity>
</Selection>TargetFileOptions>
</SourceFileOptions>CopyTarget>
</CopySource>Copy>
</Operation>
<CopyTarget></Profile>
<Profile profile_id="local_2_local_check_steady_state">
<Operation>
<CopyTargetFragmentRef>
<Copy>
<LocalTarget /><CopySource>
</CopyTargetFragmentRef>
<CopySourceFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory><LocalSource />
<TargetFileOptions></CopySourceFragmentRef>
<SourceFileOptions>
<CreateIntegrityHashFile><![CDATA[true]]></CreateIntegrityHashFile>
</TargetFileOptions><Selection>
</CopyTarget>
<FileSpecSelection>
</Copy>
</Operation>
</Profile>
<Profile profile_id="local_2_local_check_md5"> <FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
<Operation>
<Copy>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<CopySource>
<CopySourceFragmentRef></FileSpecSelection>
<LocalSource </>Selection>
</CopySourceFragmentRef>
<CheckSteadyState>
<SourceFileOptions>
<CheckSteadyStateInterval>2</CheckSteadyStateInterval>
<Selection>
<CheckSteadyStateCount>10</CheckSteadyStateCount>
<FileSpecSelection>
</CheckSteadyState>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec></SourceFileOptions>
</CopySource>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<CopyTarget>
<CopyTargetFragmentRef>
</FileSpecSelection>
<LocalTarget </Selection>>
</SourceFileOptions>CopyTargetFragmentRef>
</CopySource> <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<CopyTarget></CopyTarget>
<CopyTargetFragmentRef></Copy>
</Operation>
</Profile>
<LocalTarget />
</CopyTargetFragmentRef>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: checking_files_for_completeness.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_atomic]
protocol <Directory><![CDATA[${USERPROFILE}\jade_demo\b\checked]]></Directory>
<TargetFileOptions>= sftp
host <CheckIntegrityHash />
</TargetFileOptions>
= test.sos-berlin.com
port </CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_atomic">
= <Operation>22
user <Copy>
<CopySource>
= <CopySourceFragmentRef>demo
ssh_auth_method <SFTPFragmentRef ref="sftp_test" />
= password
password </CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
= demo
[profile@local_2_local_create_md5]
operation <FileSpecSelection>
= copy
source_protocol <FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
= local
source_host <Directory><![CDATA[/large/]]></Directory>
</FileSpecSelection>
= localhost
file_spec </Selection>
</SourceFileOptions>
</CopySource>
= ^test_[0-9]\.txt$
source_dir <CopyTarget>
<CopyTargetFragmentRef>
= ${USERPROFILE}\jade_demo\a
target_protocol <LocalTarget />
= </CopyTargetFragmentRef>
local
target_host <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= <TargetFileOptions>localhost
target_dir <Atomicity>
= ${USERPROFILE}\jade_demo\b
check_security_hash <AtomicPrefix><![CDATA[~]]></AtomicPrefix>
= <AtomicSuffix><![CDATA[~]]></AtomicSuffix>
true
create_security_hash_file = true
[profile@local_2_local_check_md5]
operation </Atomicity>
</TargetFileOptions>
</CopyTarget>
= copy
source_protocol </Copy>
</Operation>
</Profile>
<Profile profile_id=" local_2_local_check_steady_state">
source_host <Operation>
<Copy>
= <CopySource>localhost
file_spec <CopySourceFragmentRef>
<LocalSource />
= ^test_[0-9]\.txt$
source_dir </CopySourceFragmentRef>
<SourceFileOptions>
= ${USERPROFILE}\jade_demo\a
target_protocol <Selection>
= local
target_host <FileSpecSelection>
<FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
= localhost
target_dir = <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
b
check_security_hash </FileSpecSelection>
= true
[profile@sftp_server_2_local_atomic]
operation </Selection>
= <CheckSteadyState>
copy
source_include <CheckSteadyStateInterval><![CDATA[2]]></CheckSteadyStateInterval>
= protocol_fragment_sftp@sftp_server_2_local_atomic
file_spec <CheckSteadyStateCount><![CDATA[10]]></CheckSteadyStateCount>
= ^test_large_1\.txt$
source_dir </CheckSteadyState>
= </large/SourceFileOptions>
target_protocol </CopySource>
<CopyTarget>
= local
target_host <CopyTargetFragmentRef>
= localhost
target_dir <LocalTarget />
</CopyTargetFragmentRef>
= <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
a
atomic_prefix <TargetFileOptions />
</CopyTarget>
= ~
atomic_suffix </Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_= ~
[profile@local_2_local_key">
<Operation>
_check_steady_state]
operation <Copy>
<CopySource>
= <CopySourceFragmentRef>
copy
source_protocol <SFTPFragmentRef ref="sftp_test_key" />
</CopySourceFragmentRef>
= local
source_host <SourceFileOptions>
= <Selection>
localhost
file_spec <FileSpecSelection>
<FileSpec><![CDATA[^test= ^test_large_1\.txt$]]></FileSpec>
source_dir <Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
= ${USERPROFILE}\jade_demo\a
check_steady_state_of_files = </Selection>
true
check_steady_state_interval = </SourceFileOptions>
2
steady_state_count </CopySource>
= <CopyTarget>10
target_protocol <CopyTargetFragmentRef>
= local
target_host <LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= localhost
target_dir </CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
...
= ${USERPROFILE}\jade_demo\b |