Michael:

You wrote: "Can you explain what Feature#clone(int id) does ?
Does it create a distinct instance with the same FID ?
Is it safe to authorize that ?"

I probably wouldn't port this method directly to OJ. In JUMP-Lib you do a
lot of cloning because features are immutable (that is part of what makes
them threadsafe). That is why a clone method that allows the same Feature
ID is necessary in JUMP-Lib. I'll have to think about how to best handle a
clone method in OJ where the feature ID is automatically generated. This ID
must be generated in the feature collection in OJ.

You wrote: "Can you explain why you add a argOrderOfAttributesMatters
argument
in FeatureSchema#clone and not in FeatureSchema#equals where it
would make more sense to me."

I might have had a type somewhere. In the source code FeatureSchema.clone()
doesn't take a boolean.

Landon



On Tue, Jul 2, 2013 at 1:08 PM, Michaël Michaud <michael.mich...@free.fr>wrote:

>  Hi Landon,
>
> +1 for adding unit tests,
> before adding a method into a core class, I would wonder if it is useful
> for OJ core or for a plugin though.
> If it is only useful for testing, maybe it should be added in the unit
> testing package.
>
> Can you explain what Feature#clone(int id) does ?
> Does it create a distinct instance with the same FID ?
> Is it safe to authorize that ?
>  Can you explain why you add a argOrderOfAttributesMatters argument
> in FeatureSchema#clone and not in FeatureSchema#equals where it
> would make more sense to me.
>
> Michaël
>
> Stefan:
>
>  I'll take a look at the classes in the package you mentioned to make
> sure I'm not duplicating code.
>
> Landon
>
>
>  On Tue, Jul 2, 2013 at 9:04 AM, Stefan Steiniger <sst...@geo.uzh.ch>wrote:
>
>> Hi Landon,
>>
>> there are actually a couple of utility classes for handling
>> FeatureSchemas and Features... did you check if you are not duplicating
>> things?
>>
>> We got most of them from pirol.
>> These classes are in org.openjump.core.apitools.*
>>
>> cheers,
>> stefan
>>
>>
>> Am 02.07.13 11:17, schrieb Landon Blake:
>> > Sounds good Ede. I'll add the commits on my list of things to do.
>> >
>> > Thanks for taking the time to review and comment.
>> >
>> > Landon
>> >
>> >
>> > On Tue, Jul 2, 2013 at 5:21 AM, <edgar.sol...@web.de
>>  > <mailto:edgar.sol...@web.de>> wrote:
>> >
>> >     sounds good to me, especially the 'not breaking' part. let's see
>> >     what you commit, maybe we eventually get our builds unit checked if
>> >     i find time to implement that.
>> >
>> >     ..ede
>> >
>> >     On 02.07.2013 03:57, Landon Blake wrote:
>> >      > Ede:
>> >      >
>> >      > Let me see if I can provide a little more information.
>> >      >
>> >      > I'm proposing the addition of a few utility methods to the
>> >     Feature and FeatureSchema classes/interfaces. This include methods
>> >     to clone, compare, and convert the objects to Strings. These are all
>> >     pretty standard Java utility methods that I try to implement on
>> >     almost all of my classes.
>> >      >
>> >      > None of these new methods break the current OpenJUMP API.
>> >      >
>> >      > Having said that, none of these methods are essential, and they
>> >     don't fix any bugs. I implemented them because they made unit
>> >     testing easier.
>> >      >
>> >      > I'm also proposing to add adaptations of my JUnit text cases for
>> >     the Feature and FeatureSchema classes/interfaces. The reason for
>> >     this is simple: We don't do very much unit testing in the OpenJUMP
>> >     core, and we should. (This is just a first baby step in this
>> >     direction. I'd like to continue committing unit tests for the
>> >     OpenJUMP core as I can develop as part of the code I write.)
>> >      >
>> >      > Neither the utility methods or the unit tests are critical
>> >     changes. I'm just trying to be a good citizen by pushing some of my
>> >     improvements from JUMP-Lib back upstream to OpenJUMP.
>> >      >
>> >      > No hard feelings if the community decides these changes aren't
>> >     improvements. :]
>> >      >
>> >      > Thanks.
>> >      >
>> >      > Landon
>> >      >
>> >      >
>> >      > On Thu, Jun 27, 2013 at 1:36 AM, <edgar.sol...@web.de
>>  >     <mailto:edgar.sol...@web.de> <mailto:edgar.sol...@web.de
>>  >     <mailto:edgar.sol...@web.de>>> wrote:
>> >      >
>> >      >     On 27.06.2013 05 <27.06.2013%2005> <tel:27.06.2013%2005>
>> >     <tel:27.06.2013%2005>:15, Landon Blake wrote:
>> >      >     > I'd like to port some features from JUMP-Lib to OpenJUMP.
>> >     These features are listed here:
>> >      >     >
>> >      >     >
>> >
>> http://openjumpblog.wordpress.com/2013/06/27/improvements-from-jump-lib-for-openjump/
>> >      >     >
>> >      >     > What do you guys think?
>> >      >     >
>> >      >     > I'm basically adding some standard utility methods to the
>> >     Feature/BasicFeature and FeatureSchema. I'd also like to add some
>> >     JUnit tests for Feature/BasicFeature and FeatureSchema to a testing
>> >     package.
>> >      >     >
>> >      >     > If there are no strong objections, I can start the work of
>> >     porting the features one at a time, and post here after each commit
>> >     so the other programmers can review the changes.
>> >      >     >
>> >      >
>> >      >     could you describe what the advantages of these changes
>> >     mentioned on the blog page are? point by point?
>> >      >
>> >      >     ..ede
>> >      >
>> >      >
>> >
>> ------------------------------------------------------------------------------
>> >      >     This SF.net email is sponsored by Windows:
>> >      >
>> >      >     Build for Windows Store.
>> >      >
>> >      > http://p.sf.net/sfu/windows-dev2dev
>> >      >     _______________________________________________
>> >      >     Jump-pilot-devel mailing list
>> >      > Jump-pilot-devel@lists.sourceforge.net
>> >     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>>  >     <mailto:Jump-pilot-devel@lists.sourceforge.net
>>  >     <mailto:Jump-pilot-devel@lists.sourceforge.net>>
>> >      > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >      >
>> >      >
>> >      >
>> >      >
>> >      >
>> >
>> ------------------------------------------------------------------------------
>> >      > This SF.net email is sponsored by Windows:
>> >      >
>> >      > Build for Windows Store.
>> >      >
>> >      > http://p.sf.net/sfu/windows-dev2dev
>> >      >
>> >      >
>> >      >
>> >      > _______________________________________________
>> >      > Jump-pilot-devel mailing list
>> >      > Jump-pilot-devel@lists.sourceforge.net
>> >     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>> >      > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >      >
>> >
>> >
>> ------------------------------------------------------------------------------
>> >     This SF.net email is sponsored by Windows:
>> >
>> >     Build for Windows Store.
>> >
>> >     http://p.sf.net/sfu/windows-dev2dev
>> >     _______________________________________________
>> >     Jump-pilot-devel mailing list
>> >     Jump-pilot-devel@lists.sourceforge.net
>> >     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>> >     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >
>> >
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > This SF.net email is sponsored by Windows:
>> >
>> > Build for Windows Store.
>> >
>> > http://p.sf.net/sfu/windows-dev2dev
>> >
>> >
>> >
>> > _______________________________________________
>> > Jump-pilot-devel mailing list
>> > Jump-pilot-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
> http://p.sf.net/sfu/windows-dev2dev
>
>
>
> _______________________________________________
> Jump-pilot-devel mailing 
> listJump-pilot-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to