FileSourceGEXF.java

1
/*
2
 * Copyright 2006 - 2013
3
 *     Stefan Balev     <stefan.balev@graphstream-project.org>
4
 *     Julien Baudry    <julien.baudry@graphstream-project.org>
5
 *     Antoine Dutot    <antoine.dutot@graphstream-project.org>
6
 *     Yoann Pign��      <yoann.pigne@graphstream-project.org>
7
 *     Guilhelm Savin   <guilhelm.savin@graphstream-project.org>
8
 * 
9
 * This file is part of GraphStream <http://graphstream-project.org>.
10
 * 
11
 * GraphStream is a library whose purpose is to handle static or dynamic
12
 * graph, create them from scratch, file or any source and display them.
13
 * 
14
 * This program is free software distributed under the terms of two licenses, the
15
 * CeCILL-C license that fits European law, and the GNU Lesser General Public
16
 * License. You can  use, modify and/ or redistribute the software under the terms
17
 * of the CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
18
 * URL <http://www.cecill.info> or under the terms of the GNU LGPL as published by
19
 * the Free Software Foundation, either version 3 of the License, or (at your
20
 * option) any later version.
21
 * 
22
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
23
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
24
 * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
25
 * 
26
 * You should have received a copy of the GNU Lesser General Public License
27
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
28
 * 
29
 * The fact that you are presently reading this means that you have had
30
 * knowledge of the CeCILL-C and LGPL licenses and that you accept their terms.
31
 */
32
package org.graphstream.stream.file;
33
34
import java.awt.Color;
35
import java.io.IOException;
36
import java.net.URI;
37
import java.net.URISyntaxException;
38
import java.util.EnumMap;
39
import java.util.HashMap;
40
import java.util.HashSet;
41
42
import javax.xml.stream.XMLStreamException;
43
import javax.xml.stream.events.XMLEvent;
44
45
/**
46
 * File source for the <a href="http://gexf.net/format/">GEXF</a> file format
47
 * used by <a href="http://www.gephi.org">Gephi</a>.
48
 * 
49
 * @author Guilhelm Savin
50
 * 
51
 */
52
public class FileSourceGEXF extends FileSourceXML {
53
54
	/**
55
	 * The GEXF parser.
56
	 */
57
	protected GEXFParser parser;
58
59
	/*
60
	 * (non-Javadoc)
61
	 * 
62
	 * @see org.graphstream.stream.file.FileSourceXML#afterStartDocument()
63
	 */
64
	protected void afterStartDocument() throws IOException, XMLStreamException {
65
		parser = new GEXFParser();
66 1 1. afterStartDocument : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::access$5 → NO_COVERAGE
		parser.__gexf();
67
	}
68
69
	/*
70
	 * (non-Javadoc)
71
	 * 
72
	 * @see org.graphstream.stream.file.FileSourceXML#nextEvents()
73
	 */
74
	public boolean nextEvents() throws IOException {
75 1 1. nextEvents : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
		return false;
76
	}
77
78
	/*
79
	 * (non-Javadoc)
80
	 * 
81
	 * @see org.graphstream.stream.file.FileSourceXML#beforeEndDocument()
82
	 */
83
	protected void beforeEndDocument() {
84
		parser = null;
85
	}
86
87
	@SuppressWarnings("unused")
88
	private class Attribute implements GEXFConstants {
89
		final String id;
90
		final String title;
91
		final AttributeType type;
92
		Object def;
93
		String options;
94
95
		Attribute(String id, String title, AttributeType type) {
96
			this.id = id;
97
			this.title = title;
98
			this.type = type;
99
		}
100
101
		Object getValue(String value) {
102
			Object r;
103
104
			switch (type) {
105
			case INTEGER:
106
				r = Integer.valueOf(value);
107
				break;
108
			case LONG:
109
				r = Long.valueOf(value);
110
				break;
111
			case FLOAT:
112
				r = Float.valueOf(value);
113
				break;
114
			case DOUBLE:
115
				r = Double.valueOf(value);
116
				break;
117
			case BOOLEAN:
118
				r = Boolean.valueOf(value);
119
				break;
120
			case LISTSTRING:
121
				r = value.split(",");
122
				break;
123
			case ANYURI:
124
				try {
125
					r = new URI(value);
126
				} catch (URISyntaxException e) {
127
					throw new IllegalArgumentException(e);
128
				}
129
				break;
130
			default:
131
				r = value;
132
			}
133
134 1 1. getValue : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$Attribute::getValue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return r;
135
		}
136
137
		void setDefault(String value) {
138
			this.def = getValue(value);
139
		}
140
141
		void setOptions(String options) {
142
			this.options = options;
143
		}
144
	}
145
146
	private class GEXFParser extends Parser implements GEXFConstants {
147
		EdgeType defaultEdgeType;
148
		TimeFormatType timeFormat;
149
		HashMap<String, Attribute> nodeAttributesDefinition;
150
		HashMap<String, Attribute> edgeAttributesDefinition;
151
152
		GEXFParser() {
153
			defaultEdgeType = EdgeType.UNDIRECTED;
154
			timeFormat = TimeFormatType.INTEGER;
155
			nodeAttributesDefinition = new HashMap<String, Attribute>();
156
			edgeAttributesDefinition = new HashMap<String, Attribute>();
157
		}
158
159
		@SuppressWarnings("unused")
160
		private long getTime(String time) {
161
			long t = 0;
162
163
			switch (timeFormat) {
164
			case INTEGER:
165
				t = Integer.valueOf(time);
166
				break;
167
			case DOUBLE:
168
				// TODO
169
				break;
170
			case DATE:
171
				// TODO
172
				break;
173
			case DATETIME:
174
				// TODO
175
				break;
176
			}
177
178 1 1. getTime : replaced return of long value with value + 1 for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::getTime → NO_COVERAGE
			return t;
179
		}
180
181
		/**
182
		 * name : GEXF attributes : GEXFAttribute structure : META ? GRAPH
183
		 */
184
		private void __gexf() throws IOException, XMLStreamException {
185
			XMLEvent e;
186
187
			e = getNextEvent();
188 1 1. __gexf : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "gexf");
189
190
			e = getNextEvent();
191
192 1 1. __gexf : negated conditional → NO_COVERAGE
			if (isEvent(e, XMLEvent.START_ELEMENT, "meta")) {
193 1 1. __gexf : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
194 1 1. __gexf : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__meta → NO_COVERAGE
				__meta();
195
			} else
196 1 1. __gexf : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
197
198 1 1. __gexf : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__graph → NO_COVERAGE
			__graph();
199
200
			e = getNextEvent();
201 1 1. __gexf : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "gexf");
202
		}
203
204
		/**
205
		 * name : META attributes : METAttribute structure : ( CREATOR |
206
		 * KEYWORDS | DESCRIPTION )*
207
		 */
208
		private void __meta() throws IOException, XMLStreamException {
209
			EnumMap<METAAttribute, String> attributes;
210
			XMLEvent e;
211
212
			e = getNextEvent();
213 1 1. __meta : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "meta");
214
215
			attributes = getAttributes(METAAttribute.class, e.asStartElement());
216
217 1 1. __meta : negated conditional → NO_COVERAGE
			if (attributes.containsKey(METAAttribute.LASTMODIFIEDDATE))
218 1 1. __meta : removed call to org/graphstream/stream/file/FileSourceGEXF::sendGraphAttributeAdded → NO_COVERAGE
				sendGraphAttributeAdded(sourceId, "lastmodifieddate",
219
						attributes.get(METAAttribute.LASTMODIFIEDDATE));
