@Override public void visit(UserLayer layer) { if (null == layer.getName()) { throw new ServiceException("A UserLayer or NamedLayer without layer name was passed");
String layerName = getFirstChildValue(child); layer.setName(layerName); if (LOGGER.isLoggable(Level.INFO)) LOGGER.info("layer name: " + layer.getName()); } else if (childName.equalsIgnoreCase("RemoteOWS")) { RemoteOWS remoteOws = parseRemoteOWS(child);
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) { 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"); }
layer.setName(layerName); if (LOGGER.isLoggable(Level.INFO)) LOGGER.info("layer name: " + layer.getName()); } else if (childName.equalsIgnoreCase("RemoteOWS")) { RemoteOWS remoteOws = parseRemoteOWS(child);
LOGGER.info("layer name: " + layer.getName());
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); }
copy.setName(layer.getName()); copy.setUserStyles(styleCopy); copy.setLayerFeatureConstraints(lfcCopy);
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) { 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); }
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"); }