<commit_before>package de.zib.gndms.taskflows.staging.client.tools.tests;

/*
 * Copyright 2008-2011 Zuse Institute Berlin (ZIB)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */



import de.zib.gndms.taskflows.staging.client.model.ProviderStageInOrder;
import de.zib.gndms.taskflows.staging.client.tools.ProviderStageInOrderConverter;
import de.zib.gndms.taskflows.staging.client.tools.ProviderStageInOrderPropertyWriter;
import de.zib.gndms.taskflows.staging.client.tools.ProviderStageInOrderPropertyReader;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import java.io.InputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Properties;


/**
 * @author  <NAME> a zib
 * @version  $Id$
 * <p/>
 * User: mjorra, Date: 03.11.2008, Time: 12:31:56
 */
public class ProviderStageInFromFile {


    @Parameters( { "fileName" })
    @Test( groups={"io"} )
    public void testIt( String fileName ) throws Exception{

        try {
            System.out.println( "\nOrq input test: ");
            System.out.println( "----------------");
            InputStream is = new FileInputStream( fileName );
            Properties prop = new Properties( );
            prop.load( is );
            is.close( );
            ProviderStageInOrderPropertyReader reader = new ProviderStageInOrderPropertyReader( prop );
            reader.performReading( );
            ProviderStageInOrder order =  reader.getProduct();
            ProviderStageInORQIOTest.showORQ( order );
            System.out.println( "\nOrq output test: ");
            System.out.println( "-----------------");
            Properties np = new Properties( );
            ProviderStageInOrderPropertyWriter writer = new ProviderStageInOrderPropertyWriter( np );
            ProviderStageInOrderConverter conv = new ProviderStageInOrderConverter( writer, order );
            conv.convert();

            np.store( System.out, "some props" );
        } catch ( FileNotFoundException e ) {
            System.out.println( "File not found make!" );
            System.out.println( "Please make sure your working dir contains " + fileName );
        }

    }
}
<commit_msg>On renaming ORQ -> Order<commit_after>package de.zib.gndms.taskflows.staging.client.tools.tests;

/*
 * Copyright 2008-2011 Zuse Institute Berlin (ZIB)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


import de.zib.gndms.taskflows.staging.client.model.ProviderStageInOrder;
import de.zib.gndms.taskflows.staging.client.tools.ProviderStageInOrderConverter;
import de.zib.gndms.taskflows.staging.client.tools.ProviderStageInOrderPropertyReader;
import de.zib.gndms.taskflows.staging.client.tools.ProviderStageInOrderPropertyWriter;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Properties;


/**
 * @author  <NAME> rr a zib
 * @version  $Id$
 * <p/>
 * User: mjorra, Date: 03.11.2008, Time: 12:31:56
 */
public class ProviderStageInFromFile {
    
    @Parameters( { "fileName" })
    @Test( groups={"io"} )
    public void testIt( String fileName ) throws Exception{

        try {
            System.out.println( "\nOrder input test: ");
            System.out.println( "----------------");
            InputStream is = new FileInputStream( fileName );
            Properties prop = new Properties( );
            prop.load( is );
            is.close( );
            ProviderStageInOrderPropertyReader reader = new ProviderStageInOrderPropertyReader( prop );
            reader.performReading( );
            ProviderStageInOrder order =  reader.getProduct();
            ProviderStageInORQIOTest.showORQ( order );
            System.out.println( "\nOrq output test: ");
            System.out.println( "-----------------");
            Properties np = new Properties( );
            ProviderStageInOrderPropertyWriter writer = new ProviderStageInOrderPropertyWriter( np );
            ProviderStageInOrderConverter conv = new ProviderStageInOrderConverter( writer, order );
            conv.convert();

            np.store( System.out, "some props" );
        } catch ( FileNotFoundException e ) {
            System.out.println( "File not found make!" );
            System.out.println( "Please make sure your working dir contains " + fileName );
        }

    }
}

{'fraction_non_alphanumeric': 0.1104992657856094, 'fraction_numerical': 0.009544787077826725, 'mean_word_length': 2.90050107372942, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, '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': '6039497', 'n_tokens_mistral': 1525, 'n_tokens_neox': 1461, 'n_words': 412}