} else if (localName.equals("Placemark")) { this.in_placemarktag = true; navigationDataSet.setCurrentPlacemark(new Placemark()); } else if (localName.equals("name")) { this.in_nametag = true; public void characters(char ch[], int start, int length) { if(this.in_nametag){ if (navigationDataSet.getCurrentPlacemark()==null) navigationDataSet.setCurrentPlacemark(new Placemark()); navigationDataSet.getCurrentPlacemark().setTitle(new String(ch, start, length)); } else if(this.in_descriptiontag){ if (navigationDataSet.getCurrentPlacemark()==null) navigationDataSet.setCurrentPlacemark(new Placemark()); navigationDataSet.getCurrentPlacemark().setDescription(new String(ch, start, length)); } else if(this.in_coordinatestag){ if (navigationDataSet.getCurrentPlacemark()==null) navigationDataSet.setCurrentPlacemark(new Placemark());
public static Object unmarshallWithFilter(Unmarshaller unmarshaller, java.io.File source) throws FileNotFoundException, JAXBException { FileReader fr = null; try { fr = new FileReader(source); XMLReader reader = new NamespaceFilterXMLReader(); InputSource is = new InputSource(fr); SAXSource ss = new SAXSource(reader, is); return unmarshaller.unmarshal(ss); } catch (SAXException e) { //not technically a jaxb exception, but close enough throw new JAXBException(e); } catch (ParserConfigurationException e) { //not technically a jaxb exception, but close enough throw new JAXBException(e); } finally { FileUtil.close(fr); //replace with this some safe close method you have } }
private void encodeSequentialNetworkLink(Folder folder, String linkbase, int start, int maxFeatures, String id, String readableName) { NetworkLink nl = folder.createAndAddNetworkLink(); Link link = nl.createAndSetLink(); link.setHref(linkbase + "?startindex=" + start + "&maxfeatures=" + maxFeatures); nl.setDescription(readableName); nl.setId(id); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((iconStyle == null)? 0 :iconStyle.hashCode())); result = ((prime*result)+((labelStyle == null)? 0 :labelStyle.hashCode())); result = ((prime*result)+((lineStyle == null)? 0 :lineStyle.hashCode())); result = ((prime*result)+((polyStyle == null)? 0 :polyStyle.hashCode())); result = ((prime*result)+((balloonStyle == null)? 0 :balloonStyle.hashCode())); result = ((prime*result)+((listStyle == null)? 0 :listStyle.hashCode())); result = ((prime*result)+((styleSimpleExtension == null)? 0 :styleSimpleExtension.hashCode())); result = ((prime*result)+((styleObjectExtension == null)? 0 :styleObjectExtension.hashCode())); return result; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((altitudeMode == null)? 0 :altitudeMode.hashCode())); result = ((prime*result)+((location == null)? 0 :location.hashCode())); result = ((prime*result)+((orientation == null)? 0 :orientation.hashCode())); result = ((prime*result)+((scale == null)? 0 :scale.hashCode())); result = ((prime*result)+((link == null)? 0 :link.hashCode())); result = ((prime*result)+((resourceMap == null)? 0 :resourceMap.hashCode())); result = ((prime*result)+((modelSimpleExtension == null)? 0 :modelSimpleExtension.hashCode())); result = ((prime*result)+((modelObjectExtension == null)? 0 :modelObjectExtension.hashCode())); return result; }
void addRegion(Feature container, Envelope box, int minLodPixels, int maxLodPixels) { Region region = container.createAndSetRegion(); Lod lod = region.createAndSetLod(); lod.setMinLodPixels(minLodPixels); lod.setMaxLodPixels(maxLodPixels); LatLonAltBox llaBox = region.createAndSetLatLonAltBox(); setEnvelope(box, llaBox); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((latLonAltBox == null)? 0 :latLonAltBox.hashCode())); result = ((prime*result)+((lod == null)? 0 :lod.hashCode())); result = ((prime*result)+((regionSimpleExtension == null)? 0 :regionSimpleExtension.hashCode())); result = ((prime*result)+((regionObjectExtension == null)? 0 :regionObjectExtension.hashCode())); return result; }
/** * fluent setter * @see #setViewRefreshMode(ViewRefreshMode) * * @param viewRefreshMode * required parameter */ public Icon withViewRefreshMode(final ViewRefreshMode viewRefreshMode) { this.setViewRefreshMode(viewRefreshMode); return this; }
/** * Encodes a transparent KML LabelStyle */ protected void setDefaultLabelStyle(Style style) { LabelStyle ls = style.createAndSetLabelStyle(); ls.setColor("00ffffff"); }
/** * Create an instance of {@link ListStyle} * */ public static ListStyle createListStyle() { return new ListStyle(); }
/** * Create an instance of {@link Style} * */ public static Style createStyle() { return new Style(); }
/** * fluent setter * @see #setHotSpot(Vec2) * * @param hotSpot * required parameter */ public IconStyle withHotSpot(final Vec2 hotSpot) { this.setHotSpot(hotSpot); return this; }
/** * fluent setter * @see #setIconStyleObjectExtension(List<AbstractObject>) * * @param iconStyleObjectExtension * required parameter */ public IconStyle withIconStyleObjectExtension(final List<AbstractObject> iconStyleObjectExtension) { this.setIconStyleObjectExtension(iconStyleObjectExtension); return this; }
/** * fluent setter * @see #setRefreshMode(RefreshMode) * * @param refreshMode * required parameter */ public Icon withRefreshMode(final RefreshMode refreshMode) { this.setRefreshMode(refreshMode); return this; }
/** * fluent setter * @see #setViewRefreshTime(double) * * @param viewRefreshTime * required parameter */ public Icon withViewRefreshTime(final double viewRefreshTime) { this.setViewRefreshTime(viewRefreshTime); return this; }
/** * fluent setter * @see #setLatLonBox(LatLonBox) * * @param latLonBox * required parameter */ public GroundOverlay withLatLonBox(final LatLonBox latLonBox) { this.setLatLonBox(latLonBox); return this; }
/** * fluent setter * @see #setGroundOverlaySimpleExtension(List<Object>) * * @param groundOverlaySimpleExtension * required parameter */ public GroundOverlay withGroundOverlaySimpleExtension(final List<Object> groundOverlaySimpleExtension) { this.setGroundOverlaySimpleExtension(groundOverlaySimpleExtension); return this; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((iconStyle == null)? 0 :iconStyle.hashCode())); result = ((prime*result)+((labelStyle == null)? 0 :labelStyle.hashCode())); result = ((prime*result)+((lineStyle == null)? 0 :lineStyle.hashCode())); result = ((prime*result)+((polyStyle == null)? 0 :polyStyle.hashCode())); result = ((prime*result)+((balloonStyle == null)? 0 :balloonStyle.hashCode())); result = ((prime*result)+((listStyle == null)? 0 :listStyle.hashCode())); result = ((prime*result)+((styleSimpleExtension == null)? 0 :styleSimpleExtension.hashCode())); result = ((prime*result)+((styleObjectExtension == null)? 0 :styleObjectExtension.hashCode())); return result; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((altitudeMode == null)? 0 :altitudeMode.hashCode())); result = ((prime*result)+((location == null)? 0 :location.hashCode())); result = ((prime*result)+((orientation == null)? 0 :orientation.hashCode())); result = ((prime*result)+((scale == null)? 0 :scale.hashCode())); result = ((prime*result)+((link == null)? 0 :link.hashCode())); result = ((prime*result)+((resourceMap == null)? 0 :resourceMap.hashCode())); result = ((prime*result)+((modelSimpleExtension == null)? 0 :modelSimpleExtension.hashCode())); result = ((prime*result)+((modelObjectExtension == null)? 0 :modelObjectExtension.hashCode())); return result; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((latLonAltBox == null)? 0 :latLonAltBox.hashCode())); result = ((prime*result)+((lod == null)? 0 :lod.hashCode())); result = ((prime*result)+((regionSimpleExtension == null)? 0 :regionSimpleExtension.hashCode())); result = ((prime*result)+((regionObjectExtension == null)? 0 :regionObjectExtension.hashCode())); return result; }