From: David Z. <dz...@re...> - 2005-03-17 21:01:59
|
Dave, The class in question is NEW (it was added), and is intended for use with the length function, and takes an AttributeType. This means that there is not a defined way to set a new attributeType (ie. the FeatureType is not there) ... so an appropriate exception is thrown. Please use the old implementation FilterFactory.get...(FeatureType,String) is you wish to modify the Attribute type. David On Thu, 2005-03-17 at 12:41, db...@op... wrote: > Dave, > > I'm still trying to merge in the new FeatureType stuff in Geoserver. > > I've found that attributeExpressionImpl2#setAttributePath(String) just > throws an error. > > I asked you about this and you said, "it wasn't there before". But, in > attributeExpressionImpl.java the function is there. Am I > missunderstanding you and looking in the wrong spot? > > I'm trying to fix Geoserver test cases for the new FeatureType stuff. > Whats the new defined behavior? Is setAttributePath not supposed to be > called (shouldnt it be throwing a different error?)? If not, whats the > new API way of doing this? > > > OLD: > > /** > * Constructor with minimum dataset for a valid expression. > * > * @param attPath The initial (required) sub filter. > * > * @throws IllegalFilterException If the attribute path is not in > the > * schema. > */ > public void setAttributePath(String attPath) throws > IllegalFilterException { > LOGGER.entering("ExpressionAttribute", "setAttributePath", > attPath); > LOGGER.finest("schema: " + schema + "\n\nattribute: " + > attPath); > > if (schema != null) { > if (schema.hasAttributeType(attPath)) { > this.attPath = attPath; > } else { > throw new IllegalFilterException( > "Attribute: " +attPath+ " is not in stated schema > "+schema.getTypeName()+"."); > } > } else { > this.attPath = attPath; > } > } > > > > > NEW: > > public void setAttributePath(String attPath) throws > IllegalFilterException { > > throw new IllegalFilterException( > "Attribute: " +attPath+ " is not in stated schema > "+"."); > } > > > > > ---------------------------------------------------------- > This mail sent through IMP: https://webmail.limegroup.com/ |