220
221
			e = getNextEvent();
222
223 1 1. __meta : negated conditional → NO_COVERAGE
			while (!isEvent(e, XMLEvent.END_ELEMENT, "meta")) {
224
				try {
225
					String str;
226
					Balise b = Balise.valueOf(toConstantName(e.asStartElement()
227
							.getName().getLocalPart()));
228
229 1 1. __meta : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
					pushback(e);
230
231
					switch (b) {
232
					case CREATOR:
233
						str = __creator();
234 1 1. __meta : removed call to org/graphstream/stream/file/FileSourceGEXF::sendGraphAttributeAdded → NO_COVERAGE
						sendGraphAttributeAdded(sourceId, "creator", str);
235
						break;
236
					case KEYWORDS:
237
						str = __keywords();
238 1 1. __meta : removed call to org/graphstream/stream/file/FileSourceGEXF::sendGraphAttributeAdded → NO_COVERAGE
						sendGraphAttributeAdded(sourceId, "keywords", str);
239
						break;
240
					case DESCRIPTION:
241
						str = __description();
242 1 1. __meta : removed call to org/graphstream/stream/file/FileSourceGEXF::sendGraphAttributeAdded → NO_COVERAGE
						sendGraphAttributeAdded(sourceId, "description", str);
243
						break;
244
					default:
245
						throw newParseError(e,
246
								"meta children should be one of 'creator','keywords' or 'description'");
247
					}
248
				} catch (IllegalArgumentException ex) {
249
					throw newParseError(e, "unknown element '%s'", e
250
							.asStartElement().getName().getLocalPart());
251
				}
252
253
				e = getNextEvent();
254
			}
255
256 1 1. __meta : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "meta");
257
		}
258
259
		/**
260
		 * name : CREATOR attributes : structure : string
261
		 */
262
		private String __creator() throws IOException, XMLStreamException {
263
			String creator;
264
			XMLEvent e;
265
266
			e = getNextEvent();
267 1 1. __creator : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "creator");
268
269
			creator = __characters();
270
271
			e = getNextEvent();
272 1 1. __creator : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "creator");
273
274 1 1. __creator : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__creator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return creator;
275
		}
276
277
		/**
278
		 * name : KEYWORDS attributes : structure : string
279
		 */
280
		private String __keywords() throws IOException, XMLStreamException {
281
			String keywords;
282
			XMLEvent e;
283
284
			e = getNextEvent();
285 1 1. __keywords : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "keywords");
286
287
			keywords = __characters();
288
289
			e = getNextEvent();
290 1 1. __keywords : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "keywords");
291
292 1 1. __keywords : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__keywords to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return keywords;
293
		}
294
295
		/**
296
		 * <pre>
297
		 * name 		: DESCRIPTION
298
		 * attributes 	:
299
		 * structure 	: string
300
		 * </pre>
301
		 */
302
		private String __description() throws IOException, XMLStreamException {
303
			String description;
304
			XMLEvent e;
305
306
			e = getNextEvent();
307 1 1. __description : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "description");
308
309
			description = __characters();
310
311
			e = getNextEvent();
312 1 1. __description : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "description");
313
314 1 1. __description : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__description to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return description;
315
		}
316
317
		/**
318
		 * <pre>
319
		 * name 		: GRAPH
320
		 * attributes 	: GRAPHAttribute
321
		 * structure 	: ATTRIBUTES * ( NODES | EDGES )*
322
		 * </pre>
323
		 */
324
		private void __graph() throws IOException, XMLStreamException {
325
			XMLEvent e;
326
			EnumMap<GRAPHAttribute, String> attributes;
327
328
			e = getNextEvent();
329 1 1. __graph : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "graph");
330
331
			attributes = getAttributes(GRAPHAttribute.class, e.asStartElement());
332
333 1 1. __graph : negated conditional → NO_COVERAGE
			if (attributes.containsKey(GRAPHAttribute.DEFAULTEDGETYPE)) {
334
				try {
335
					defaultEdgeType = EdgeType
336
							.valueOf(toConstantName(attributes
337
									.get(GRAPHAttribute.DEFAULTEDGETYPE)));
338
				} catch (IllegalArgumentException ex) {
339
					throw newParseError(e,
340
							"'defaultedgetype' value should be one of 'directed', 'undirected' or 'mutual'");
341
				}
342
			}
343
344 1 1. __graph : negated conditional → NO_COVERAGE
			if (attributes.containsKey(GRAPHAttribute.TIMEFORMAT)) {
345
				try {
346
					timeFormat = TimeFormatType
347
							.valueOf(toConstantName(attributes
348
									.get(GRAPHAttribute.TIMEFORMAT)));
349
				} catch (IllegalArgumentException ex) {
350
					throw newParseError(e,
351
							"'timeformat' value should be one of 'integer', 'double', 'date' or 'datetime'");
352
				}
353
			}
354
355
			e = getNextEvent();
356
357 1 1. __graph : negated conditional → NO_COVERAGE
			while (isEvent(e, XMLEvent.START_ELEMENT, "attributes")) {
358 1 1. __graph : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
359
360 1 1. __graph : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__attributes → NO_COVERAGE
				__attributes();
361
				e = getNextEvent();
362
			}
363
364 1 1. __graph : negated conditional → NO_COVERAGE
			while (isEvent(e, XMLEvent.START_ELEMENT, "nodes")
365 1 1. __graph : negated conditional → NO_COVERAGE
					|| isEvent(e, XMLEvent.START_ELEMENT, "edges")) {
366 1 1. __graph : negated conditional → NO_COVERAGE
				if (isEvent(e, XMLEvent.START_ELEMENT, "nodes")) {
367 1 1. __graph : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
					pushback(e);
368 1 1. __graph : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__nodes → NO_COVERAGE
					__nodes();
369
				} else {
370 1 1. __graph : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
					pushback(e);
371 1 1. __graph : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__edges → NO_COVERAGE
					__edges();
372
				}
373
374
				e = getNextEvent();
375
			}
376
377 1 1. __graph : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "graph");
378
		}
379
380
		/**
381
		 * <pre>
382
		 * name 		: ATTRIBUTES
383
		 * attributes 	: ATTRIBUTESAttributes { CLASS!, MODE, START, STARTOPEN, END, ENDOPEN }
384
		 * structure 	: ATTRIBUTE *
385
		 * </pre>
386
		 */
387
		private void __attributes() throws IOException, XMLStreamException {
388
			XMLEvent e;
389
			EnumMap<ATTRIBUTESAttribute, String> attributes;
390
			Attribute a;
391
			ClassType type;
392
			HashMap<String, Attribute> attr;
393
394
			e = getNextEvent();
395 1 1. __attributes : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "attributes");
396
397
			attributes = getAttributes(ATTRIBUTESAttribute.class,
398
					e.asStartElement());
399
400 1 1. __attributes : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, ATTRIBUTESAttribute.CLASS);
401
402
			try {
403
				type = ClassType.valueOf(toConstantName(attributes
404
						.get(ATTRIBUTESAttribute.CLASS)));
405
			} catch (IllegalArgumentException ex) {
406
				throw newParseError(e,
407
						"'class' value shoudl be one of 'node' or 'edge'");
408
			}
409
410 1 1. __attributes : negated conditional → NO_COVERAGE
			if (type == ClassType.NODE)
411
				attr = nodeAttributesDefinition;
412
			else
413
				attr = edgeAttributesDefinition;
414
415
			e = getNextEvent();
