Switch to unified view

a/src/main/java/net/timbusproject/extractors/modules/tavernaextractor/utils/ArchiUtils.java b/src/main/java/net/timbusproject/extractors/modules/tavernaextractor/utils/ArchiUtils.java
1
package net.timbusproject.extractors.modules.tavernaextractor.utils;
1
package net.timbusproject.extractors.modules.tavernaextractor.utils;
2
2
3
import com.google.common.collect.Iterators;
3
import com.google.common.collect.Iterators;
4
import com.google.common.collect.UnmodifiableIterator;
4
import com.google.common.collect.UnmodifiableIterator;
5
5
import net.sf.taverna.t2.activities.stringconstant.StringConstantActivity;
6
import net.sf.taverna.t2.activities.stringconstant.StringConstantActivity;
6
import net.sf.taverna.t2.workflowmodel.Processor;
7
import net.sf.taverna.t2.workflowmodel.Processor;
7
import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
8
import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
8
import uk.ac.bolton.archimate.model.*;
9
import uk.ac.bolton.archimate.model.*;
9
10
...
...
12
public class ArchiUtils {
13
public class ArchiUtils {
13
14
14
     /**
15
     /**
15
     * Group {@link IArchimateElement}s which have a relation of type {@link IAccessRelationship} between a source and a
16
     * Group {@link IArchimateElement}s which have a relation of type {@link IAccessRelationship} between a source and a
16
     * target element
17
     * target element
17
     * 
18
     *
18
     * @param processors
19
     * @param processors
19
     * @param relationsList
20
     * @param relationsList
20
     * @return map containing source and target element (as keys) and a list of {@link IArchimateElement} between those
21
     * @return map containing source and target element (as keys) and a list of {@link IArchimateElement} between those
21
     *         two elements.
22
     *         two elements.
22
     */
23
     */
...
...
52
    }
53
    }
53
54
54
    /**
55
    /**
55
     * Return all {@link IArchimateElement}s which have a relation of type {@link IAccessRelationship} between a source
56
     * Return all {@link IArchimateElement}s which have a relation of type {@link IAccessRelationship} between a source
56
     * and a target element
57
     * and a target element
57
     * 
58
     *
58
     * @param source
59
     * @param source
59
     * @param target
60
     * @param target
60
     * @param relationsList
61
     * @param relationsList
61
     *            All relations
62
     *            All relations
62
     * @return elements inbetween
63
     * @return elements inbetween
...
...
315
316
316
        for (IRelationship relation : relations) {
317
        for (IRelationship relation : relations) {
317
            elements.add(relation.getSource());
318
            elements.add(relation.getSource());
318
        }
319
        }
319
        return elements;
320
        return elements;
320
    }
321
  }
322
323
  public static IProperty createProperty(String key, String value) {
324
      IProperty property = IArchimateFactory.eINSTANCE.createProperty();
325
      property.setKey(key);
326
      property.setValue(value);
327
      return property;
328
  }
321
329
322
}
330
}