package pete.metrics.adaptability.elements;


class DetectionOnlyElements extends ElementsCollection {

	private EventElements events;

	public DetectionOnlyElements() {
		events = new EventElements();
		buildSequenceFlow();
		buildThrowLinkEvent();
		buildCatchLinkEvent();
	}

	private void buildSequenceFlow() {
		AdaptableElement sequenceFlow = new AdaptableElement("sequenceFlow", true);
		sequenceFlow.setLocatorExpression("//*[local-name() = 'sequenceFlow']");
		add(sequenceFlow);
	}

	private void buildThrowLinkEvent() {
		AdaptableElement linkEvent = new AdaptableElement("linkThrowEvent", true);
		linkEvent.setLocatorExpression(events.buildEventXPathExpression("intermediateThrowEvent", "link"));
		add(linkEvent);
	}

	private void buildCatchLinkEvent() {
		AdaptableElement linkEvent = new AdaptableElement("linkCatchEvent", true);
		linkEvent.setLocatorExpression(events.buildEventXPathExpression("intermediateCatchEvent", "link"));
		add(linkEvent);
	}

}

@@ -38,17 +38,16 @@
 ments;%0A%0A
-%0A
 class De
@@ -267,16 +267,31 @@
 vent();%0A
+%09%09buildTask();%0A
 %09%7D%0A%0A%09pri
@@ -392,17 +392,21 @@
 ceFlow%22,
- 
+%0A%09%09%09%09
 true);%0A%09
@@ -607,25 +607,29 @@
 ThrowEvent%22,
- 
+%0A%09%09%09%09
 true);%0A%09%09lin
@@ -681,32 +681,37 @@
 XPathExpression(
+%0A%09%09%09%09
 %22intermediateThr
@@ -859,17 +859,21 @@
 hEvent%22,
- 
+%0A%09%09%09%09
 true);%0A%09
@@ -937,16 +937,21 @@
 ression(
+%0A%09%09%09%09
 %22interme
@@ -1000,10 +1000,337 @@
 t);%0A%09%7D%0A%0A
+%09private void buildTask() %7B%0A%09%09AdaptableElement task = new AdaptableElement(%22task%22, true);%0A%09%09task.setLocatorExpression(%22//*%5Blocal-name() = 'task' or local-name() = 'globalTask'%5D%22);%0A%09%09task.setDocumentation(%22A plain task is a kind of wildcard element for an unspecified task an irrelevant to process execution%22);%0A%09%09add(task);%0A%09%7D%0A%0A
 %7D%0A

Set task to detectionOnly