Changeset 6549
- Timestamp:
- 09/22/15 11:10:37 (9 years ago)
- 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 152 152 </profiles> 153 153 154 <!-- transform csv to xml on every compile -->154 <!-- transform csv to xml on every compile and add them to the classpath --> 155 155 <build> 156 <resources>157 <resource>158 <directory>${basedir}/maps/csv</directory>159 <targetPath>maps/csv</targetPath>160 </resource>161 </resources>162 156 <plugins> 163 157 <plugin> -
vlo/branches/vlo-3.3-oeaw/vlo-vocabularies/src/main/java/eu/clarin/cmdi/vlo/transformers/CSVTransformer.java
r6548 r6549 82 82 83 83 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 97 84 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"); 104 87 _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"); 106 89 107 90 csv2xml(input, output); … … 110 93 output.close(); 111 94 } 112 95 113 96 114 97 private String xml2csvTransformer(VariantsMap map) {
Note: See TracChangeset
for help on using the changeset viewer.