public LayerAuthoritiesAndIdentifiersConfigPanel( String id, IModel<? extends PublishedInfo> layerGroupModel) { super(id, layerGroupModel); // authority URLs and identifiers for this layer LayerAuthoritiesAndIdentifiersPanel authAndIds; authAndIds = new LayerAuthoritiesAndIdentifiersPanel( "authoritiesAndIds", false, layerGroupModel); add(authAndIds); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public WMSLayerGroupConfig(String id, IModel layerGroupModel) { super(id, layerGroupModel); // authority URLs and identifiers for this layer LayerAuthoritiesAndIdentifiersPanel authAndIds; authAndIds = new LayerAuthoritiesAndIdentifiersPanel("authoritiesAndIds", false, layerGroupModel); add(authAndIds); } }
public LegendGraphicAjaxUpdater(final String wmsURL, final Image image, final IModel styleInfoModel) { this.wmsURL = wmsURL; this.image = image; this.styleInfoModel = styleInfoModel; updateStyleImage(null); }
@SuppressWarnings("unchecked") public LayerAuthoritiesAndIdentifiersPanel(final String id, final boolean isRootLayer, final IModel<? extends CatalogInfo> layerModel) { super(id); // authority URLs for the this layer IModel<List<AuthorityURLInfo>> authURLsModel; authURLsModel = LiveCollectionModel.list(new PropertyModel<List<AuthorityURLInfo>>( layerModel, "authorityURLs")); AuthorityURLListEditor authUrlEditor = new AuthorityURLListEditor("authorityurls", authURLsModel); add(authUrlEditor); // Layer Identifiers for this layer IModel<List<LayerIdentifierInfo>> identifiersModel; identifiersModel = LiveCollectionModel.list(new PropertyModel<List<LayerIdentifierInfo>>( layerModel, "identifiers")); LayerIdentifierListEditor identifiersEditor = new LayerIdentifierListEditor( "layerIdentifiers", identifiersModel, authUrlEditor); if (!isRootLayer) { WMSInfo serviceInfo = WMS.get().getServiceInfo(); List<AuthorityURLInfo> rootLayerAuthorities = serviceInfo.getAuthorityURLs(); identifiersEditor.setBaseAuthorities(rootLayerAuthorities); } add(identifiersEditor); }
/** * @param id * @param model * the model over the appropriate cataloginfo's list of {@link LayerIdentifierInfo} * @see WMSInfo#getIdentifiers() * @see LayerInfo#getIdentifiers() * @see LayerGroupInfo#getIdentifiers() */ public LayerIdentifierListEditor(final String id, final IModel<List<LayerIdentifierInfo>> list, final AuthorityURLListEditor availableAuthoritiesProvider) { super(id, list); this.availableAuthoritiesProvider = availableAuthoritiesProvider; Assert.notNull(list.getObject()); Assert.notNull(availableAuthoritiesProvider.getModelObject()); setOutputMarkupId(true); initUI(); }
public KMLLayerConfigPanel(String id, IModel model){ super(id, model); PropertyModel metadata = new PropertyModel(model, "resource.metadata"); add(new DropDownChoice("kml.regionateAttribute", new MapModel(metadata, "kml.regionateAttribute"), new AttributeNamesModel(new PropertyModel(model, "resource")))); add(new DropDownChoice("kml.regionateStrategy", new MapModel(metadata, "kml.regionateStrategy"), KML_STRATEGIES) ); TextField maxFeatures = new TextField("kml.regionateFeatureLimit", new MapModel(metadata, "kml.regionateFeatureLimit"), Integer.class); maxFeatures.add(NumberValidator.minimum(1)); add(maxFeatures); }
@Override public void convertInput() { List<LayerIdentifierInfo> info = identifiers.getModelObject(); setConvertedInput(info); }
@Override protected void convertInput() { List<AuthorityURLInfo> info = authorityURLs.getModelObject(); if (info == null || info.size() == 0) { setConvertedInput(new ArrayList<AuthorityURLInfo>(2)); return; } setConvertedInput(info); }
/** * Pull out each field from the LayerIdentifierInfo if it exists and put the contents into the * fields. */ @Override protected void onBeforeRender() { LayerIdentifierInfo info = getModelObject(); if (info != null) { authority.setModelObject(info.getAuthority()); identifier.setModelObject(info.getIdentifier()); } super.onBeforeRender(); }
public Component buildComponent(String id) { return new WMSLayerConfig(id, new Model(layer)); } }
public Component buildComponent(String id) { return new AttributionLayerConfigPanel(id, new Model(layer)); } }
new PropertyModel<List<AuthorityURLInfo>>(layerModel, "authorityURLs")); AuthorityURLListEditor authUrlEditor = new AuthorityURLListEditor("authorityurls", authURLsModel); add(authUrlEditor); new LayerIdentifierListEditor("layerIdentifiers", identifiersModel, authUrlEditor); identifiersEditor.setBaseAuthorities(rootLayerAuthorities); add(identifiersEditor);
/** * @param id * @param model the model over the appropriate cataloginfo's list of {@link LayerIdentifierInfo} * @see WMSInfo#getIdentifiers() * @see LayerInfo#getIdentifiers() * @see LayerGroupInfo#getIdentifiers() */ public LayerIdentifierListEditor( final String id, final IModel<List<LayerIdentifierInfo>> list, final AuthorityURLListEditor availableAuthoritiesProvider) { super(id, list); this.availableAuthoritiesProvider = availableAuthoritiesProvider; Assert.notNull(list.getObject()); Assert.notNull(availableAuthoritiesProvider.getModelObject()); setOutputMarkupId(true); initUI(); }
@Override protected void onUpdate(AjaxRequestTarget target) { defaultStyleUpdater.updateStyleImage(target); } });
@Override protected void convertInput() { List<LayerIdentifierInfo> info = identifiers.getModelObject(); setConvertedInput(info); }
@Override public void convertInput() { List<AuthorityURLInfo> info = authorityURLs.getModelObject(); if (info == null || info.size() == 0) { setConvertedInput(new ArrayList<AuthorityURLInfo>(2)); return; } setConvertedInput(info); }
public Component buildComponent(String id) { return new WMSLayerConfig(id, new Model(layer)); } }
@Override protected void onUpdate(AjaxRequestTarget target) { defaultStyleUpdater.updateStyleImage(target); } });
public Component buildComponent(String id) { return new WMSLayerConfig(id, new Model(layer)); } }
public LegendGraphicAjaxUpdater( final String wmsURL, final Image image, final IModel<StyleInfo> styleInfoModel) { this.wmsURL = wmsURL; this.image = image; this.styleInfoModel = styleInfoModel; this.urlModel = new Model<String>(wmsURL); this.image.add(new AttributeModifier("src", urlModel)); updateStyleImage(null); }