Re: [OpenMap Users] Can private fields be changed to protected?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Thu, 21 Sep 2006 09:34:22 -0400

Hi John,

Sure, we can do that. Thanks for the heads-up.

- Don

On Sep 15, 2006, at 2:51 AM, Yesberg, John wrote:

> Hello,
>
> I want to modify the behaviour of the VPFLayer.
> Rather than change my copy of the openmap source, it seems better to
> subclassing classes from com.bbn.openmap.layer.vpf.
> (That way, I can simply update to the next release when it's
> available,
> and I just have to mess about with classpath.)
>
> This works well for me, except for the LibrarySelectionTable.
> The following fields are all private.
>
> /** the bounding rectangle of the respective libraries */
> private Map boundrec = new HashMap();// bounding rect as
> [W,S,E,N]
>
> /** the CoverageAttributeTables corresponding to the different
> libs */
> private Map CATs = new HashMap();
>
> /** the names of the lat columns */
> final private static String LATColumns[] = {
> Constants.LAT_LIBNAME, Constants.LAT_XMIN, Constants.LAT_YMIN,
> Constants.LAT_XMAX, Constants.LAT_YMAX };
>
> /** the expected schema types for the library attribute table */
> final private static char LATschematype[] = { 'T', 'F', 'F',
> 'F', 'F' };
>
> /** the expected schema lengths for the library attribute table
> */
> final private static int LATschemalength[] = { -1 /* 8 */, 1, 1,
> 1, 1 };
>
> /** the name of the database */
> private String databaseName;
>
> /** the database description of itself */
> private String databaseDesc;
>
> The last two have getter methods (getDatabaseName(),
> getDatabaseDescription()), but no setters.
> The others aren't accessible to my subclass.
> That means that when I copy (& modify) the "addDataPath" method, I
> can't
> access the fields I need.
> I've cheated by changing all these fields to 'protected' instead of
> 'private'.
>
> I think that it would be sensible either to make such fields
> protected,
> or to provide protected getters & setters.
>
> Does anyone else have any thoughts on the matter?
>
> John.
> --
> Dr John Yesberg
> Defence Science and Technology Organisation, Australia.
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Sep 21 2006 - 09:38:39 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT