Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/importer/Hyperbase2Xml.groovy

Hyperbase2Xml.groovy (revision 479)
21 21
// 
22 22
// 
23 23
// 
24
// $LastChangedDate: 2016-12-16 17:28:35 +0100 (Fri, 16 Dec 2016) $
25
// $LastChangedRevision: 3377 $
24
// $LastChangedDate: 2017-06-26 16:53:47 +0200 (lun. 26 juin 2017) $
25
// $LastChangedRevision: 3451 $
26 26
// $LastChangedBy: mdecorde $ 
27 27
//
28 28
package org.txm.importer
......
80 80
		boolean firsttext=true;
81 81
		
82 82
		String line = reader.readLine();
83
		while(line != null)
84
		{
83
		while(line != null) {
85 84
			line = CleanFile.clean(line);
86
			if((line.startsWith("&&&"))) // text declaration &&& longtitle, title, shorttitle &&&
85
			if ((line.startsWith("&&&"))) // text declaration &&& longtitle, title, shorttitle &&&
87 86
			{
88
				if(partname != null) // close previous part
87
				if (partname != null) // close previous part
89 88
				{
90 89
					//println("close last part")
91 90
					writer.writeEndElement();
92 91
					partname= null;
93 92
				}
94
				if(textname != null) // close previous text
93
				if (textname != null) // close previous text
95 94
				{
96 95
					//println("close text "+textname)
97 96
					writer.writeEndElement();
......
99 98
					output.close();
100 99
				}
101 100
				textname = line.substring(3, line.length()-3);
102
				if(textname.contains(","))
101
				if (textname.contains(","))
103 102
				{
104 103
					String[] textnames = textname.split(",");
105 104
					if(textnames.length > 1)

Also available in: Unified diff