public static ArrayList<Thing> allThings(ThingMLModel model) { ArrayList<Thing> result = new ArrayList<Thing>(); for (ThingMLModel m : allThingMLModelModels(model)) { for (Type t : m.getTypes()) { if ((t instanceof Thing) && !result.contains(t)) result.add((Thing) t); } } return result; }
public static ArrayList<Enumeration> allEnnumerations(ThingMLModel model) { ArrayList<Enumeration> result = new ArrayList<Enumeration>(); for (ThingMLModel m : allThingMLModelModels(model)) { for (Type t : m.getTypes()) { if ((t instanceof Enumeration) && !result.contains(t)) result.add((Enumeration) t); } } return result; }
public static ArrayList<Type> allTypes(ThingMLModel model) { ArrayList<Type> result = new ArrayList<Type>(); for (ThingMLModel m : allThingMLModelModels(model)) { for (Type t : m.getTypes()) { if (!result.contains(t)) result.add(t); } } return result; }
public static ArrayList<Type> allSimpleTypes(ThingMLModel model) { ArrayList<Type> result = new ArrayList<Type>(); for (ThingMLModel m : allThingMLModelModels(model)) { for (Type t : m.getTypes()) { if ((t instanceof ObjectType || t instanceof PrimitiveType || t instanceof Enumeration) && !result.contains(t)) result.add(t); } } return result; }