public KMLLink getNetworkLink() { if (!this.linkFetched) { this.linkFetched = true; this.link = (KMLLink)this.getField("Link"); } return(this.link); }
/** * Returns this <code>NetworkLink's</code> <code>Link</code> element or its <code>Url</code> element, depending on * which is available. <code>Link</code> is the preferred method for encoding a <code>NetworkLink</code> since KML * version 2.1, therefore we give it priority. If a <code>Link</code> is not specified, the deprecated * <code>Url</code> element is returned. * * @return this <code>NetworkLink's</code> <code>Link</code> element, if one is specified. Otherwise, this * <code>NetworkLink's</code> <code>Url</code> element. Returns <code>null</code> if neither * <code>Link</code> or a <code>Url</code> are specified. */ protected KMLLink getLinkOrUrl() { KMLLink link = this.getNetworkLink(); if (link != null) { return(link); } return(this.getUrl()); }
public void onMessage(Message msg) { KMLLink link = this.getLinkOrUrl(); if (link != null) { link.onMessage(msg); } KMLRoot networkResource = this.getNetworkResource(); if (networkResource != null) { networkResource.onMessage(msg); } }