Changeset 6549


Ignore:
Timestamp:
09/22/15 11:10:37 (9 years ago)
Author:
davor.ostojic@oeaw.ac.at
Message:
 
Location:
vlo/branches/vlo-3.3-oeaw/vlo-vocabularies
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.3-oeaw/vlo-vocabularies/pom.xml

    r6547 r6549  
    152152        </profiles>
    153153       
    154         <!-- transform csv to xml on every compile -->
     154        <!-- transform csv to xml on every compile and add them to the classpath -->
    155155        <build>
    156                 <resources>
    157                         <resource>
    158                                 <directory>${basedir}/maps/csv</directory>
    159                                 <targetPath>maps/csv</targetPath>
    160                         </resource>                     
    161                 </resources>
    162156                <plugins>
    163157                        <plugin>
  • vlo/branches/vlo-3.3-oeaw/vlo-vocabularies/src/main/java/eu/clarin/cmdi/vlo/transformers/CSVTransformer.java

    r6548 r6549  
    8282       
    8383       
    84 //      public synchronized void csv2xml(String map) throws IOException, JAXBException{
    85 //              _logger.info("reading from file {}{}.csv.", Constants.CSV_PATH, map);
    86 //              InputStream input = new FileInputStream(Constants.CSV_PATH + map + ".csv");
    87 //              _logger.info("output will be saved into {}{}.xml.", Constants.MAPS_PATH, map);
    88 //          OutputStream output = new FileOutputStream(Constants.MAPS_PATH + map + ".xml");
    89 //         
    90 //          csv2xml(input, output);
    91 //         
    92 //              input.close();
    93 //              output.close();     
    94 //      }
    95        
    96        
    9784        public synchronized void csv2xml(String map) throws IOException, JAXBException{
    98                 _logger.info("Current directory: {}", System.getProperty("user.dir"));
    99                                
    100                 _logger.info("reading from file {}{}.csv.", Constants.CSV_PATH, map);           
    101                 InputStream input = CSVTransformer.class.getResourceAsStream("/" + Constants.CSV_PATH + map + ".csv");
    102                
    103                
     85                _logger.info("reading from file {}{}.csv.", Constants.CSV_PATH, map);
     86                InputStream input = new FileInputStream(Constants.CSV_PATH + map + ".csv");
    10487                _logger.info("output will be saved into {}{}.xml.", Constants.MAPS_PATH, map);
    105             OutputStream output = new FileOutputStream("/" + Constants.MAPS_PATH + map + ".xml");
     88            OutputStream output = new FileOutputStream(Constants.MAPS_PATH + map + ".xml");
    10689           
    10790            csv2xml(input, output);
     
    11093                output.close();     
    11194        }
    112            
     95                   
    11396 
    11497    private String xml2csvTransformer(VariantsMap map) {
Note: See TracChangeset for help on using the changeset viewer.