throw new IllegalStateException( "OnlineResource for remote WFS not specified in SLD"); final FeatureTypeConstraint[] featureConstraints = ul.getLayerFeatureConstraints(); if (featureConstraints == null || featureConstraints.length == 0) throw new IllegalStateException(
@Override public void visit(UserLayer layer) { for (Style s : layer.getUserStyles()) { s.accept(this); } for (FeatureTypeConstraint ftc : layer.getLayerFeatureConstraints()) { ftc.accept(this); } }
public void visit(UserLayer layer) { UserLayer copy = null; Style[] style = layer.getUserStyles(); int length = style.length; Style[] styleCopy = new Style[length]; for (int i = 0; i < length; i++) { if (style[i] != null) { style[i].accept(this); styleCopy[i] = (Style) pages.pop(); } } FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length]; length = lfc.length; for (int i = 0; i < length; i++) { if (lfc[i] != null) { lfc[i].accept(this); lfcCopy[i] = (FeatureTypeConstraint) pages.pop(); } } copy = sf.createUserLayer(); copy.setName(layer.getName()); copy.setUserStyles(styleCopy); copy.setLayerFeatureConstraints(lfcCopy); if (STRICT && !copy.equals(layer)) { throw new IllegalStateException("Was unable to duplicate provided UserLayer:" + layer); } pages.push(copy); }
/** * 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"); }
@Override public void visit(UserLayer layer) { for (Style s : layer.getUserStyles()) { s.accept(this); } for (FeatureTypeConstraint ftc : layer.getLayerFeatureConstraints()) { ftc.accept(this); } }
@Override public void visitUserLayerRemoteOWS(UserLayer ul) { currLayer = null; final FeatureTypeConstraint[] featureConstraints = ul.getLayerFeatureConstraints(); if (request.getFilter() == null) { request.setFilter(new ArrayList()); } for (int i = 0; i < featureConstraints.length; i++) { // make sure the layer is there String name = featureConstraints[i].getFeatureTypeName(); // grab the filter Filter filter = featureConstraints[i].getFilter(); if (filter == null) { filter = Filter.INCLUDE; } request.getFilter().add(filter); } }
public void visit(UserLayer layer) { UserLayer copy = null; Style[] style = layer.getUserStyles(); int length=style.length; Style[] styleCopy = new Style[length]; for (int i = 0; i < length; i++) { if (style[i] != null) { style[i].accept(this); styleCopy[i] = (Style) pages.pop(); } } FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length]; length=lfc.length; for (int i = 0; i < length; i++) { if (lfc[i] != null) { lfc[i].accept(this); lfcCopy[i] = (FeatureTypeConstraint) pages.pop(); } } copy = sf.createUserLayer(); copy.setName(layer.getName()); copy.setUserStyles(styleCopy); copy.setLayerFeatureConstraints(lfcCopy); if( STRICT && !copy.equals( layer )){ throw new IllegalStateException("Was unable to duplicate provided UserLayer:"+layer ); } pages.push(copy); }
public void visit(UserLayer layer) { UserLayer copy = null; Style[] style = layer.getUserStyles(); int length=style.length; Style[] styleCopy = new Style[length]; for (int i = 0; i < length; i++) { if (style[i] != null) { style[i].accept(this); styleCopy[i] = (Style) pages.pop(); } } FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length]; length=lfc.length; for (int i = 0; i < length; i++) { if (lfc[i] != null) { lfc[i].accept(this); lfcCopy[i] = (FeatureTypeConstraint) pages.pop(); } } copy = sf.createUserLayer(); copy.setName(layer.getName()); copy.setUserStyles(styleCopy); copy.setLayerFeatureConstraints(lfcCopy); pages.push(copy); }
FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length];
public void visit(UserLayer layer) { UserLayer copy = null; Style[] style = layer.getUserStyles(); int length=style.length; Style[] styleCopy = new Style[length]; for (int i = 0; i < length; i++) { if (style[i] != null) { style[i].accept(this); styleCopy[i] = (Style) getPages().pop(); } } FeatureTypeConstraint[] lfc = layer.getLayerFeatureConstraints(); FeatureTypeConstraint[] lfcCopy = new FeatureTypeConstraint[lfc.length]; length=lfc.length; for (int i = 0; i < length; i++) { if (lfc[i] != null) { lfc[i].accept(this); lfcCopy[i] = (FeatureTypeConstraint) getPages().pop(); } } copy = sf.createUserLayer(); copy.setName(layer.getName()); copy.setUserStyles(styleCopy); copy.setLayerFeatureConstraints(lfcCopy); getPages().push(copy); }
layerStyles = ((NamedLayer) layer).getStyles(); } else if (layer instanceof UserLayer) { ftcs = ((UserLayer) layer).getLayerFeatureConstraints(); layerStyles = ((UserLayer) layer).getUserStyles();
if(service.getOnlineResource() == null) throw new WmsException("OnlineResource for remote WFS not specified in SLD"); final FeatureTypeConstraint[] featureConstraints = ul.getLayerFeatureConstraints(); if(featureConstraints == null || featureConstraints.length == 0) throw new WmsException("No FeatureTypeConstraint specified, no layer can be loaded for this UserStyle");
layerStyles = ((NamedLayer) layer).getStyles(); } else if (layer instanceof UserLayer) { ftcs = ((UserLayer) layer).getLayerFeatureConstraints(); layerStyles = ((UserLayer) layer).getUserStyles();
ftcs = ((UserLayer) layer).getLayerFeatureConstraints(); layerStyles = ((UserLayer) layer).getUserStyles();
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"); }