<commit_before>package test.ssh;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;

import nl.esciencecenter.ptk.Global;
import nl.esciencecenter.ptk.crypt.Secret;
import nl.nlesc.vlet.VletConfig;
import nl.nlesc.vlet.exception.VRLSyntaxException;
import nl.nlesc.vlet.exception.VlException;
import nl.nlesc.vlet.vfs.VFS;
import nl.nlesc.vlet.vfs.VFSClient;
import nl.nlesc.vlet.vfs.VFSNode;
import nl.nlesc.vlet.vrl.VRL;
import nl.nlesc.vlet.vrs.ServerInfo;
import nl.nlesc.vlet.vrs.VRSContext;

public class TestNoInteraction 
{
	public static void main(String args[])
	{
		try {
			testNoUI();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		
        VFS.exit(); 
	}
	
	public static void testNoUI() throws VlException
	{
	
		   try {
	            VletConfig.setBaseLocation(new URL("http://dummy/url"));
	        } catch (MalformedURLException ex)
	        {
	        	System.err.print("Exception"+ex); 
	        	
	        }
	        // runtime configuration
	        VletConfig.setHasUI(false);
	        VletConfig.setIsApplet(true);
	        VletConfig.setPassiveMode(true);
	        VletConfig.setIsService(true);
	        VletConfig.setInitURLStreamFactory(false);        
	        VletConfig.setAllowUserInteraction(false);
	        
	        // user configuration 
	        VletConfig.setUsePersistantUserConfiguration(false);
	        //  GlobalConfig.setUserHomeLocation(new URL("file:///tmp/myservice"));

	        Global.init();
	        
	        VRL vrl=new VRL("sftp://user@elab.lab.uvalight.net/tmp"); 
	        
	        VFSClient vfs=new VFSClient(); 
	        VRSContext context=vfs.getVRSContext(); 
	        
	        ServerInfo info = context.getServerInfoFor(vrl, true);
	        
	        info.setAttribute(ServerInfo.ATTR_DEFAULT_YES_NO_ANSWER,true);
	        info.setPassword(new Secret("***".toCharArray())); 
	        info.store(); 
	        
	        VFSNode node=vfs.openLocation(vrl);
	        System.out.println("node="+node);
	        
	}
}<commit_msg>package rename.<commit_after>package test.ssh;

import java.net.MalformedURLException;
import java.net.URL;

import nl.esciencecenter.ptk.Global;
import nl.esciencecenter.ptk.crypt.Secret;
import nl.nlesc.vlet.VletConfig;
import nl.nlesc.vlet.exception.VlException;
import nl.nlesc.vlet.vrl.VRL;
import nl.nlesc.vlet.vrs.ServerInfo;
import nl.nlesc.vlet.vrs.VRSContext;
import nl.nlesc.vlet.vrs.vfs.VFS;
import nl.nlesc.vlet.vrs.vfs.VFSClient;
import nl.nlesc.vlet.vrs.vfs.VFSNode;

public class TestNoInteraction
{
    public static void main(String args[])
    {
        try
        {
            testNoUI();
        }
        catch (Exception e)
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        VFS.exit();
    }

    public static void testNoUI() throws VlException
    {

        try
        {
            VletConfig.setBaseLocation(new URL("http://dummy/url"));
        }
        catch (MalformedURLException ex)
        {
            System.err.print("Exception" + ex);

        }
        // runtime configuration
        VletConfig.setHasUI(false);
        VletConfig.setIsApplet(true);
        VletConfig.setPassiveMode(true);
        VletConfig.setIsService(true);
        VletConfig.setInitURLStreamFactory(false);
        VletConfig.setAllowUserInteraction(false);

        // user configuration
        VletConfig.setUsePersistantUserConfiguration(false);
        // GlobalConfig.setUserHomeLocation(new URL("file:///tmp/myservice"));

        Global.init();

        VRL vrl = new VRL("sftp://user@elab.lab.uvalight.net/tmp");

        VFSClient vfs = new VFSClient();
        VRSContext context = vfs.getVRSContext();

        ServerInfo info = context.getServerInfoFor(vrl, true);

        info.setAttribute(ServerInfo.ATTR_DEFAULT_YES_NO_ANSWER, true);
        info.setPassword(new Secret("***".toCharArray()));
        info.store();

        VFSNode node = vfs.openLocation(vrl);
        System.out.println("node=" + node);

    }
}
{'fraction_non_alphanumeric': 0.11815068493150685, 'fraction_numerical': 0.0, 'mean_word_length': 2.5128865979381443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6746096', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1339, 'n_words': 194}