package fr.univ.nantes.alma.accecs.model;

import java.util.ArrayList;
import java.util.Collection;

public class Machine {

    private String name;
    private Collection<Variable> variables;
    private Collection<Property> properties;
    private Collection<Event> events;

    public Machine() {
        name = new String();
        variables = new ArrayList<Variable>();
        properties = new ArrayList<Property>();
        events = new ArrayList<Event>();
    }

    public Machine(String name, Collection<Variable> variables, Collection<Property> properties, Collection<Event> events) {
        this.name = name;
        this.variables = variables;
        this.properties = properties;
        this.events = events;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Collection<Variable> getVariables() {
        return variables;
    }

    public void setVariables(Collection<Variable> variables) {
        this.variables = variables;
    }

    public Collection<Property> getProperties() {
        return properties;
    }

    public void setProperties(Collection<Property> properties) {
        this.properties = properties;
    }

    public Collection<Event> getEvents() {
        return events;
    }

    public void setEvents(Collection<Event> events) {
        this.events = events;
    }
}

@@ -94,16 +94,76 @@
 ction;%0A%0A
+import fr.univ.nantes.alma.accecs.model.Variable.Category;%0A%0A
 public c
@@ -777,34 +777,708 @@
 s = events;%0A    
-%7D%0A
+    //Determine the possible events with the known variables%0A        for (Variable each : this.variables)%7B%0A        %09if (each.getCategory() == Category.INPUT)%7B%0A        %09%09events.add(calculEventInput(each));%0A        %09%7D%0A        %09if (each.getCategory() == Category.OUTPUT)%7B%0A        %09%09events.add(calculEventOutput(each));%0A        %09%7D%0A        %7D%0A    %7D%0A    //TODO determiner comment fabriquer un event a partir de variable d'entree %0A    private Event calculEventInput(Variable v)%7B%0A    %09%0A    %09return new Event();%0A    %7D%0A  //TODO determiner comment fabriquer un event a partir de variable d'entree %0A    private Event calculEventOutput(Variable v)%7B%0A    %09%0A    %09return new Event();%0A    %7D%0A    
 %0A    public Stri

add fonction for events