public void run() { if (Thread.currentThread().isInterrupted()) return; // the task was cancelled because it's a duplicate or for some other reason try { this.placemark.retrieveModel(this.address); } catch (IOException e) { String message = Logging.getMessage("generic.ExceptionWhileReading", e.getMessage()); Logging.logger().warning(message); } catch (XMLStreamException e) { String message = Logging.getMessage("generic.ExceptionAttemptingToParseXml", e.getMessage()); Logging.logger().warning(message); } }
/** * Construct a request task for a specified network link resource. * * @param placemark the placemark for which to construct the request task. * @param address the address of the resource to request. */ protected RequestTask(KMLModelPlacemarkImpl placemark, String address) { if (placemark == null) { String message = Logging.getMessage("nullValue.ObjectIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message); } if (address == null) { String message = Logging.getMessage("nullValue.PathIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message); } this.placemark = placemark; this.address = address; }
/** * Create an instance. * * @param tc the current {@link KMLTraversalContext}. * @param placemark the <i>Placemark</i> element containing the <i>Point</i>. * @param geom the {@link gov.nasa.worldwind.ogc.kml.KMLPoint} geometry. * @throws NullPointerException if the geometry is null. * @throws IllegalArgumentException if the parent placemark or the traversal context is null. */ public KMLModelPlacemarkImpl( KMLTraversalContext tc, KMLPlacemark placemark, KMLAbstractGeometry geom) { if (tc == null) { String msg = Logging.getMessage("nullValue.TraversalContextIsNull"); Logging.logger().severe(msg); throw new IllegalArgumentException(msg); } if (placemark == null) { String msg = Logging.getMessage("nullValue.ParentIsNull"); Logging.logger().severe(msg); throw new IllegalArgumentException(msg); } if (geom == null) { String msg = Logging.getMessage("nullValue.GeometryIsNull"); Logging.logger().severe(msg); throw new IllegalArgumentException(msg); } this.model = (KMLModel) geom; this.parent = placemark; this.resourceMap = this.createResourceMap(this.model); }