From: Paul A. <mai...@re...> - 2007-06-11 22:27:27
|
Something like this, rather than having to do all the class.getMethod stu= ff String name =3D PropertyUtils.getProperty(featureSchema, "name"); Paul Martin Davis wrote: > Not sure what you mean - you mean retrieve an attribute from a Feature = > by name? If so, yup. Otherwise, it has whatever java reflection provi= des. > > Paul Austin wrote: > =20 >> Martin, >> >> Does JUMP currently have any introspection code to get a property from= >> an object by a name, something like commons-beanutils. If it does I ca= n >> use introspection to see if the FeatureSchema has a "name" property if= >> it does use that rather than requiring it on the FeatureSchema class. >> >> BTW I think that FeatureSchema should be an interface not a class. >> >> Paul >> >> Martin Davis wrote: >> =20 >> =20 >>> Good questions, Michael, especially the one about having different=20 >>> schemas with the same name. I suspect Paul's code would work fine in= =20 >>> this case, but it is an important philosophical point which should be= =20 >>> thought out fully before going far down this road.=20 >>> >>> Micha=EBl Michaud wrote: >>> =20 >>> =20 >>> =20 >>>> Hi Paul and Larry, >>>> >>>> Just few questions I wonder about naming schemas : >>>> - What really needs to be named, FeatureSchema or FeatureCollection = ? >>>> - Will it be possible to have two different names for identical sche= mas=20 >>>> (it should) ? >>>> - Will it be possible to have two different schemas with identical n= ame=20 >>>> (it should not, but may be the responsability can be let to the user= to=20 >>>> keep it simple) ? >>>> These are just questions to wonder before changing, but at the momen= t, I=20 >>>> can't see any drawback with a free attribute name on FeatureSchema a= s=20 >>>> proposed by Paul. >>>> >>>> Micha=EBl >>>> >>>> Larry Becker a =E9crit : >>>> >>>> =20 >>>> =20 >>>> =20 >>>> =20 >>>>> Hi Paul, >>>>> >>>>> Just a few questions regarding the FeatureSchema Name, since I'm >>>>> unable to come up with the use case myself. I can see that it is >>>>> simpler to look at the Name than to compare all of the attributeNam= es >>>>> individually, but I would hate to make that assumption and then fin= d >>>>> that the user has deleted an attribute I was depending on. Also, >>>>> would the FeatureSchema Name be persisted in the Task (.jmp) file, = and >>>>> if so how does that affect compatibility? >>>>> >>>>> thanks, >>>>> Larry Becker >>>>> >>>>> On 6/9/07, Stefan Steiniger <ss...@ge...> wrote: >>>>> =20 >>>>> >>>>> =20 >>>>> =20 >>>>> =20 >>>>> =20 >>>>>> hei Paul, >>>>>> >>>>>> mhm.. if you write the function (that also supports empty names) >>>>>> this should be possible to include if Michael and Larry agree >>>>>> >>>>>> stefan >>>>>> >>>>>> btw. although you are following specific interests, and changes to= the >>>>>> core need to be discussed it is open to you to join the jpp-team >>>>>> >>>>>> Paul Austin schrieb: >>>>>> =20 >>>>>> >>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>>>> Martin, >>>>>>> >>>>>>> If the FeatureSchema class could be extended to have a name prope= rty, >>>>>>> with a getName (and maybe a setName) with a default constructor a= nd a >>>>>>> constructor that takes the name as an argument then that would be= great. >>>>>>> As we have default constructor existing code won't break as the n= ame is >>>>>>> optional. >>>>>>> >>>>>>> The advantage of having the name is that if you were doing some >>>>>>> processing of features and don't have reference to the layer you = can >>>>>>> find out what type of feature it is and do different processing a= ccordingly. >>>>>>> >>>>>>> Paul >>>>>>> >>>>>>> Martin Davis wrote: >>>>>>> =20 >>>>>>> >>>>>>> =20 >>>>>>> =20 >>>>>>> =20 >>>>>>> =20 >>>>>>>> BTW, the idea of having hum-readable names for FeatureSchemas is= a nice >>>>>>>> one. I'd definitely support adding that functionality, even if = it isn't >>>>>>>> exposed right now. >>>>>>>> >>>>>>>> =20 >>>>>>>> >>>>>>>> =20 >>>>>>>> =20 >>>>>>>> =20 >>>>>>>> =20 >>>>>>> -----------------------------------------------------------------= -------- >>>>>>> This SF.net email is sponsored by DB2 Express >>>>>>> Download DB2 Express C - the FREE version of DB2 express and take= >>>>>>> control of your XML. No limits. Just data. Click to get it now. >>>>>>> http://sourceforge.net/powerbar/db2/ >>>>>>> _______________________________________________ >>>>>>> Jump-pilot-devel mailing list >>>>>>> Jum...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>>>>>> >>>>>>> >>>>>>> =20 >>>>>>> >>>>>>> =20 >>>>>>> =20 >>>>>>> =20 >>>>>>> =20 >>>>>> ------------------------------------------------------------------= ------- >>>>>> This SF.net email is sponsored by DB2 Express >>>>>> Download DB2 Express C - the FREE version of DB2 express and take >>>>>> control of your XML. No limits. Just data. Click to get it now. >>>>>> http://sourceforge.net/powerbar/db2/ >>>>>> _______________________________________________ >>>>>> Jump-pilot-devel mailing list >>>>>> Jum...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>>>>> >>>>>> =20 >>>>>> >>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>> =20 >>>>> >>>>> =20 >>>>> =20 >>>>> =20 >>>>> =20 >>>> --------------------------------------------------------------------= ----- >>>> This SF.net email is sponsored by DB2 Express >>>> Download DB2 Express C - the FREE version of DB2 express and take >>>> control of your XML. No limits. Just data. Click to get it now. >>>> http://sourceforge.net/powerbar/db2/ >>>> _______________________________________________ >>>> Jump-pilot-devel mailing list >>>> Jum...@li... >>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>>> >>>> =20 >>>> =20 >>>> =20 >>>> =20 >>> =20 >>> =20 >>> =20 >> >> ----------------------------------------------------------------------= --- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jum...@li... >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> =20 >> =20 > > =20 |