layer.setRemoteOWS(remoteOws); } else if (childName.equalsIgnoreCase("LayerFeatureConstraints")) { layer.setLayerFeatureConstraints(parseLayerFeatureConstraints(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 UserLayer build() { if (unset) { return null; } UserLayer layer = sf.createUserLayer(); layer.setRemoteOWS(remoteOWS.build()); layer.setInlineFeatureDatastore(inlineFeatureDataStore); layer.setInlineFeatureType(inlineFeatureType); if (featureTypeConstraint.size() > 0) { FeatureTypeConstraint[] constraints = new FeatureTypeConstraint[featureTypeConstraint.size()]; for (int i = 0; i < constraints.length; i++) { constraints[i] = featureTypeConstraint.get(i).build(); } layer.setLayerFeatureConstraints(constraints); } for (StyleBuilder sb : userStyles) { layer.addUserStyle(sb.build()); } return layer; }
LayerFeatureConstraints lfc = (LayerFeatureConstraints) node.getChildValue("LayerFeatureConstraints"); userLayer.setLayerFeatureConstraints(lfc.getFeatureTypeConstraints());
sld.setLayerFeatureConstraints((FeatureTypeConstraint[]) value[i].getValue());
layer.setRemoteOWS(remoteOws); } else if (childName.equalsIgnoreCase("LayerFeatureConstraints")) { layer.setLayerFeatureConstraints(parseLayerFeatureConstraints(child));
layer.setLayerFeatureConstraints(parseLayerFeatureConstraints(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) { 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); }
public String toXML(Style style) { if (style == null) { return null; } UserLayer layer = sf.createUserLayer(); layer.setLayerFeatureConstraints(new FeatureTypeConstraint[] { null }); layer.setName(featureType.getTypeName()); layer.addUserStyle(style); StyledLayerDescriptor sld = sf.createStyledLayerDescriptor(); sld.addStyledLayer(layer); try { SLDTransformer styleTransform = new SLDTransformer(); return styleTransform.transform(sld); } catch (TransformerException te) { LOGGER.log(Level.FINE, te.getMessage(), te); } return null; } }
copy.setName(layer.getName()); copy.setUserStyles(styleCopy); copy.setLayerFeatureConstraints(lfcCopy);
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); }
LayerFeatureConstraints lfc = (LayerFeatureConstraints) node.getChildValue( "LayerFeatureConstraints"); userLayer.setLayerFeatureConstraints(lfc.getFeatureTypeConstraints());
LayerFeatureConstraints lfc = (LayerFeatureConstraints) node.getChildValue( "LayerFeatureConstraints"); userLayer.setLayerFeatureConstraints(lfc.getFeatureTypeConstraints());
if ((ftcList != null) && !ftcList.isEmpty()) { FeatureTypeConstraint[] ftcArray = new FeatureTypeConstraint[ftcList.size()]; userLayer.setLayerFeatureConstraints(ftcList.toArray(ftcArray));