Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Scope

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:

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

Getting Started

Code Block
languagexml
titleXML Configuration
Code Block
languagexml
titleConfiguration File: getting_started.xml
collapsetrue
<?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>
      <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>
  </TransferOptions>
     </Operation>
    </Profile>
  </Profiles>
</Configurations>
Code Block
languagexml
titleFlat File Configuration: getting_started.ini
collapsetrue
[protocol_fragment_ftp@ftp_server_2_local]
protocol         </Copy>
      </Operation>
    </Profile>
  </Profiles>
</Configurations>
  • Flat File Configuration (.ini)
Code Block
languagexml
collapsetrue
<?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>
    = ftp
host        <ProtocolFragments>
      <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>
     = demo
passive_mode      </SSHAuthentication>
      </SFTPFragment>
    </ProtocolFragments>
  </Fragments>
  <Profiles>
    <Profile profile_id="sftp= true

[protocol_fragment_sftp@sftp_server_2_local_pass">]
protocol      <Operation>
        <Copy>
          <CopySource>
    = sftp
host       <CopySourceFragmentRef>
              <SFTPFragmentRef ref="sftp_test" />
            </CopySourceFragmentRef>
= test.sos-berlin.com
port            <SourceFileOptions>
              <Selection>
                <FileSpecSelection>
   = 22
user               <FileSpec><![CDATA[.*]]></FileSpec>
                  <Directory><![CDATA[/]]></Directory>
= demo
ssh_auth_method                     = </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
languagexml
collapsetrue
<?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>
          <AuthenticationMethodPassword>
= true

[profile@sftp_server_2_local_pass]
operation            <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>
              <Selection>
      = localhost
target_dir         <FileSpecSelection>
                  <FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
= ${USERPROFILE}\jade_demo\a
overwrite_files                     = false
transactional   <Directory><![CDATA[/rec]]></Directory>
                    = true

Simple File Selection

Code Block
languagexml
titleXML Configuration: simple_file_selection.xml
collapsetrue
<?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>
          </CopySource><SFTPFragment name="sftp_test">
          <CopyTarget><BasicConnection>
            <CopyTargetFragmentRef><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
          <Port><![CDATA[22]]></Port>
    <LocalTarget />
   </BasicConnection>
         </CopyTargetFragmentRef><SSHAuthentication>
            <Directory><<Account><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>Account>
          </CopyTarget><AuthenticationMethodPassword>
        </Copy>
      </Operation>
    </Profile>
  </Profiles>
</Configurations>

 

Code Block
languagexml
collapsetrue
<?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>
<Password><![CDATA[demo]]></Password>
          </AuthenticationMethodPassword>
        </SSHAuthentication>
      </SFTPFragment>
    </ProtocolFragments>
  </Fragments>
  <Profiles>
    <Profile profile_id="sftp_server_2_local_select_recursive">
      <Operation>
        <Copy>
         <SFTPFragment name="sftp_test"> <CopySource>
        <BasicConnection>
    <CopySourceFragmentRef>
               <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<SFTPFragmentRef ref="sftp_test" />
            <Port><![CDATA[22]]></Port>
</CopySourceFragmentRef>
            </BasicConnection><SourceFileOptions>
         <SSHAuthentication>
     <Selection>
     <Account><![CDATA[demo]]></Account>
           <AuthenticationMethodPassword><FileSpecSelection>
              <Password><    <FileSpec><![CDATA[demo^test_.\.txt$]]></Password>FileSpec>
          </AuthenticationMethodPassword>
        </SSHAuthentication>
      </SFTPFragment><Directory><![CDATA[/rec]]></Directory>
    </ProtocolFragments>
  </Fragments>
  <Profiles>
    <Profile profile_id="sftp_server_2_local_zero_byte">
      <Operation><Recursive><![CDATA[true]]></Recursive>
        <Copy>
        </FileSpecSelection>
  <CopySource>
            <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>
        </Copy>
          <Directory><![CDATA[/]]></Directory>
</Operation>
    </Profile>
  </Profiles>
</Configurations>
Code Block
languagexml
titleFlat File Configuration: simple_file_selection.ini
collapsetrue
[protocol_fragment_sftp@sftp_server_2_local_select_recursive]
protocol                </FileSpecSelection>
            =  </Selection>sftp
host              <Directives>
                <TransferZeroByteFiles><![CDATA[relaxed]]></TransferZeroByteFiles>
  = test.sos-berlin.com
port           </Directives>
            </SourceFileOptions>
         = </CopySource>22
user          <CopyTarget>
            <CopyTargetFragmentRef>
              <LocalTarget />
            </CopyTargetFragmentRef>
= demo
ssh_auth_method            <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
         = </CopyTarget>
password
password            </Copy>
      </Operation>
    </Profile>
  </Profiles>
</Configurations>

More Advanced File Selection

Code Block
languagexml
collapsetrue
 <?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>
        </BasicConnection>
       = <SSHAuthentication>22
user          <Account><![CDATA[demo]]></Account>
           <AuthenticationMethodPassword>
           = <Password><![CDATA[demo]]></Password>

ssh_auth_method                  </AuthenticationMethodPassword>
   = password
password         </SSHAuthentication>
      </SFTPFragment>
    </ProtocolFragments>
  </Fragments>
  <Profiles>
    <Profile profile_id="sftp= demo

[profile@sftp_server_2_local_poll_minfiles">
select_recursive]
operation      <Operation>
        <Copy>
          <CopySource>
   = copy
source_include        <CopySourceFragmentRef>
              <SFTPFragmentRef ref="sftp_test" />
= protocol_fragment_sftp@sftp_server_2_local_select_recursive
file_spec                </CopySourceFragmentRef>
            <SourceFileOptions>
= ^test_.\.txt$
source_dir                <Selection>
          = /rec
recursive     <FileSpecSelection>
                       <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= true
target_protocol                  <Directory><![CDATA[/]]></Directory>
   = local
target_host            </FileSpecSelection>
             = </Selection>
localhost
target_dir              <Polling>
            = ${USERPROFILE}\jade_demo\a
overwrite_files      <PollInterval><![CDATA[20]]></PollInterval>
               = <PollTimeout><![CDATA[1]]></PollTimeout>
false

[profile@sftp_server_2_local_zero_byte]
operation                            <MinFiles><![CDATA[3]]></MinFiles>
= copy
source_include                 </Polling>
     = protocol_fragment_sftp@sftp_server_2_local_zero_byte
file_spec        </SourceFileOptions>
          </CopySource>
          <CopyTarget>
= ^test_[0-9]\.txt$
source_dir            <CopyTargetFragmentRef>
              <LocalTarget= />
zero_byte_transfer            </CopyTargetFragmentRef>
      = relaxed
target_protocol            <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
         = </CopyTarget>
local
target_host         </Copy>
       </Operation>
    </Profile>
  </Profiles>
</Configurations>

File Transfer

Code Block
languagexml
collapsetrue
 <?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>
 localhost
target_dir                      <ProtocolFragments />
  </Fragments>
 = ${USERPROFILE}\jade_demo\a

More Advanced File Selection

Code Block
languagexml
titleXML Configuration: more_advanced_file_selection.xml
collapsetrue
<?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> <Profiles>
    <Profile profile_id="replace_local_datestamp">
      <Operation>
        <Copy>
          <CopySource>
            <CopySourceFragmentRef>
              <LocalSource />
            </CopySourceFragmentRef>
            <SourceFileOptions><SFTPFragment name="sftp_server_2_local_poll_minfiles">
              <Selection><BasicConnection>
                <FileSpecSelection><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
          <Port>22</Port>
        <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec></BasicConnection>
        <SSHAuthentication>
          <Directory><<Account><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
Account>
          <AuthenticationMethodPassword>
            </FileSpecSelection><Password><![CDATA[demo]]></Password>
          </AuthenticationMethodPassword>
        </Selection>SSHAuthentication>
      </SFTPFragment>
    </ProtocolFragments>
  </SourceFileOptions>Fragments>
  <Profiles>
    <Profile profile_id="sftp_server_2_local_poll_minfiles">
      </CopySource><Operation>
        <Copy>
  <CopyTarget>
        <CopySource>
    <CopyTargetFragmentRef>
        <CopySourceFragmentRef>
      <LocalTarget>
        <SFTPFragmentRef ref="sftp_server_2_local_poll_minfiles" />
      <Rename>
      </CopySourceFragmentRef>
            <ReplaceWhat><![CDATA[^(test)(_)[0-9]\.txt]]></ReplaceWhat><SourceFileOptions>
              <Selection>
    <ReplaceWith><![CDATA[file_;[date:yyyy-MM-dd]_]]></ReplaceWith>
            <FileSpecSelection>
    </Rename>
              </LocalTarget><FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
            </CopyTargetFragmentRef>
            <Directory><![CDATA[${USERPROFILE}\jade_demo\b/]]></Directory>

                </CopyTarget>FileSpecSelection>
              </Copy>Selection>
      </Operation>
        <Polling>
      </Profile>
  </Profiles>
</Configurations>

 

Code Block
languagexml
collapsetrue
<?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>      <PollInterval>20</PollInterval>
                <PollTimeout>1</PollTimeout>
                <MinFiles>5</MinFiles>
      <SFTPFragment name="sftp_test">
          <BasicConnection><PollingServer>false</PollingServer>
          <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
      <PollForever>false</PollForever>
              <Port><![CDATA[22]]></Port></Polling>
            </BasicConnection>SourceFileOptions>
          <SSHAuthentication></CopySource>
          <Account><![CDATA[demo]]></Account>
<CopyTarget>
            <AuthenticationMethodPassword><CopyTargetFragmentRef>
            <Password><![CDATA[demo]]></Password>  <LocalTarget />
            </AuthenticationMethodPassword>CopyTargetFragmentRef>
            </SSHAuthentication><Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
      </SFTPFragment>
    </ProtocolFragments>CopyTarget>
  </Fragments>
  <Profiles>
    <Profile profile_id="sftp_server_2_local_cumulate"> </Copy>
      <Operation></Operation>
    </Profile>
  </Profiles>
</Configurations>
Code Block
languagexml
titleFlat File Configuration: more_advanced_file_selection.ini
collapsetrue
[protocol_fragment_sftp@sftp_server_2_local_poll_minfiles]
protocol    <Copy>
          <CopySource>
            <CopySourceFragmentRef>
      = sftp
host       <SFTPFragmentRef ref="sftp_test" />
            </CopySourceFragmentRef>
            <SourceFileOptions>
= test.sos-berlin.com
port              <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
languagexml
collapsetrue
<?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
languagexml
titleXML Configuration: file_transfer.xml
collapsetrue
<?xml version="1.0" encoding="utf-8"?>
<Configurations>
  <Fragments>
    <ProtocolFragments> <Password><![CDATA[demo]]></Password>
        </BasicAuthentication>
      </FTPFragment>
      <SFTPFragment name="sftp_test_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>
      <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>
            <CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename>
  <LocalTarget />
            </CopyTargetFragmentRef>CumulateFiles>
            <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory></TargetFileOptions>
          </CopyTarget>
        </Copy>
      </Operation>
    </Profile>
    <Profile profile_id="sftp</Profiles>
</Configurations>
Code Block
languagexml
titleFlat File Configuration: file_transfer.ini
collapsetrue
[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>
                = </FileSpecSelection>password
password              </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>
           = copy
source_include  </Selection>
              <Directives>
      = protocol_fragment_sftp@sftp_server_2_local_cumulate
file_spec         <TransferZeroByteFiles><![CDATA[relaxed]]></TransferZeroByteFiles>
              </Directives>
    = ^test_.\.txt$
source_dir       </SourceFileOptions>
          </CopySource>
         = <CopyTarget>/
target_protocol            <CopyTargetFragmentRef>
         = local
target_host    <LocalTarget />
            </CopyTargetFragmentRef>
        = localhost
target_dir   <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
          </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
languagexml
titleXML Configuration: checking_files_for_completeness.xml
collapsetrue
<?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>
                <PollTimeout><![CDATA[1]]></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>
          <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>
            <CopyTargetFragmentRef>
    <FileSpecSelection>
          <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>   <CopyTarget>
    </Profile>
    <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>
            </SourceFileOptions>
  <LocalSource />
            </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>
                </FileSpecSelection>CopyTarget>
        </Copy>
      </Selection>Operation>
    </Profile>
        </SourceFileOptions>
  </Profiles>
</Configurations>
Code Block
languagexml
titleFlat File Configuration: checking_files_for_completeness.ini
collapsetrue
[protocol_fragment_sftp@sftp_server_2_local_atomic]
protocol        </CopySource>
          <CopyTarget>
          =  <CopyTargetFragmentRef>sftp
host              <LocalTarget />
            </CopyTargetFragmentRef>
     = test.sos-berlin.com
port      <Directory><![CDATA[${USERPROFILE}\jade_demo\b\checked]]></Directory>
            <TargetFileOptions>
              <CheckIntegrityHash= />22
user            </TargetFileOptions>
          </CopyTarget>
        </Copy>
      </Operation>
    </Profile>
    <Profile profile_id="sftp_server_2_local_atomic">
= demo
ssh_auth_method      <Operation>
        <Copy>
         = <CopySource>password
password            <CopySourceFragmentRef>
               <SFTPFragmentRef ref="sftp_test" />
= demo


[profile@local_2_local_create_md5]
operation            </CopySourceFragmentRef>
            <SourceFileOptions>
   = copy
source_protocol          <Selection>
           = local
source_host    <FileSpecSelection>
                  <FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
   = localhost
file_spec              <Directory><![CDATA[/large/]]></Directory>
             =   </FileSpecSelection>
^test_[0-9]\.txt$
source_dir               </Selection>
            </SourceFileOptions>
= ${USERPROFILE}\jade_demo\a
target_protocol            </CopySource>
         = <CopyTarget>local
target_host              <CopyTargetFragmentRef>
           = localhost
target_dir  <LocalTarget />
            </CopyTargetFragmentRef>
           = <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
b
check_security_hash                 = true
create_security_hash_file               <TargetFileOptions>
= true


[profile@local_2_local_check_md5]
operation              <Atomicity>
                <AtomicPrefix><![CDATA[~]]></AtomicPrefix>
= copy
source_protocol                <AtomicSuffix><![CDATA[~]]></AtomicSuffix>
     = local
source_host        </Atomicity>
            </TargetFileOptions>
     = localhost
file_spec    </CopyTarget>
        </Copy>
      </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