RemoteOWS service = ul.getRemoteOWS(); if (!service.getService().equalsIgnoreCase("WFS")) throw new UnsupportedOperationException(
throw new ServiceException("A UserLayer or NamedLayer without layer name was passed"); if (layer.getRemoteOWS() != null) { List<LayerInfo> layers = getRemoteLayersFromUserLayer(layer); visitUserLayerRemoteOWS(layer);
/** * Reset builder to provided original stroke. * * @param stroke */ public UserLayerBuilder reset(UserLayer other) { if (other == null) { return unset(); } inlineFeatureDataStore = other.getInlineFeatureDatastore(); inlineFeatureType = other.getInlineFeatureType(); remoteOWS.reset(other.getRemoteOWS()); featureTypeConstraint.clear(); for (FeatureTypeConstraint ftc : other.getLayerFeatureConstraints()) { featureTypeConstraint.add(new FeatureTypeConstraintBuilder(this).reset(ftc)); } userStyles.clear(); for (Style style : other.getUserStyles()) { userStyles.add(new StyleBuilder(this).reset(style)); } unset = false; return this; }
public void visit(UserLayer layer) { start("UserLayer"); if ((layer.getName() != null) && (layer.getName().length() > 0)) { element("Name", layer.getName()); // optional } DataStore inlineFDS = layer.getInlineFeatureDatastore(); if (inlineFDS != null) { visitInlineFeatureType(inlineFDS, layer.getInlineFeatureType()); } else if (layer.getRemoteOWS() != null) { visit(layer.getRemoteOWS()); } start("LayerFeatureConstraints"); // required FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); if ((lfc != null) && lfc.length > 0) { for (int i = 0; i < lfc.length; i++) { visit(lfc[i]); } } else { // create an empty FeatureTypeConstraint, since it is required start("FeatureTypeConstraint"); end("FeatureTypeConstraint"); } end("LayerFeatureConstraints"); Style[] styles = layer.getUserStyles(); for (int i = 0; i < styles.length; i++) { visit(styles[i]); } end("UserLayer"); }
private static void addRemoteLayersFromUserLayer(GetMapRequest request, UserLayer ul, List layers, List styles) throws WmsException, IOException { RemoteOWS service = ul.getRemoteOWS(); if(!service.getService().equalsIgnoreCase("WFS")) throw new WmsException("GeoServer only supports WFS as remoteOWS service");
public void visit(UserLayer layer) { start("UserLayer"); if ((layer.getName() != null) && (layer.getName().length() > 0)) { element("Name", layer.getName()); //optional } DataStore inlineFDS = layer.getInlineFeatureDatastore(); if (inlineFDS != null) { visitInlineFeatureType(inlineFDS, layer.getInlineFeatureType()); } else if (layer.getRemoteOWS() != null) { visit(layer.getRemoteOWS()); } start("LayerFeatureConstraints"); //required FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); if ((lfc != null) && lfc.length > 0) { for (int i = 0; i < lfc.length; i++) { visit(lfc[i]); } } else { //create an empty FeatureTypeConstraint, since it is required start("FeatureTypeConstraint"); end("FeatureTypeConstraint"); } end("LayerFeatureConstraints"); Style[] styles = layer.getUserStyles(); for (int i = 0; i < styles.length; i++) { visit(styles[i]); } end("UserLayer"); }
public void visit(UserLayer layer) { start("UserLayer"); if ((layer.getName() != null) && (layer.getName().length() > 0)) { element("Name", layer.getName()); //optional } DataStore inlineFDS = layer.getInlineFeatureDatastore(); if (inlineFDS != null) { visitInlineFeatureType(inlineFDS, layer.getInlineFeatureType()); } else if (layer.getRemoteOWS() != null) { visit(layer.getRemoteOWS()); } start("LayerFeatureConstraints"); //required FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); if ((lfc != null) && lfc.length > 0) { for (int i = 0; i < lfc.length; i++) { visit(lfc[i]); } } else { //create an empty FeatureTypeConstraint, since it is required start("FeatureTypeConstraint"); end("FeatureTypeConstraint"); } end("LayerFeatureConstraints"); Style[] styles = layer.getUserStyles(); for (int i = 0; i < styles.length; i++) { visit(styles[i]); } end("UserLayer"); }
if(sl instanceof UserLayer && ((((UserLayer) sl)).getRemoteOWS() != null)) {