Understanding Java reference material; World Wind Network Link

211 views Asked by At

I'm struggling with how to make this question Stack Overflow-appropriate, so if I fail I'm sorry.

I'm not the best Java developer, obviously, but I'm trying to learn and currently have a project built that uses NASA's World Wind. They have what appears to be very good documentation on how to use their existing code. However, my inexperience is disabling.

Specifically, I am looking at this function: http://builds.worldwind.arc.nasa.gov/worldwind-releases/1.5/docs/api/gov/nasa/worldwind/ogc/kml/KMLNetworkLink.html

I'm trying to establish a Network Link to a KML that updates based on some interval. That's very easy to do in Google Earth.

First of all, why are there "protected" "Fields"? The third one down under field summary is "KMLLink" which seems like it would be useful but I can't access it. Why would it be protected and why would they even bother to document things they don't expect users to access?

Furthermore, if anyone who can understand this reference material can help me establish a network link, that would be great.

                KMLNetworkLink net = new KMLNetworkLink("http://10.156.13.141:1337/KML/MyFlyTo.kml");
                net.setVisibility(true);
                System.out.println(net.getLink());
                System.out.println(net.getAddress());
                System.out.println(net.getCharacters());
                net.addFeature(net);

This does nothing. It returns null for all the print lines, and I don't know why. I have a server running and I have verified that that link is appropriate. The documentation says the KMLNetworkLink wants a URI reference, which means nothing to me.

Thanks for your help, stackies.

1

There are 1 answers

3
arcy On

You've asked several questions and no one else is jumping in, so I'll do what I can.

There are "protected" fields for use by classes which extend this class -- that is the level at which a protected field would be visible. The fact that it's protected indicates that they DO expect users to access it, but from a class extending this one.

I cannot, unfortunately, tell you what's wrong with your call. I find it curious that, although this is not working, you state that you have "verified that that link is appropriate" -- how did you verify that? I'm not saying you're wrong, I just don't know.

The way to find out what a "URI reference" means is to search further in the KML doc and/or put it into Google.