class GatewayPropertyWriter extends PropertyWriter {

    public void setGatewayDirection(Node n) {
        long incoming = countEdges(n.getInEdges());
        long outgoing = countEdges(n.getOutEdges());

        if (incoming <= 1 && outgoing > 1) {
            gateway.setGatewayDirection(GatewayDirection.DIVERGING);
        } else if (incoming > 1 && outgoing <= 1) {
            gateway.setGatewayDirection(GatewayDirection.CONVERGING);
        }
        // temp. removing support for mixed gateway direction (not supported by runtime yet)
//                else if (incoming > 1 && outgoing > 1) {
//                    gateway.setGatewayDirection(GatewayDirection.MIXED);
//                }
//                else if (incoming == 1 && outgoing == 1) {
//                    // this handles the 1:1 case of the diverging gateways
//                }
        else {
            gateway.setGatewayDirection(GatewayDirection.UNSPECIFIED);
        }
    }

    public  GatewayPropertyWriter(Gateway gateway, VariableScope variableScope);

}