Changeset 2603
- Timestamp:
- 11/18/08 13:59:34 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plugins/converter/edu.iu.nwb.converter.nwbgraphml/src/edu/iu/nwb/converter/nwbgraphml/NWBToGraphMLbyStax.java
r2601 r2603 99 99 try { 100 100 xtw.writeEndElement(); 101 xtw.writeCharacters("\r\n");101 102 102 xtw.writeEndElement(); 103 103 } catch (Exception e) { … … 129 129 130 130 xtw.writeStartDocument("UTF-8","1.0"); 131 xtw.writeCharacters("\r\n");132 131 xtw.writeComment("This file is generated by XMLStreamWriter"); 133 xtw.writeCharacters("\r\n");134 132 xtw.writeStartElement("graphml"); 135 133 xtw.writeNamespace("", "http://graphml.graphdrawing.org/xmlns"); … … 139 137 "schemaLocation", 140 138 "http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"); 141 xtw.writeCharacters("\r\n");142 139 143 140 } … … 161 158 xtw.writeAttribute("attr.type", getGraphmlType(attr)); 162 159 xtw.writeEndElement(); 163 xtw.writeCharacters("\r\n");164 160 } 165 161 … … 181 177 xtw.writeAttribute("attr.type", getGraphmlType(attr)); 182 178 xtw.writeEndElement(); 183 xtw.writeCharacters("\r\n");184 179 185 180 } … … 204 199 xtw.writeAttribute("attr.type", attr.getDataType()); 205 200 xtw.writeEndElement(); 206 xtw.writeCharacters("\r\n");201 207 202 } 208 203 xtw.writeStartElement("graph"); 209 204 xtw.writeAttribute("edgedefault", "undirected"); 210 xtw.writeCharacters("\r\n");205 211 206 } 212 207 else if (validator.isDirectedGraph() && validator.isUndirectedGraph()){ … … 291 286 xtw.writeStartElement("node"); 292 287 xtw.writeAttribute("id", "n" + columns[0]); 293 xtw.writeCharacters("\r\n");288 294 289 295 290 for(int i = 1; i<nodeAttrList.size(); i++){ … … 312 307 xtw.writeCharacters(value); 313 308 xtw.writeEndElement(); 314 xtw.writeCharacters("\r\n");309 315 310 316 311 } else { … … 326 321 //write </node> 327 322 xtw.writeEndElement(); 328 xtw.writeCharacters("\r\n");323 329 324 330 325 } … … 363 358 xtw.writeAttribute("source", "n" + columns[sourceColumnNumber]); 364 359 xtw.writeAttribute("target", "n" + columns[targetColumnNumber]); 365 xtw.writeCharacters("\r\n");360 366 361 367 362 for(int i = 0; i<edgeAttrList.size(); i++){ … … 388 383 xtw.writeCharacters(value); 389 384 xtw.writeEndElement(); 390 xtw.writeCharacters("\r\n");385 391 386 } else { 392 387 /* … … 402 397 //write </edge> 403 398 xtw.writeEndElement(); 404 xtw.writeCharacters("\r\n");399 405 400 406 401 }else{ … … 412 407 xtw.writeAttribute("target", "n" + columns[targetColumnNumber]); 413 408 xtw.writeEndElement(); 414 xtw.writeCharacters("\r\n");409 415 410 416 411 } … … 425 420 xtw.writeAttribute("source", "n" + columns[sourceColumnNumber]); 426 421 xtw.writeAttribute("target", "n" + columns[targetColumnNumber]); 427 xtw.writeCharacters("\r\n");422 428 423 429 424 for(int i = 0; i<edgeAttrList.size(); i++){ … … 442 437 xtw.writeCharacters(columns[i]); 443 438 xtw.writeEndElement(); 444 xtw.writeCharacters("\r\n");439 445 440 446 441 } else { … … 468 463 xtw.writeAttribute("target", "n" + columns[targetColumnNumber]); 469 464 xtw.writeEndElement(); 470 xtw.writeCharacters("\r\n");471 472 465 } 473 466 }