416
417 1 1. __attributes : negated conditional → NO_COVERAGE
			while (isEvent(e, XMLEvent.START_ELEMENT, "attribute")) {
418 1 1. __attributes : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
419
420
				a = __attribute();
421
				attr.put(a.id, a);
422
				e = getNextEvent();
423
			}
424
425 1 1. __attributes : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "attributes");
426
		}
427
428
		/**
429
		 * <pre>
430
		 * name 		: ATTRIBUTE
431
		 * attributes 	: ATTRIBUTEAttribute { ID, TITLE, TYPE }
432
		 * structure 	: ( DEFAULT | OPTIONS ) *
433
		 * </pre>
434
		 */
435
		private Attribute __attribute() throws IOException, XMLStreamException {
436
			XMLEvent e;
437
			EnumMap<ATTRIBUTEAttribute, String> attributes;
438
			String id, title;
439
			AttributeType type;
440
			Attribute theAttribute;
441
442
			e = getNextEvent();
443 1 1. __attribute : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "attribute");
444
445
			attributes = getAttributes(ATTRIBUTEAttribute.class,
446
					e.asStartElement());
447
448 1 1. __attribute : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, ATTRIBUTEAttribute.ID,
449
					ATTRIBUTEAttribute.TITLE, ATTRIBUTEAttribute.TYPE);
450
451
			id = attributes.get(ATTRIBUTEAttribute.ID);
452
			title = attributes.get(ATTRIBUTEAttribute.TITLE);
453
454
			try {
455
				type = AttributeType.valueOf(toConstantName(attributes
456
						.get(ATTRIBUTEAttribute.TYPE)));
457
			} catch (IllegalArgumentException ex) {
458
				throw newParseError(
459
						e,
460
						"'type' of attribute should be one of 'integer', 'long', 'float, 'double', 'string', 'liststring', 'anyURI' or 'boolean'");
461
			}
462
463
			theAttribute = new Attribute(id, title, type);
464
465
			e = getNextEvent();
466
467 1 1. __attribute : negated conditional → NO_COVERAGE
			while (!isEvent(e, XMLEvent.END_ELEMENT, "attribute")) {
468
				try {
469
					Balise b = Balise.valueOf(toConstantName(e.asStartElement()
470
							.getName().getLocalPart()));
471
472 1 1. __attribute : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
					pushback(e);
473
474
					switch (b) {
475
					case DEFAULT:
476
						try {
477 1 1. __attribute : removed call to org/graphstream/stream/file/FileSourceGEXF$Attribute::setDefault → NO_COVERAGE
							theAttribute.setDefault(__default());
478
						} catch (Exception invalid) {
479
							throw newParseError(e, "invalid 'default' value");
480
						}
481
482
						break;
483
					case OPTIONS:
484 1 1. __attribute : removed call to org/graphstream/stream/file/FileSourceGEXF$Attribute::setOptions → NO_COVERAGE
						theAttribute.setOptions(__options());
485
						break;
486
					default:
487
						throw newParseError(e,
488
								"attribute children should be one of 'default' or 'options'");
489
					}
490
				} catch (IllegalArgumentException ex) {
491
					throw newParseError(e, "unknown element '%s'", e
492
							.asStartElement().getName().getLocalPart());
493
				}
494
495
				e = getNextEvent();
496
			}
497
498 1 1. __attribute : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "attribute");
499
500 1 1. __attribute : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__attribute to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return theAttribute;
501
		}
502
503
		/**
504
		 * <pre>
505
		 * name 		: DEFAULT
506
		 * attributes 	: 
507
		 * structure 	: string
508
		 * </pre>
509
		 */
510
		private String __default() throws IOException, XMLStreamException {
511
			String def;
512
			XMLEvent e;
513
514
			e = getNextEvent();
515 1 1. __default : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "default");
516
517
			def = __characters();
518
519
			e = getNextEvent();
520 1 1. __default : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "default");
521
522 1 1. __default : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__default to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return def;
523
		}
524
525
		/**
526
		 * <pre>
527
		 * name 		: OPTIONS
528
		 * attributes 	:
529
		 * structure 	: string
530
		 * </pre>
531
		 */
532
		private String __options() throws IOException, XMLStreamException {
533
			String options;
534
			XMLEvent e;
535
536
			e = getNextEvent();
537 1 1. __options : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "options");
538
539
			options = __characters();
540
541
			e = getNextEvent();
542 1 1. __options : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "options");
543
544 1 1. __options : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__options to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return options;
545
		}
546
547
		/**
548
		 * <pre>
549
		 * name 		: NODES
550
		 * attributes 	: NODESAttribute { 'count' }
551
		 * structure 	: NODE *
552
		 * </pre>
553
		 */
554
		private void __nodes() throws IOException, XMLStreamException {
555
			XMLEvent e;
556
557
			e = getNextEvent();
558 1 1. __nodes : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "nodes");
559
560
			e = getNextEvent();
561
562 1 1. __nodes : negated conditional → NO_COVERAGE
			while (isEvent(e, XMLEvent.START_ELEMENT, "node")) {
563 1 1. __nodes : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
564
565 1 1. __nodes : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__node → NO_COVERAGE
				__node();
566
				e = getNextEvent();
567
			}
568
569 1 1. __nodes : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "nodes");
570
571
		}
572
573
		/**
574
		 * <pre>
575
		 * name 		: NODE
576
		 * attributes 	: NODEAttribute { 'pid', 'id', 'label', 'start', 'startopen', 'end', 'endopen' }
577
		 * structure 	: ( ATTVALUES | SPELLS | ( NODES | EDGES ) | PARENTS | ( COLOR | POSITION | SIZE | NODESHAPE ) ) *
578
		 * </pre>
579
		 */
580
		private void __node() throws IOException, XMLStreamException {
581
			XMLEvent e;
582
			EnumMap<NODEAttribute, String> attributes;
583
			String id;
584
			HashSet<String> defined = new HashSet<String>();
585
586
			e = getNextEvent();
587 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "node");
588
589
			attributes = getAttributes(NODEAttribute.class, e.asStartElement());
590
591 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, NODEAttribute.ID);
592
593
			id = attributes.get(NODEAttribute.ID);
594 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAdded → NO_COVERAGE
			sendNodeAdded(sourceId, id);
595
596 1 1. __node : negated conditional → NO_COVERAGE
			if (attributes.containsKey(NODEAttribute.LABEL))
597 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
				sendNodeAttributeAdded(sourceId, id, "label",
598
						attributes.get(NODEAttribute.LABEL));
599
600
			e = getNextEvent();
601
602 1 1. __node : negated conditional → NO_COVERAGE
			while (!isEvent(e, XMLEvent.END_ELEMENT, "node")) {
603
				try {
604
					Balise b = Balise.valueOf(toConstantName(e.asStartElement()
605
							.getName().getLocalPart()));
606
607 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
					pushback(e);
608
609
					switch (b) {
610
					case ATTVALUES:
611
						defined.addAll(__attvalues(ClassType.NODE, id));
612
						break;
613
					case COLOR:
614 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__color → NO_COVERAGE
						__color(ClassType.NODE, id);
615
						break;
616
					case POSITION:
617 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__position → NO_COVERAGE
						__position(id);
618
						break;
619
					case SIZE:
620 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__size → NO_COVERAGE
						__size(id);
621
						break;
622
					case SHAPE:
623 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__node_shape → NO_COVERAGE
						__node_shape(id);
624
						break;
625
					case SPELLS:
626 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE
						__spells();
627
						break;
628
					case NODES:
629 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__nodes → NO_COVERAGE
						__nodes();
630
						break;
631
					case EDGES:
632 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__edges → NO_COVERAGE
						__edges();
633
						break;
634
					case PARENTS:
635 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__parents → NO_COVERAGE
						__parents(id);
636
						break;
637
					default:
638
						throw newParseError(
639
								e,
640
								"attribute children should be one of 'attvalues', 'color', 'position', 'size', shape', 'spells', 'nodes, 'edges' or 'parents'");
641
					}
642
				} catch (IllegalArgumentException ex) {
643
					throw newParseError(e, "unknown element '%s'", e
644
							.asStartElement().getName().getLocalPart());
645
				}
646
647
				e = getNextEvent();
648
			}
