/** Reattaches a serialized {@link MapInfo} to the catalog */ public void attach(MapInfo mapInfo) { // hmmm... mapInfo has a list of layers inside? Not names? for (LayerInfo layer : mapInfo.getLayers()) { attach(layer); } }
public static MapInfo localizeMapInfo(final MapInfo info, final Catalog catalog) throws IllegalAccessException, InvocationTargetException { if (info==null || catalog==null) throw new NullArgumentException("Arguments may never be null"); final MapInfo localObject=catalog.getMapByName(info.getName()); if (localObject !=null){ return localObject; // else object is modified: continue with localization } info.getLayers().addAll(localizeLayers(info.getLayers(), catalog)); final CatalogBuilder builder = new CatalogBuilder(catalog); builder.attach(info); return info; }
public static MapInfo localizeMapInfo(final MapInfo info, final Catalog catalog) throws IllegalAccessException, InvocationTargetException { if (info==null || catalog==null) throw new NullArgumentException("Arguments may never be null"); final MapInfo localObject=catalog.getMapByName(info.getName()); if (localObject !=null){ return localObject; // else object is modified: continue with localization } info.getLayers().addAll(localizeLayers(info.getLayers(), catalog)); final CatalogBuilder builder = new CatalogBuilder(catalog); builder.attach(info); return info; }