My "code review" of this class is that: a) it is in trouble and makes your life harder b) it is a thin wrapper around > private StyleFactory sf; > private FilterFactory ff; c) the value add is a bunch of methods that accept normal literals (rather than expressions) d) the bad part is letting you know what values are optional vs what is required e) It could be a better "Builder" (in the Design Patterns book sense of the word); ie keep some state around to make constructing style objects easier > You're confused?!?!?! Then we're in real trouble :0-) > Hey I just know what this stuff should be; the reality of it is confusing for everyone. On the bright side I am willing (and able) to kick it really hard.
I just need your help to figure out where to place the boot. > You are correct, I was feeding it a featureTypeName (ie "the_geom") > I was totally confused between featureTypeStyleName and featureTypeName, > which now I see I can actually set in a version of the > createLine/Polygon/Point/Symbolizer methods. > > What I don't understand though, is that if I interrogate the style created > with a simple > createStyle(Symbolizer symbolizer) > I get 1 FeatureTypeStyle whose method getFeatureTypeName() returns "Feature". > Thank you for checking :-) Right; "Feature" is the default value for a a FeatureTypeStyle.getFeatureTypeName(); ie "Feature" is a really good name for the kinds of features this feature type style should be applied to. It means "all of them"; if we were just doing text matching we could of said "*" (that would be more clear to you?) but since we are actually looking at the heirachy of of all feature types ever; choosing the root of the tree (ie "Feature") is the best we can do. If you are interested there are some specific categorizations of feature types around; usually military specfications do that sort of thing although in the last 3 years that has been a push to produce public "Open Service Initiatives" which always sounds like a good idea to make information available for public use; but always end up being discussions about what FeatureTypes are "standard" so the public will bother to use them. > I think this is wrong. I think it should return null, since no > featureTypeName was set. > Nope it should return the default value; and "Feature" is the default value. If you want a direct *create what I told you to* class; StyleFactory is your man (we pay the build here to be smart and fill in default values in order to save you seconds when writing your code). Jody ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users