649
650 1 1. __node : negated conditional → NO_COVERAGE
			for (Attribute theAttribute : nodeAttributesDefinition.values()) {
651 1 1. __node : negated conditional → NO_COVERAGE
				if (!defined.contains(theAttribute.id)) {
652 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
					sendNodeAttributeAdded(sourceId, id, theAttribute.title,
653
							theAttribute.def);
654
				}
655
			}
656
657 1 1. __node : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "node");
658
		}
659
660
		/**
661
		 * <pre>
662
		 * name 		: ATTVALUES
663
		 * attributes 	:
664
		 * structure 	: ATTVALUE *
665
		 * </spell>
666
		 */
667
		private HashSet<String> __attvalues(ClassType type, String elementId)
668
				throws IOException, XMLStreamException {
669
			XMLEvent e;
670
			HashSet<String> defined = new HashSet<String>();
671
672
			e = getNextEvent();
673 1 1. __attvalues : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "attvalues");
674
675
			e = getNextEvent();
676
677 1 1. __attvalues : negated conditional → NO_COVERAGE
			while (isEvent(e, XMLEvent.START_ELEMENT, "attvalue")) {
678 1 1. __attvalues : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
679
680
				defined.add(__attvalue(type, elementId));
681
				e = getNextEvent();
682
			}
683
684 1 1. __attvalues : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "attvalues");
685
686 1 1. __attvalues : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__attvalues to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return defined;
687
		}
688
689
		/**
690
		 * <pre>
691
		 * name 		: ATTVALUE
692
		 * attributes 	: ATTVALUEAttribute { FOR!, VALUE!, START, STARTOPEN, END, ENDOPEN }
693
		 * structure 	:
694
		 * </pre>
695
		 */
696
		private String __attvalue(ClassType type, String elementId)
697
				throws IOException, XMLStreamException {
698
			XMLEvent e;
699
			EnumMap<ATTVALUEAttribute, String> attributes;
700
			Attribute theAttribute;
701
			Object value;
702
703
			e = getNextEvent();
704 1 1. __attvalue : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "attvalue");
705
706
			attributes = getAttributes(ATTVALUEAttribute.class,
707
					e.asStartElement());
708
709 1 1. __attvalue : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, ATTVALUEAttribute.FOR,
710
					ATTVALUEAttribute.VALUE);
711
712 1 1. __attvalue : negated conditional → NO_COVERAGE
			if (type == ClassType.NODE)
713
				theAttribute = nodeAttributesDefinition.get(attributes
714
						.get(ATTVALUEAttribute.FOR));
715
			else
716
				theAttribute = edgeAttributesDefinition.get(attributes
717
						.get(ATTVALUEAttribute.FOR));
718
719 1 1. __attvalue : negated conditional → NO_COVERAGE
			if (theAttribute == null)
720
				throw newParseError(e, "undefined attribute \"%s\"",
721
						attributes.get(ATTVALUEAttribute.FOR));
722
723
			try {
724
				value = theAttribute.getValue(attributes
725
						.get(ATTVALUEAttribute.VALUE));
726
			} catch (Exception ex) {
727
				throw newParseError(e, "invalid 'value' value");
728
			}
729
730
			switch (type) {
731
			case NODE:
732 1 1. __attvalue : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
				sendNodeAttributeAdded(sourceId, elementId, theAttribute.title,
733
						value);
734
				break;
735
			case EDGE:
736 1 1. __attvalue : removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE
				sendEdgeAttributeAdded(sourceId, elementId, theAttribute.title,
737
						value);
738
				break;
739
			}
740
741
			e = getNextEvent();
742 1 1. __attvalue : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "attvalue");
743
744 1 1. __attvalue : mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__attvalue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
			return theAttribute.id;
745
		}
746
747
		/**
748
		 * <pre>
749
		 * name 		: SPELLS
750
		 * attributes 	: 
751
		 * structure 	: SPELL +
752
		 * </pre>
753
		 */
754
		private void __spells() throws IOException, XMLStreamException {
755
			XMLEvent e;
756
757
			e = getNextEvent();
758 1 1. __spells : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "spells");
759
760
			do {
761 1 1. __spells : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spell → NO_COVERAGE
				__spell();
762
				e = getNextEvent();
763 1 1. __spells : negated conditional → NO_COVERAGE
			} while (isEvent(e, XMLEvent.START_ELEMENT, "spell"));
764
765 1 1. __spells : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "spells");
766
		}
767
768
		/**
769
		 * <pre>
770
		 * name 		: SPELL
771
		 * attributes 	: SPELLAttribute
772
		 * structure 	:
773
		 * </pre>
774
		 */
775
		@SuppressWarnings("unused")
776
		private void __spell() throws IOException, XMLStreamException {
777
			XMLEvent e;
778
			EnumMap<SPELLAttribute, String> attributes;
779
780
			e = getNextEvent();
781 1 1. __spell : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "spell");
782
783
			attributes = getAttributes(SPELLAttribute.class, e.asStartElement());
784
785
			// TODO Handle spell
786
787
			e = getNextEvent();
788 1 1. __spell : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "spell");
789
		}
790
791
		/**
792
		 * <pre>
793
		 * name 		: PARENTS
794
		 * attributes 	: 
795
		 * structure 	: PARENT *
796
		 * </pre>
797
		 */
798
		private void __parents(String nodeId) throws IOException,
799
				XMLStreamException {
800
			XMLEvent e;
801
802
			e = getNextEvent();
803 1 1. __parents : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "parents");
804
805
			e = getNextEvent();
806
807 1 1. __parents : negated conditional → NO_COVERAGE
			while (isEvent(e, XMLEvent.START_ELEMENT, "parent")) {
808 1 1. __parents : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__parent → NO_COVERAGE
				__parent(nodeId);
809
				e = getNextEvent();
810
			}
811
812 1 1. __parents : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "parents");
813
		}
814
815
		/**
816
		 * <pre>
817
		 * name 		: PARENT
818
		 * attributes 	: PARENTAttribute { FOR! }
819
		 * structure 	:
820
		 * </pre>
821
		 */
822
		private void __parent(String nodeId) throws IOException,
823
				XMLStreamException {
824
			XMLEvent e;
825
			EnumMap<PARENTAttribute, String> attributes;
826
827
			e = getNextEvent();
828 1 1. __parent : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "parent");
829
830
			attributes = getAttributes(PARENTAttribute.class,
831
					e.asStartElement());
832
833 1 1. __parent : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, PARENTAttribute.FOR);
834 1 1. __parent : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
			sendNodeAttributeAdded(sourceId,
835
					attributes.get(PARENTAttribute.FOR), "parent", nodeId);
836
837
			e = getNextEvent();
838 1 1. __parent : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "parent");
839
		}
