/** * Map XML type to Java */ @Override public Map<String, Model> unmarshal(ModelsType modelsType) { Map<String, Model> map = new HashMap<String, Model>(); for (Model m : modelsType.getModels()) { map.put(m.getKey(), m); } return map; }
public void removeModel(Model model) { models.remove(model.getKey()); model.setSignature(null); }
public Model addModel(Model model) throws IllegalArgumentException { if (model == null) { throw new IllegalArgumentException("'Model' must not be null"); } if (model.getSignature() != null) { model.getSignature().removeModel(model); } model.setSignature(this); models.put(model.getKey(), model); return model; }