try { ModelParser parser = new FlyMineModelParser(); model = parser.process(is); } catch (Exception e) { throw new MetaDataException("Error parsing metadata: " + e); } return model;
return (Model) models.get(name);
    public static Model getInstanceByName(String name) throws MetaDataException {        String filename = name + "_model.xml";        InputStream is = Model.class.getClassLoader().getResourceAsStream(filename);        if (is == null) {            throw new IllegalArgumentException("Model '" + name + "' cannot be found ("                                               + filename + ")");        }        try {            ModelParser parser = new FlyMineModelParser();            model = parser.process(is);        } catch (Exception e) {            throw new MetaDataException("Error parsing metadata: " + e);        }        return model;    }