840
841
		/**
842
		 * <pre>
843
		 * name 		: COLOR
844
		 * attributes 	: COLORAttribute { R!, G!, B!, A, START, STARTOPEN, END, ENDOPEN }
845
		 * structure 	: SPELLS ?
846
		 * </pre>
847
		 */
848
		private void __color(ClassType type, String id) throws IOException,
849
				XMLStreamException {
850
			XMLEvent e;
851
			EnumMap<COLORAttribute, String> attributes;
852
			Color color;
853
			int r, g, b, a = 255;
854
855
			e = getNextEvent();
856 1 1. __color : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "color");
857
858
			attributes = getAttributes(COLORAttribute.class, e.asStartElement());
859
860 1 1. __color : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, COLORAttribute.R,
861
					COLORAttribute.G, COLORAttribute.B);
862
863
			r = Integer.valueOf(attributes.get(COLORAttribute.R));
864
			g = Integer.valueOf(attributes.get(COLORAttribute.G));
865
			b = Integer.valueOf(attributes.get(COLORAttribute.B));
866
867 1 1. __color : negated conditional → NO_COVERAGE
			if (attributes.containsKey(COLORAttribute.A))
868
				a = Integer.valueOf(attributes.get(COLORAttribute.A));
869
870
			color = new Color(r, g, b, a);
871
872
			switch (type) {
873
			case NODE:
874 1 1. __color : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
				sendNodeAttributeAdded(sourceId, id, "ui.color", color);
875
				break;
876
			case EDGE:
877 1 1. __color : removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE
				sendEdgeAttributeAdded(sourceId, id, "ui.color", color);
878
				break;
879
			}
880
881
			e = getNextEvent();
882
883 1 1. __color : negated conditional → NO_COVERAGE
			if (isEvent(e, XMLEvent.START_ELEMENT, "spells")) {
884 1 1. __color : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
885
886 1 1. __color : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE
				__spells();
887
				e = getNextEvent();
888
			}
889
890 1 1. __color : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "color");
891
		}
892
893
		/**
894
		 * <pre>
895
		 * name 		: POSITION
896
		 * attributes 	: POSITIONAttribute { X!, Y!, Z!, START, STARTOPEN, END, ENDOPEN }
897
		 * structure 	: SPELLS ?
898
		 * </pre>
899
		 */
900
		private void __position(String nodeId) throws IOException,
901
				XMLStreamException {
902
			XMLEvent e;
903
			EnumMap<POSITIONAttribute, String> attributes;
904
			double[] xyz = { 0, 0, 0 };
905
906
			e = getNextEvent();
907 1 1. __position : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "position");
908
909
			attributes = getAttributes(POSITIONAttribute.class,
910
					e.asStartElement());
911
912 1 1. __position : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, POSITIONAttribute.X,
913
					POSITIONAttribute.Y, POSITIONAttribute.Z);
914
915
			xyz[0] = Double.valueOf(attributes.get(POSITIONAttribute.X));
916
			xyz[1] = Double.valueOf(attributes.get(POSITIONAttribute.Y));
917
			xyz[2] = Double.valueOf(attributes.get(POSITIONAttribute.Z));
918
919 1 1. __position : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
			sendNodeAttributeAdded(sourceId, nodeId, "xyz", xyz);
920
921
			e = getNextEvent();
922
923 1 1. __position : negated conditional → NO_COVERAGE
			if (isEvent(e, XMLEvent.START_ELEMENT, "spells")) {
924 1 1. __position : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
925
926 1 1. __position : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE
				__spells();
927
				e = getNextEvent();
928
			}
929
930 1 1. __position : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "position");
931
		}
932
933
		/**
934
		 * <pre>
935
		 * name 		: SIZE
936
		 * attributes 	: SIZEAttribute { VALUE!, START, STARTOPEN, END, ENDOPEN }
937
		 * structure 	: SPELLS ?
938
		 * </pre>
939
		 */
940
		private void __size(String nodeId) throws IOException,
941
				XMLStreamException {
942
			XMLEvent e;
943
			EnumMap<SIZEAttribute, String> attributes;
944
			double value;
945
946
			e = getNextEvent();
947 1 1. __size : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "size");
948
949
			attributes = getAttributes(SIZEAttribute.class, e.asStartElement());
950
951 1 1. __size : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, SIZEAttribute.VALUE);
952
953
			value = Double.valueOf(attributes.get(SIZEAttribute.VALUE));
954
955 1 1. __size : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
			sendNodeAttributeAdded(sourceId, nodeId, "ui.size", value);
956
957
			e = getNextEvent();
958
959 1 1. __size : negated conditional → NO_COVERAGE
			if (isEvent(e, XMLEvent.START_ELEMENT, "spells")) {
960 1 1. __size : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
961
962 1 1. __size : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE
				__spells();
963
				e = getNextEvent();
964
			}
965
966 1 1. __size : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "size");
967
		}
968
969
		/**
970
		 * <pre>
971
		 * name 		: NODESHAPE
972
		 * attributes 	: NODESHAPEAttributes { VALUE!, URI, START, STARTOPEN, END, ENDOPEN }
973
		 * structure 	: SPELLS ?
974
		 * </pre>
975
		 */
976
		private void __node_shape(String nodeId) throws IOException,
977
				XMLStreamException {
978
			XMLEvent e;
979
			EnumMap<NODESHAPEAttribute, String> attributes;
980
			NodeShapeType type;
981
			String uri;
982
983
			e = getNextEvent();
984 1 1. __node_shape : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "shape");
985
986
			attributes = getAttributes(NODESHAPEAttribute.class,
987
					e.asStartElement());
988
989 1 1. __node_shape : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, NODESHAPEAttribute.VALUE);
990
991
			try {
992
				type = NodeShapeType.valueOf(toConstantName(attributes
993
						.get(NODESHAPEAttribute.VALUE)));
994
			} catch (IllegalArgumentException ex) {
995
				throw newParseError(e,
996
						"'value' should be one of 'disc', 'diamond', 'triangle', 'square' or 'image'");
997
			}
998
999
			switch (type) {
1000
			case IMAGE:
1001 1 1. __node_shape : negated conditional → NO_COVERAGE
				if (!attributes.containsKey(NODESHAPEAttribute.URI))
1002
					throw newParseError(e,
1003
							"'image' shape type needs 'uri' attribute");
1004
1005
				uri = attributes.get(NODESHAPEAttribute.URI);
1006 1 1. __node_shape : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
				sendNodeAttributeAdded(
1007
						sourceId,
1008
						nodeId,
1009
						"ui.style",
1010
						String.format(
1011
								"fill-mode: image-scaled; fill-image: url('%s');",
1012
								uri));
1013
1014
				break;
1015
			default:
1016 1 1. __node_shape : removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE
				sendNodeAttributeAdded(sourceId, nodeId, "ui.style",
1017
						String.format("shape: %s;", type.name().toLowerCase()));
1018
			}
1019
1020
			e = getNextEvent();
1021
1022 1 1. __node_shape : negated conditional → NO_COVERAGE
			if (isEvent(e, XMLEvent.START_ELEMENT, "spells")) {
1023 1 1. __node_shape : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
1024
1025 1 1. __node_shape : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE
				__spells();
1026
				e = getNextEvent();
1027
			}
1028
1029 1 1. __node_shape : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "shape");
1030
		}
1031
1032
		/**
1033
		 * <pre>
1034
		 * name 		: EDGES
1035
		 * attributes 	: EDGESAttribute { 'count' }
1036
		 * structure 	: EDGE *
1037
		 * </pre>
1038
		 */
