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 JADE - XML Configuration - 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
- 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>
<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> |
Code Block |
---|
|
<?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_test">
<BasicConnection>
<DisableOverwriteFiles>false</DisableOverwriteFiles>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
</TargetFileOptions>
<Port><![CDATA[21]]></Port>
</BasicConnection>CopyTarget>
<BasicAuthentication><TransferOptions>
<Account><![CDATA[demo]]></Account><Transactional>true</Transactional>
<Password><![CDATA[demo]]></Password></TransferOptions>
</BasicAuthentication>Copy>
</FTPFragment>Operation>
</ProtocolFragments>
</Fragments>
<Profiles>Profile>
<Profile profile_id="ftpsftp_server_2_local_pass">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<FTPFragmentRef<SFTPFragmentRef ref="ftp_test"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>
</CopyTargetFragmentRef> <DisableOverwriteFiles>true</DisableOverwriteFiles>
</TargetFileOptions>
</CopyTarget>
<TransferOptions>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory><Transactional>true</Transactional>
</CopyTarget>TransferOptions>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: getting_started.ini |
---|
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>
[protocol_fragment_ftp@ftp_server_2_local]
protocol = ftp
host <SFTPFragment name="sftp_test">
<BasicConnection>
= <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
port <Port><![CDATA[22]]></Port>
</BasicConnection>
= <SSHAuthentication>21
user <Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
= <Password><![CDATA[demo]]></Password>
password </AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
= </ProtocolFragments>
demo
passive_mode </Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_pass">
<Operation>
<Copy>
= true
[protocol_fragment_sftp@sftp_server_2_local_pass]
protocol <CopySource>
<CopySourceFragmentRef>
= sftp
host <SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
<SourceFileOptions>
= test.sos-berlin.com
port <Selection>
= <FileSpecSelection>22
user <FileSpec><![CDATA[.*]]></FileSpec>
= demo
ssh_auth_method <Directory><![CDATA[/]]></Directory>
= </FileSpecSelection>password
password </Selection>
</SourceFileOptions>
= demo
[profile@ftp_server_2_local]
operation </CopySource>
<CopyTarget>
= copy
source_include <CopyTargetFragmentRef>
<LocalTarget />
= protocol_fragment_ftp@ftp_server_2_local
file_spec </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= </CopyTarget>
.*
source_dir </Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Simple File Selection
Code Block |
---|
|
<?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>
= /
target_protocol = local
target_host <SFTPFragment name="sftp_test">
= localhost
target_dir <BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
= ${USERPROFILE}\jade_demo\a
overwrite_files <Port><![CDATA[22]]></Port>
</BasicConnection>
= true
transactional <SSHAuthentication>
<Account><![CDATA[demo]]></Account>
= true
[profile@sftp_server_2_local_pass]
operation <AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
= copy
source_include </SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile= profile_id="sftpprotocol_fragment_sftp@sftp_server_2_local_select_recursive">
pass
file_spec <Operation>
<Copy>
= <CopySource>.*
source_dir <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
target_protocol = </CopySourceFragmentRef>
local
target_host <SourceFileOptions>
= localhost
target_dir <Selection>
<FileSpecSelection>
= ${USERPROFILE}\jade_demo\a
overwrite_files <FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
= false
transactional <Directory><![CDATA[/rec]]></Directory>
= 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/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<Recursive><![CDATA[true]]></Recursive>
</FileSpecSelection>
</Selection>
</SourceFileOptions><SFTPFragment name="sftp_test">
</CopySource><BasicConnection>
<CopyTarget><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<CopyTargetFragmentRef><Port><![CDATA[22]]></Port>
<LocalTarget /></BasicConnection>
</CopyTargetFragmentRef><SSHAuthentication>
<Directory><<Account><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>Account>
</CopyTarget>
<AuthenticationMethodPassword>
</Copy>
<Password><![CDATA[demo]]></Password>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
|
<?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>
<SFTPFragment name="sftp_test">
<BasicConnection>
AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_select_recursive">
<Operation>
<Copy>
<CopySource>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
<Port><![CDATA[22]]></Port>
</BasicConnection>CopySourceFragmentRef>
<SSHAuthentication>
<SourceFileOptions>
<Account><![CDATA[demo]]></Account>
<Selection>
<AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password><FileSpecSelection>
</AuthenticationMethodPassword>
</SSHAuthentication><FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_zero_byte">
<Directory><![CDATA[/rec]]></Directory>
<Operation>
<Copy>
<Recursive><![CDATA[true]]></Recursive>
<CopySource>
</FileSpecSelection>
<CopySourceFragmentRef>
</Selection>
<SFTPFragmentRef ref="sftp_test" </>SourceFileOptions>
</CopySourceFragmentRef>CopySource>
<CopyTarget>
<SourceFileOptions>
<CopyTargetFragmentRef>
<Selection>
<LocalTarget />
<FileSpecSelection>
</CopyTargetFragmentRef>
<FileSpec><<Directory><![CDATA[^test_[0-9]\.txt$${USERPROFILE}\jade_demo\a]]></FileSpec>Directory>
</CopyTarget>
<Directory><![CDATA[/]]></Directory></Copy>
</Operation>
</Profile>
</FileSpecSelection>
</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 </Selection>
<Directives>
= sftp
host <TransferZeroByteFiles><![CDATA[relaxed]]></TransferZeroByteFiles>
</Directives>
= test.sos-berlin.com
port </SourceFileOptions>
</CopySource>
= <CopyTarget>22
user <CopyTargetFragmentRef>
<LocalTarget />
= demo
ssh_auth_method </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= password
password </CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
More Advanced File Selection
Code Block |
---|
|
<?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>
= demo
[protocol_fragment_sftp@sftp_server_2_local_zero_byte]
protocol = sftp
host <SFTPFragment name="sftp_test">
<BasicConnection>
= <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
port = <Port><![CDATA[22]]></Port>
22
user = demo
ssh_auth_method </BasicConnection>
<SSHAuthentication>
= password
password <Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
= <Password><![CDATA[demo]]></Password>
demo
[profile@sftp_server_2_local_select_recursive]
operation </AuthenticationMethodPassword>
</SSHAuthentication>
= copy
source_include </SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile= profile_id="sftpprotocol_fragment_sftp@sftp_server_2_local_select_poll_minfiles">
recursive
file_spec <Operation>
<Copy>
<CopySource>
= ^test_.\.txt$
source_dir <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />rec
recursive </CopySourceFragmentRef>
= <SourceFileOptions>
true
target_protocol = <Selection>local
target_host <FileSpecSelection>
= localhost
target_dir <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
= ${USERPROFILE}\jade_demo\a
overwrite_files </FileSpecSelection>
= false
[profile@sftp_server_2_local_zero_byte]
operation </Selection>
<Polling>
= copy
source_include <PollInterval><![CDATA[20]]></PollInterval>
= protocol_fragment_sftp@sftp_server_2_local_zero_byte
file_spec <PollTimeout><![CDATA[1]]></PollTimeout>
<MinFiles><![CDATA[3]]></MinFiles>
= ^test_[0-9]\.txt$
source_dir </Polling>
</SourceFileOptions>
= </CopySource>
zero_byte_transfer <CopyTarget>
= relaxed
target_protocol <CopyTargetFragmentRef>
<LocalTarget= />local
target_host </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= localhost
target_dir </CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
File Transfer
= ${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/jadeyade/JADEYADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments /><ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="replace<SFTPFragment name="sftp_server_2_local_datestamppoll_minfiles">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<BasicConnection>
<LocalSource /> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<<Port>22</CopySourceFragmentRef>Port>
</BasicConnection>
<SourceFileOptions>
<SSHAuthentication>
<Selection><Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
<FileSpecSelection>
<Password><![CDATA[demo]]></Password>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec></AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory></ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_poll_minfiles">
<Operation>
</FileSpecSelection>
<Copy>
</Selection><CopySource>
</SourceFileOptions>
<CopySourceFragmentRef>
<SFTPFragmentRef </CopySource>ref="sftp_server_2_local_poll_minfiles" />
<CopyTarget> </CopySourceFragmentRef>
<CopyTargetFragmentRef><SourceFileOptions>
<LocalTarget><Selection>
<Rename><FileSpecSelection>
<ReplaceWhat><<FileSpec><![CDATA[^(test)(^test_)[0-9]\.txttxt$]]></ReplaceWhat>FileSpec>
<ReplaceWith><<Directory><![CDATA[file_;[date:yyyy-MM-dd]_]]></ReplaceWith>/]]></Directory>
</Rename>FileSpecSelection>
</LocalTarget>Selection>
</CopyTargetFragmentRef><Polling>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<PollInterval>20</PollInterval>
< <PollTimeout>1</CopyTarget>
PollTimeout>
<<MinFiles>5</Copy>MinFiles>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
|
<?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>
<PollingServer>false</PollingServer>
<PollForever>false</PollForever>
<SFTPFragment name="sftp_test">
</Polling>
<BasicConnection></SourceFileOptions>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname></CopySource>
<Port><![CDATA[22]]></Port>
<CopyTarget>
</BasicConnection>
<CopyTargetFragmentRef>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
<LocalTarget />
<AuthenticationMethodPassword></CopyTargetFragmentRef>
<Password><<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Password>Directory>
</AuthenticationMethodPassword>CopyTarget>
</SSHAuthentication>Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: more_advanced_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftpSFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_cumulate">
_poll_minfiles]
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[/]]></Directory>
demo
ssh_auth_method </FileSpecSelection>
= password
password </Selection>
</SourceFileOptions>
= demo
[profile@sftp_server_2_local_poll_minfiles]
operation </CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
= copy
source_include <LocalTarget />
</CopyTargetFragmentRef>
= protocol_fragment_sftp@sftp_server_2_local_poll_minfiles
file_spec <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
= ^test_[0-9]\.txt$
source_dir <CumulateFiles>
<CumulativeFileSeparator><![CDATA[--- File: %{SourceFileName} ---]]></CumulativeFileSeparator>
= /
poll_interval <CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename>
= 20
poll_timeout </CumulateFiles>
</TargetFileOptions>
= </CopyTarget>
1
poll_minfiles </Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
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>
<ProtocolFragments>
5
polling_server = false
polling_server_poll_forever <FTPFragment name="ftp_test">
= false
target_protocol <BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
= local
target_host <Port><![CDATA[21]]></Port>
= </BasicConnection>
localhost
target_dir <BasicAuthentication>
<Account><![CDATA[demo]]></Account>
= ${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> <Password><![CDATA[demo]]></Password>
</BasicAuthentication>
</FTPFragment>
<SFTPFragment name="sftp_testserver_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>
<SFTPFragment name="sftp_test_key">
<BasicConnection><AuthenticationMethodPassword>
<Hostname><<Password><![CDATA[test.sos-berlin.comdemo]]></Hostname>
Password>
</AuthenticationMethodPassword>
<Port><![CDATA[22]]></Port> </SSHAuthentication>
</SFTPFragment>
</BasicConnection>ProtocolFragments>
</Fragments>
<Profiles>
<SSHAuthentication><Profile profile_id="replace_local_datestamp">
<Operation>
<Account><![CDATA[demo]]></Account> <Copy>
<AuthenticationMethodPublickey><CopySource>
<AuthenticationFile><![CDATA[${USERPROFILE}\jade_demo\demo_id_rsa]]></AuthenticationFile>
<CopySourceFragmentRef>
</AuthenticationMethodPublickey><LocalSource>
</SSHAuthentication>
</SFTPFragment><Rename>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftp_server_2_local">
<Operation><ReplaceWhat><![CDATA[^(test)(_)[0-9]\.txt]]></ReplaceWhat>
<Copy>
<CopySource><ReplaceWith><![CDATA[file_;[date:yyyy-MM-dd]_]]></ReplaceWith>
<CopySourceFragmentRef>
</Rename>
<FTPFragmentRef ref="ftp_test" </>LocalSource>
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.*txt$]]></FileSpec>
<Directory><![CDATA[/${USERPROFILE}\jade_demo\a]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\ab]]></Directory>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_cumulate">
<Operation>
<Copy>
<CopySource>
</CopyTarget>
</Copy><CopySourceFragmentRef>
</Operation>
</Profile>
<Profile<SFTPFragmentRef profile_idref="sftp_server_2_local_passcumulate" />
<Operation>
</CopySourceFragmentRef>
<Copy>
<SourceFileOptions>
<CopySource>
<Selection>
<CopySourceFragmentRef> <FileSpecSelection>
<SFTPFragmentRef ref="sftp_test" />
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<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: %{SourceFileName} ---]]></CumulativeFileSeparator>
<CopyTargetFragmentRef>
<LocalTarget />
<CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename>
</CopyTargetFragmentRef>CumulateFiles>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory></TargetFileOptions>
</CopyTarget>
</Copy>
</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">
<Operation>
cumulate]
protocol <Copy>
<CopySource>
= <CopySourceFragmentRef>sftp
host <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>
</SourceFileOptions>
= demo
[profile@replace_local_datestamp]
operation </CopySource>
<CopyTarget>
= copy
source_protocol <CopyTargetFragmentRef>
<LocalTarget />
= local
source_host </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= localhost
replacing </CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_zero_byte">
= ^(test)(_)[0-9]\.txt
replacement <Operation>
<Copy>
<CopySource>
= file_;[date:yyyy-MM-dd]_
file_spec <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
= ^test_[0-9]\.txt$
source_dir </CopySourceFragmentRef>
<SourceFileOptions>
= ${USERPROFILE}\jade_demo\a
target_protocol <Selection>
= local
target_host <FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= localhost
target_dir <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>
= ${USERPROFILE}\jade_demo\a
cumulate_files </Profile>
<Profile profile_id="sftp_server_2_local_poll_minfiles">
<Operation>
= <Copy>true
cumulative_file_separator <CopySource>
= --- File: %{SourceFileName} ---
cumulative_file_name <CopySourceFragmentRef>
= text-files.txt |
Checking Files for Completenss
Code Block |
---|
language | xml |
---|
title | XML Configuration: checking_files_for_completeness.xml |
---|
collapse | true |
---|
|
<?xml <SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
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>
<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>BasicConnection>
<Polling><SSHAuthentication>
<PollInterval><<Account><![CDATA[20demo]]></PollInterval>
Account>
<PollTimeout><![CDATA[1]]></PollTimeout>
<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>
<CopyTarget></CheckIntegrityHash>
<CopyTargetFragmentRef></TargetFileOptions>
<LocalTarget></CopyTarget>
</Copy>
<Rename></Operation>
</Profile>
<ReplaceWhat><![CDATA[^(test)(_)[0-9]\.txt]]></ReplaceWhat><Profile profile_id="local_2_local_check_md5">
<Operation>
<Copy>
<ReplaceWith><![CDATA[file_;[date:yyyy-MM-dd]_]]></ReplaceWith>
<CopySource>
</Rename><CopySourceFragmentRef>
<LocalSource </LocalTarget>>
</CopyTargetFragmentRef>CopySourceFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory><SourceFileOptions>
</CopyTarget>
</Copy><Selection>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_cumulate">
<Operation><FileSpecSelection>
<Copy>
<CopySource>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<CopySourceFragmentRef><Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<SFTPFragmentRef ref="sftp_test" </>FileSpecSelection>
</CopySourceFragmentRef>Selection>
<SourceFileOptions></SourceFileOptions>
</CopySource>
<Selection>
<CopyTarget>
<FileSpecSelection>
<CopyTargetFragmentRef>
<LocalTarget />
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
</CopyTargetFragmentRef>
<Directory><![CDATA[/${USERPROFILE}\jade_demo\b]]></Directory>
<TargetFileOptions>
</FileSpecSelection>
<CheckIntegrityHash </Selection>>
</SourceFileOptions>TargetFileOptions>
</CopySource>CopyTarget>
</Copy>
<CopyTarget></Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_atomic">
<CopyTargetFragmentRef><Operation>
<Copy>
<LocalTarget /><CopySource>
</CopyTargetFragmentRef><CopySourceFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> <SFTPFragmentRef ref="sftp_server_2_local_atomic" />
<TargetFileOptions></CopySourceFragmentRef>
<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>SourceFileOptions>
</Copy>CopySource>
</Operation>
</Profile>
<CopyTarget>
<Profile profile_id="local_2_local_create_md5">
<CopyTargetFragmentRef>
<Operation>
<LocalTarget <Copy>/>
<CopySource> </CopyTargetFragmentRef>
<CopySourceFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
<LocalSource />
<Atomicity>
</CopySourceFragmentRef>
<SourceFileOptions><AtomicPrefix><![CDATA[~]]></AtomicPrefix>
<Selection> <AtomicSuffix><![CDATA[~]]></AtomicSuffix>
</Atomicity>
<FileSpecSelection>
</TargetFileOptions>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec></CopyTarget>
</Copy>
</Operation>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</Profile>
<Profile profile_id="local_2_local_check_steady_state">
<Operation>
</FileSpecSelection><Copy>
<CopySource>
</Selection>
<CopySourceFragmentRef>
<LocalSource </SourceFileOptions>>
</CopySource>CopySourceFragmentRef>
<CopyTarget>
<SourceFileOptions>
<CopyTargetFragmentRef>
<Selection>
<LocalTarget />
<FileSpecSelection>
</CopyTargetFragmentRef>
<Directory><<FileSpec><![CDATA[${USERPROFILE}\jade_demo\b^test_large_1\.txt$]]></Directory>FileSpec>
<TargetFileOptions>
<CreateIntegrityHashFile><<Directory><![CDATA[true${USERPROFILE}\jade_demo\a]]></CreateIntegrityHashFile>Directory>
</TargetFileOptions>
</CopyTarget>FileSpecSelection>
</Copy>
</Operation>Selection>
</Profile>
<Profile profile_id="local_2_local_check_md5">
<CheckSteadyState>
<Operation>
<Copy>
<CheckSteadyStateInterval>2</CheckSteadyStateInterval>
<CopySource>
<CopySourceFragmentRef><CheckSteadyStateCount>10</CheckSteadyStateCount>
<LocalSource </>CheckSteadyState>
</CopySourceFragmentRef>SourceFileOptions>
<SourceFileOptions></CopySource>
<Selection><CopyTarget>
<CopyTargetFragmentRef>
<FileSpecSelection>
<LocalTarget />
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
</CopyTarget>
</FileSpecSelection>Copy>
</Operation>
</Profile>
</Selection>
</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 </SourceFileOptions>
</CopySource>
= <CopyTarget>sftp
host <CopyTargetFragmentRef>
<LocalTarget />
= test.sos-berlin.com
port </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b\checked]]></Directory>
<TargetFileOptions>
= 22
user <CheckIntegrityHash />
</TargetFileOptions>
= </CopyTarget>
demo
ssh_auth_method </Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_atomic">
= password
password <Operation>
<Copy>
<CopySource>
= demo
[profile@local_2_local_create_md5]
operation <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
= copy
source_protocol </CopySourceFragmentRef>
<SourceFileOptions>
= local
source_host <Selection>
= <FileSpecSelection>localhost
file_spec <FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
= ^test_[0-9]\.txt$
source_dir <Directory><![CDATA[/large/]]></Directory>
</FileSpecSelection>
= ${USERPROFILE}\jade_demo\a
target_protocol </Selection>
= </SourceFileOptions>
local
target_host </CopySource>
<CopyTarget>
= localhost
target_dir <CopyTargetFragmentRef>
<LocalTarget />
= ${USERPROFILE}\jade_demo\b
check_security_hash </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= true
create_security_hash_file <TargetFileOptions>
= true
[profile@local_2_local_check_md5]
operation <Atomicity>
<AtomicPrefix><![CDATA[~]]></AtomicPrefix>
= copy
source_protocol <AtomicSuffix><![CDATA[~]]></AtomicSuffix>
</Atomicity>
= local
source_host </TargetFileOptions>
</CopyTarget>
= </Copy>
localhost
file_spec </Operation>
</Profile>
<Profile profile_id="local_2_local_check_steady_state">
<Operation>
<Copy>
= ^test_[0-9]\.txt$
source_dir <CopySource>
<CopySourceFragmentRef>
= ${USERPROFILE}\jade_demo\a
target_protocol <LocalSource />
= </CopySourceFragmentRef>
local
target_host <SourceFileOptions>
= <Selection>localhost
target_dir <FileSpecSelection>
<FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
= ${USERPROFILE}\jade_demo\b
check_security_hash <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= true
[profile@sftp_server_2_local_atomic]
operation </FileSpecSelection>
= </Selection>
copy
source_include <CheckSteadyState>
<CheckSteadyStateInterval><![CDATA[2]]></CheckSteadyStateInterval>
= protocol_fragment_sftp@sftp_server_2_local_atomic
file_spec <CheckSteadyStateCount><![CDATA[10]]></CheckSteadyStateCount>
</CheckSteadyState>
= ^test_large_1\.txt$
source_dir </SourceFileOptions>
</CopySource>
<CopyTarget>
= /large/
target_protocol <CopyTargetFragmentRef>
<LocalTarget />
= local
target_host </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
= localhost
target_dir <TargetFileOptions />
</CopyTarget>
</Copy>
= ${USERPROFILE}\jade_demo\a
atomic_prefix </Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_key">
<Operation>
= ~
atomic_suffix <Copy>
<CopySource>
<CopySourceFragmentRef>
= ~
[profile@local_2_local_check_steady_state]
operation <SFTPFragmentRef ref="sftp_test_key" />
= </CopySourceFragmentRef>
copy
source_protocol <SourceFileOptions>
= local
source_host <Selection>
<FileSpecSelection>
= localhost
file_spec <FileSpec><![CDATA[^test\.txt$]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
= ^test_large_1\.txt$
source_dir </FileSpecSelection>
</Selection>
= ${USERPROFILE}\jade_demo\a
check_steady_state_of_files = true
check_steady_state_interval </SourceFileOptions>
= 2
steady_state_count </CopySource>
<CopyTarget>
= 10
target_protocol <CopyTargetFragmentRef>
<LocalTarget= />local
target_host </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= localhost
target_dir </CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
...
= ${USERPROFILE}\jade_demo\b |