public static Tied CreateTied(string type) { ObjectFactory factory = new ObjectFactory(); //create a tied element Tied tied = factory.createTied(); tied.setType(StartStopContinue.fromValue(type)); tied.setNumber(new Integer(1)); return(tied); }