1039
		private void __edges() throws IOException, XMLStreamException {
1040
			XMLEvent e;
1041
1042
			e = getNextEvent();
1043 1 1. __edges : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "edges");
1044
1045
			e = getNextEvent();
1046
1047 1 1. __edges : negated conditional → NO_COVERAGE
			while (isEvent(e, XMLEvent.START_ELEMENT, "edge")) {
1048 1 1. __edges : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
1049
1050 1 1. __edges : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__edge → NO_COVERAGE
				__edge();
1051
				e = getNextEvent();
1052
			}
1053
1054 1 1. __edges : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "edges");
1055
		}
1056
1057
		/**
1058
		 * <pre>
1059
		 * name 		: EDGE
1060
		 * attributes 	: EDGEAttribute { START, STARTOPEN, END, ENDOPEN, ID!, TYPE, LABEL, SOURCE!, TARGET!, WEIGHT }
1061
		 * structure 	: ( ATTVALUES | SPELLS | ( COLOR | THICKNESS | EDGESHAPE ) ) *
1062
		 * </pre>
1063
		 */
1064
		private void __edge() throws IOException, XMLStreamException {
1065
			XMLEvent e;
1066
			EnumMap<EDGEAttribute, String> attributes;
1067
			String id, source, target;
1068
			EdgeType type = defaultEdgeType;
1069
			HashSet<String> defined = new HashSet<String>();
1070
1071
			e = getNextEvent();
1072 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "edge");
1073
1074
			attributes = getAttributes(EDGEAttribute.class, e.asStartElement());
1075
1076 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, EDGEAttribute.ID,
1077
					EDGEAttribute.SOURCE, EDGEAttribute.TARGET);
1078
1079
			id = attributes.get(EDGEAttribute.ID);
1080
			source = attributes.get(EDGEAttribute.SOURCE);
1081
			target = attributes.get(EDGEAttribute.TARGET);
1082
1083 1 1. __edge : negated conditional → NO_COVERAGE
			if (attributes.containsKey(EDGEAttribute.TYPE)) {
1084
				try {
1085
					type = EdgeType.valueOf(toConstantName(attributes
1086
							.get(EDGEAttribute.TYPE)));
1087
				} catch (IllegalArgumentException ex) {
1088
					throw newParseError(e,
1089
							"edge type should be one of 'undirected', 'undirected' or 'mutual'");
1090
				}
1091
			}
1092
1093
			switch (type) {
1094
			case DIRECTED:
1095 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAdded → NO_COVERAGE
				sendEdgeAdded(sourceId, id, source, target, true);
1096
				break;
1097
			case MUTUAL:
1098
			case UNDIRECTED:
1099 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAdded → NO_COVERAGE
				sendEdgeAdded(sourceId, id, source, target, false);
1100
				break;
1101
			}
1102
1103 1 1. __edge : negated conditional → NO_COVERAGE
			if (attributes.containsKey(EDGEAttribute.LABEL))
1104 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE
				sendEdgeAttributeAdded(sourceId, id, "ui.label",
1105
						attributes.get(EDGEAttribute.LABEL));
1106
1107 1 1. __edge : negated conditional → NO_COVERAGE
			if (attributes.containsKey(EDGEAttribute.WEIGHT)) {
1108
				try {
1109
					double d = Double.valueOf(attributes
1110
							.get(EDGEAttribute.WEIGHT));
1111 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE
					sendEdgeAttributeAdded(sourceId, id, "weight", d);
1112
				} catch (NumberFormatException ex) {
1113
					throw newParseError(e,
1114
							"'weight' attribute of edge should be a real");
1115
				}
1116
			}
1117
1118
			e = getNextEvent();
1119
1120 1 1. __edge : negated conditional → NO_COVERAGE
			while (!isEvent(e, XMLEvent.END_ELEMENT, "edge")) {
1121
				try {
1122
					Balise b = Balise.valueOf(toConstantName(e.asStartElement()
1123
							.getName().getLocalPart()));
1124
1125 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
					pushback(e);
1126
1127
					switch (b) {
1128
					case ATTVALUES:
1129
						defined.addAll(__attvalues(ClassType.EDGE, id));
1130
						break;
1131
					case SPELLS:
1132 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE
						__spells();
1133
						break;
1134
					case COLOR:
1135 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__color → NO_COVERAGE
						__color(ClassType.EDGE, id);
1136
						break;
1137
					case THICKNESS:
1138 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__thickness → NO_COVERAGE
						__thickness(id);
1139
						break;
1140
					case SHAPE:
1141 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__edge_shape → NO_COVERAGE
						__edge_shape(id);
1142
						break;
1143
					default:
1144
						throw newParseError(
1145
								e,
1146
								"edge children should be one of 'attvalues', 'color', 'thicknes', 'shape' or 'spells'");
1147
					}
1148
				} catch (IllegalArgumentException ex) {
1149
					throw newParseError(e, "unknown tag '%s'", e
1150
							.asStartElement().getName().getLocalPart());
1151
				}
1152
1153
				e = getNextEvent();
1154
			}
1155
1156 1 1. __edge : negated conditional → NO_COVERAGE
			for (String key : edgeAttributesDefinition.keySet()) {
1157 1 1. __edge : negated conditional → NO_COVERAGE
				if (!defined.contains(key))
1158 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE
					sendEdgeAttributeAdded(sourceId, id, key,
1159
							edgeAttributesDefinition.get(key).def);
1160
			}
1161
1162 1 1. __edge : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "edge");
1163
		}
1164
1165
		/**
1166
		 * <pre>
1167
		 * name 		: EDGESHAPE
1168
		 * attributes 	: EDGESHAPEAttributes { VALUE!, START, STARTOPEN, END, ENDOPEN }
1169
		 * structure 	: SPELLS ?
1170
		 * </pre>
1171
		 */
1172
		@SuppressWarnings("unused")
1173
		private void __edge_shape(String edgeId) throws IOException,
1174
				XMLStreamException {
1175
			XMLEvent e;
1176
			EnumMap<EDGESHAPEAttribute, String> attributes;
1177
			EdgeShapeType type;
1178
1179
			e = getNextEvent();
1180 1 1. __edge_shape : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "shape");
1181
1182
			attributes = getAttributes(EDGESHAPEAttribute.class,
1183
					e.asStartElement());
1184 1 1. __edge_shape : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, EDGESHAPEAttribute.VALUE);
1185
1186
			try {
1187
				type = EdgeShapeType.valueOf(toConstantName(attributes
1188
						.get(EDGESHAPEAttribute.VALUE)));
1189
			} catch (IllegalArgumentException ex) {
1190
				throw newParseError(e,
1191
						"'value' of shape should be one of 'solid', 'dotted', 'dashed' or 'double'");
1192
			}
1193
1194
			// TODO Handle shape of edges
1195
1196
			e = getNextEvent();
1197
1198 1 1. __edge_shape : negated conditional → NO_COVERAGE
			if (isEvent(e, XMLEvent.START_ELEMENT, "spells")) {
1199 1 1. __edge_shape : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
1200
1201 1 1. __edge_shape : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE
				__spells();
1202
				e = getNextEvent();
1203
			}
1204
1205 1 1. __edge_shape : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "shape");
1206
		}
1207
1208
		/**
1209
		 * <pre>
1210
		 * name 		: THICKNESS
1211
		 * attributes 	: THICKNESSAttribute { VALUE!, START, STARTOPEN, END, ENDOPEN }
1212
		 * structure 	: SPELLS ?
1213
		 * </pre>
1214
		 */
