Changeset 6798


Ignore:
Timestamp:
11/12/15 09:22:13 (9 years ago)
Author:
davor.ostojic@oeaw.ac.at
Message:

reverted to original from trunk since we dont have to change paths for contolled vocabularies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.3-oeaw/vlo-importer/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java

    r6793 r6798  
    11package eu.clarin.cmdi.vlo.importer;
    2 
    3 import java.io.File;
    4 import java.io.IOException;
    5 import java.net.URISyntaxException;
    6 import java.net.URL;
    7 import java.util.ArrayList;
    8 import java.util.Collection;
    9 import java.util.Enumeration;
    10 import java.util.regex.Pattern;
    11 import java.util.zip.ZipEntry;
    12 import java.util.zip.ZipException;
    13 import java.util.zip.ZipFile;
    14 
    15 import org.apache.commons.io.FileUtils;
    16 import org.junit.After;
    17 import org.junit.Before;
    18 import org.junit.Rule;
    19 import org.junit.Test;
    20 import org.junit.rules.TemporaryFolder;
    212
    223import eu.clarin.cmdi.vlo.LanguageCodeUtils;
     
    245import eu.clarin.cmdi.vlo.config.VloConfig;
    256import eu.clarin.cmdi.vlo.config.VloConfigFactory;
     7import java.io.File;
     8import java.io.IOException;
     9import java.net.URISyntaxException;
     10import org.apache.commons.io.FileUtils;
     11import org.junit.After;
     12import org.junit.Before;
     13import org.junit.Rule;
     14import org.junit.rules.TemporaryFolder;
    2615
    2716public abstract class ImporterTestcase {
     
    2918    private final VloConfigFactory configFactory = new DefaultVloConfigFactory();
    3019    protected VloConfig config;
    31    
    32     private static int cnt = 0;
    3320
    3421    @Rule
     
    3623
    3724    protected File createCmdiFile(String name, String content) throws IOException {
    38         File file = tempFolder.newFile(name + cnt++ + ".cmdi");
     25        File file = tempFolder.newFile(name + System.currentTimeMillis() + ".cmdi");
    3926        FileUtils.writeStringToFile(file, content, "UTF-8");
    4027        return file;
     
    5239
    5340        // optionally, modify the configuration here
    54 
    5541        MetadataImporter.config.setComponentRegistryRESTURL("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/");
    56         //point to transformed maps
    57         MetadataImporter.config.setLicenseAvailabilityMapUrl(MetadataImporter.config.getLicenseAvailabilityMapUrl());
    58         MetadataImporter.config.setLanguageNameVariantsUrl(MetadataImporter.config.getLanguageNameVariantsUrl());
    59         MetadataImporter. config.setNationalProjectMapping(MetadataImporter.config.getNationalProjectMapping());
    60         MetadataImporter.config.setOrganisationNamesUrl(MetadataImporter.config.getOrganisationNamesUrl());
    61         MetadataImporter.config.setResourceClassMapUrl(MetadataImporter.config.getResourceClassMapUrl());
    62        
    6342        config = MetadataImporter.config;
    6443
    6544        MetadataImporter.languageCodeUtils = new LanguageCodeUtils(config);
    66        
    67      
    6845    }
    6946
     
    7552        }
    7653    }
    77    
    78    
    79    
     54
    8055}
Note: See TracChangeset for help on using the changeset viewer.