1215
		private void __thickness(String edgeId) throws IOException,
1216
				XMLStreamException {
1217
			XMLEvent e;
1218
			EnumMap<THICKNESSAttribute, String> attributes;
1219
1220
			e = getNextEvent();
1221 1 1. __thickness : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.START_ELEMENT, "thickness");
1222
1223
			attributes = getAttributes(THICKNESSAttribute.class,
1224
					e.asStartElement());
1225
1226 1 1. __thickness : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE
			checkRequiredAttributes(e, attributes, THICKNESSAttribute.VALUE);
1227
1228
			e = getNextEvent();
1229
1230 1 1. __thickness : negated conditional → NO_COVERAGE
			if (isEvent(e, XMLEvent.START_ELEMENT, "spells")) {
1231 1 1. __thickness : removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE
				pushback(e);
1232
1233 1 1. __thickness : removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE
				__spells();
1234
				e = getNextEvent();
1235
			}
1236
1237 1 1. __thickness : removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE
			checkValid(e, XMLEvent.END_ELEMENT, "thickness");
1238
		}
1239
	}
1240
1241
	public static interface GEXFConstants {
1242
		public static enum Balise {
1243
			GEXF, GRAPH, META, CREATOR, KEYWORDS, DESCRIPTION, NODES, NODE, EDGES, EDGE, COLOR, POSITION, SIZE, SHAPE, THICKNESS, DEFAULT, OPTIONS, ATTVALUES, PARENTS, SPELLS
1244
		}
1245
1246
		public static enum GEXFAttribute {
1247
			XMLNS, VERSION
1248
		}
1249
1250
		public static enum METAAttribute {
1251
			LASTMODIFIEDDATE
1252
		}
1253
1254
		public static enum GRAPHAttribute {
1255
			TIMEFORMAT, START, STARTOPEN, END, ENDOPEN, DEFAULTEDGETYPE, IDTYPE, MODE
1256
		}
1257
1258
		public static enum ATTRIBUTESAttribute {
1259
			CLASS, MODE, START, STARTOPEN, END, ENDOPEN
1260
		}
1261
1262
		public static enum ATTRIBUTEAttribute {
1263
			ID, TITLE, TYPE
1264
		}
1265
1266
		public static enum NODESAttribute {
1267
			COUNT
1268
		}
1269
1270
		public static enum NODEAttribute {
1271
			START, STARTOPEN, END, ENDOPEN, PID, ID, LABEL
1272
		}
1273
1274
		public static enum ATTVALUEAttribute {
1275
			FOR, VALUE, START, STARTOPEN, END, ENDOPEN
1276
		}
1277
1278
		public static enum PARENTAttribute {
1279
			FOR
1280
		}
1281
1282
		public static enum EDGESAttribute {
1283
			COUNT
1284
		}
1285
1286
		public static enum SPELLAttribute {
1287
			START, STARTOPEN, END, ENDOPEN
1288
		}
1289
1290
		public static enum COLORAttribute {
1291
			R, G, B, A, START, STARTOPEN, END, ENDOPEN
1292
		}
1293
1294
		public static enum POSITIONAttribute {
1295
			X, Y, Z, START, STARTOPEN, END, ENDOPEN
1296
		}
1297
1298
		public static enum SIZEAttribute {
1299
			VALUE, START, STARTOPEN, END, ENDOPEN
1300
		}
1301
1302
		public static enum NODESHAPEAttribute {
1303
			VALUE, URI, START, STARTOPEN, END, ENDOPEN
1304
		}
1305
1306
		public static enum EDGEAttribute {
1307
			START, STARTOPEN, END, ENDOPEN, ID, TYPE, LABEL, SOURCE, TARGET, WEIGHT
1308
		}
1309
1310
		public static enum THICKNESSAttribute {
1311
			VALUE, START, STARTOPEN, END, ENDOPEN
1312
		}
1313
1314
		public static enum EDGESHAPEAttribute {
1315
			VALUE, START, STARTOPEN, END, ENDOPEN
1316
		}
1317
1318
		public static enum IDType {
1319
			INTEGER, STRING
1320
		}
1321
1322
		public static enum ModeType {
1323
			STATIC, DYNAMIC
1324
		}
1325
1326
		public static enum WeightType {
1327
			FLOAT
1328
		}
1329
1330
		public static enum EdgeType {
1331
			DIRECTED, UNDIRECTED, MUTUAL
1332
		}
1333
1334
		public static enum NodeShapeType {
1335
			DISC, SQUARE, TRIANGLE, DIAMOND, IMAGE
1336
		}
1337
1338
		public static enum EdgeShapeType {
1339
			SOLID, DOTTED, DASHED, DOUBLE
1340
		}
1341
1342
		public static enum AttributeType {
1343
			INTEGER, LONG, FLOAT, DOUBLE, BOOLEAN, ANYURI, LISTSTRING, STRING
1344
		}
1345
1346
		public static enum ClassType {
1347
			NODE, EDGE
1348
		}
1349
1350
		public static enum TimeFormatType {
1351
			INTEGER, DOUBLE, DATE, DATETIME
1352
		}
1353
	}
1354
}

Mutations

66

1.1
Location : afterStartDocument
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::access$5 → NO_COVERAGE

75

1.1
Location : nextEvents
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

134

1.1
Location : getValue
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$Attribute::getValue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

178

1.1
Location : getTime
Killed by : none
replaced return of long value with value + 1 for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::getTime → NO_COVERAGE

188

1.1
Location : __gexf
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

192

1.1
Location : __gexf
Killed by : none
negated conditional → NO_COVERAGE

193

1.1
Location : __gexf
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

194

1.1
Location : __gexf
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__meta → NO_COVERAGE

196

1.1
Location : __gexf
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

198

1.1
Location : __gexf
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__graph → NO_COVERAGE

201

1.1
Location : __gexf
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

213

1.1
Location : __meta
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

217

1.1
Location : __meta
Killed by : none
negated conditional → NO_COVERAGE

218

1.1
Location : __meta
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendGraphAttributeAdded → NO_COVERAGE

223

1.1
Location : __meta
Killed by : none
negated conditional → NO_COVERAGE

229

1.1
Location : __meta
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

234

1.1
Location : __meta
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendGraphAttributeAdded → NO_COVERAGE

238

1.1
Location : __meta
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendGraphAttributeAdded → NO_COVERAGE

242

1.1
Location : __meta
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendGraphAttributeAdded → NO_COVERAGE

256

1.1
Location : __meta
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

267

1.1
Location : __creator
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

272

1.1
Location : __creator
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

274

1.1
Location : __creator
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__creator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

285

1.1
Location : __keywords
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

290

1.1
Location : __keywords
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

292

1.1
Location : __keywords
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__keywords to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

307

1.1
Location : __description
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

312

1.1
Location : __description
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

314

1.1
Location : __description
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__description to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

329

1.1
Location : __graph
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

333

1.1
Location : __graph
Killed by : none
negated conditional → NO_COVERAGE

344

1.1
Location : __graph
Killed by : none
negated conditional → NO_COVERAGE

357

1.1
Location : __graph
Killed by : none
negated conditional → NO_COVERAGE

358

1.1
Location : __graph
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

360

1.1
Location : __graph
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__attributes → NO_COVERAGE

364

1.1
Location : __graph
Killed by : none
negated conditional → NO_COVERAGE

365

1.1
Location : __graph
Killed by : none
negated conditional → NO_COVERAGE

366

1.1
Location : __graph
Killed by : none
negated conditional → NO_COVERAGE

367

1.1
Location : __graph
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

368

1.1
Location : __graph
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__nodes → NO_COVERAGE

370

1.1
Location : __graph
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

371

1.1
Location : __graph
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__edges → NO_COVERAGE

377

1.1
Location : __graph
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

395

1.1
Location : __attributes
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

400

1.1
Location : __attributes
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

410

1.1
Location : __attributes
Killed by : none
negated conditional → NO_COVERAGE

417

1.1
Location : __attributes
Killed by : none
negated conditional → NO_COVERAGE

418

1.1
Location : __attributes
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

425

1.1
Location : __attributes
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

443

1.1
Location : __attribute
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

448

1.1
Location : __attribute
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

467

1.1
Location : __attribute
Killed by : none
negated conditional → NO_COVERAGE

472

1.1
Location : __attribute
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

477

1.1
Location : __attribute
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$Attribute::setDefault → NO_COVERAGE

484

1.1
Location : __attribute
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$Attribute::setOptions → NO_COVERAGE

498

1.1
Location : __attribute
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

500

1.1
Location : __attribute
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__attribute to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

515

1.1
Location : __default
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

520

1.1
Location : __default
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

522

1.1
Location : __default
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__default to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

537

1.1
Location : __options
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

542

1.1
Location : __options
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

544

1.1
Location : __options
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__options to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

558

1.1
Location : __nodes
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

562

1.1
Location : __nodes
Killed by : none
negated conditional → NO_COVERAGE

563

1.1
Location : __nodes
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

565

1.1
Location : __nodes
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__node → NO_COVERAGE

569

1.1
Location : __nodes
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

587

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

591

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

594

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAdded → NO_COVERAGE

596

1.1
Location : __node
Killed by : none
negated conditional → NO_COVERAGE

597

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

602

1.1
Location : __node
Killed by : none
negated conditional → NO_COVERAGE

607

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

614

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__color → NO_COVERAGE

617

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__position → NO_COVERAGE

620

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__size → NO_COVERAGE

623

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__node_shape → NO_COVERAGE

626

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE

629

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__nodes → NO_COVERAGE

632

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__edges → NO_COVERAGE

635

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__parents → NO_COVERAGE

650

1.1
Location : __node
Killed by : none
negated conditional → NO_COVERAGE

651

1.1
Location : __node
Killed by : none
negated conditional → NO_COVERAGE

652

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

657

1.1
Location : __node
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

673

1.1
Location : __attvalues
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

677

1.1
Location : __attvalues
Killed by : none
negated conditional → NO_COVERAGE

678

1.1
Location : __attvalues
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

684

1.1
Location : __attvalues
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

686

1.1
Location : __attvalues
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__attvalues to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

704

1.1
Location : __attvalue
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

709

1.1
Location : __attvalue
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

712

1.1
Location : __attvalue
Killed by : none
negated conditional → NO_COVERAGE

719

1.1
Location : __attvalue
Killed by : none
negated conditional → NO_COVERAGE

732

1.1
Location : __attvalue
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

736

1.1
Location : __attvalue
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE

742

1.1
Location : __attvalue
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

744

1.1
Location : __attvalue
Killed by : none
mutated return of Object value for org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__attvalue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

758

1.1
Location : __spells
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

761

1.1
Location : __spells
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spell → NO_COVERAGE

763

1.1
Location : __spells
Killed by : none
negated conditional → NO_COVERAGE

765

1.1
Location : __spells
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

781

1.1
Location : __spell
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

788

1.1
Location : __spell
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

803

1.1
Location : __parents
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

807

1.1
Location : __parents
Killed by : none
negated conditional → NO_COVERAGE

808

1.1
Location : __parents
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__parent → NO_COVERAGE

812

1.1
Location : __parents
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

828

1.1
Location : __parent
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

833

1.1
Location : __parent
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

834

1.1
Location : __parent
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

838

1.1
Location : __parent
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

856

1.1
Location : __color
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

860

1.1
Location : __color
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

867

1.1
Location : __color
Killed by : none
negated conditional → NO_COVERAGE

874

1.1
Location : __color
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

877

1.1
Location : __color
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE

883

1.1
Location : __color
Killed by : none
negated conditional → NO_COVERAGE

884

1.1
Location : __color
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

886

1.1
Location : __color
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE

890

1.1
Location : __color
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

907

1.1
Location : __position
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

912

1.1
Location : __position
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

919

1.1
Location : __position
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

923

1.1
Location : __position
Killed by : none
negated conditional → NO_COVERAGE

924

1.1
Location : __position
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

926

1.1
Location : __position
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE

930

1.1
Location : __position
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

947

1.1
Location : __size
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

951

1.1
Location : __size
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

955

1.1
Location : __size
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

959

1.1
Location : __size
Killed by : none
negated conditional → NO_COVERAGE

960

1.1
Location : __size
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

962

1.1
Location : __size
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE

966

1.1
Location : __size
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

984

1.1
Location : __node_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

989

1.1
Location : __node_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

1001

1.1
Location : __node_shape
Killed by : none
negated conditional → NO_COVERAGE

1006

1.1
Location : __node_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

1016

1.1
Location : __node_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendNodeAttributeAdded → NO_COVERAGE

1022

1.1
Location : __node_shape
Killed by : none
negated conditional → NO_COVERAGE

1023

1.1
Location : __node_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

1025

1.1
Location : __node_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE

1029

1.1
Location : __node_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

1043

1.1
Location : __edges
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

1047

1.1
Location : __edges
Killed by : none
negated conditional → NO_COVERAGE

1048

1.1
Location : __edges
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

1050

1.1
Location : __edges
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__edge → NO_COVERAGE

1054

1.1
Location : __edges
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

1072

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

1076

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

1083

1.1
Location : __edge
Killed by : none
negated conditional → NO_COVERAGE

1095

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAdded → NO_COVERAGE

1099

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAdded → NO_COVERAGE

1103

1.1
Location : __edge
Killed by : none
negated conditional → NO_COVERAGE

1104

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE

1107

1.1
Location : __edge
Killed by : none
negated conditional → NO_COVERAGE

1111

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE

1120

1.1
Location : __edge
Killed by : none
negated conditional → NO_COVERAGE

1125

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

1132

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE

1135

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__color → NO_COVERAGE

1138

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__thickness → NO_COVERAGE

1141

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__edge_shape → NO_COVERAGE

1156

1.1
Location : __edge
Killed by : none
negated conditional → NO_COVERAGE

1157

1.1
Location : __edge
Killed by : none
negated conditional → NO_COVERAGE

1158

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::sendEdgeAttributeAdded → NO_COVERAGE

1162

1.1
Location : __edge
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

1180

1.1
Location : __edge_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

1184

1.1
Location : __edge_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

1198

1.1
Location : __edge_shape
Killed by : none
negated conditional → NO_COVERAGE

1199

1.1
Location : __edge_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

1201

1.1
Location : __edge_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE

1205

1.1
Location : __edge_shape
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

1221

1.1
Location : __thickness
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

1226

1.1
Location : __thickness
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::checkRequiredAttributes → NO_COVERAGE

1230

1.1
Location : __thickness
Killed by : none
negated conditional → NO_COVERAGE

1231

1.1
Location : __thickness
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::pushback → NO_COVERAGE

1233

1.1
Location : __thickness
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF$GEXFParser::__spells → NO_COVERAGE

1237

1.1
Location : __thickness
Killed by : none
removed call to org/graphstream/stream/file/FileSourceGEXF::checkValid → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 0.33