/** * Copy constructor to create a point from another point. */ public PointConstruct(XmlNamespace namespace, String name, Point copyFrom) { this(namespace, name, copyFrom == null ? null : copyFrom.getLatitude(), copyFrom == null ? null : copyFrom.getLongitude()); }
/** * Copy constructor to create a point from another point. */ public PointConstruct(XmlNamespace namespace, String name, Point copyFrom) { this(namespace, name, copyFrom == null ? null : copyFrom.getLatitude(), copyFrom == null ? null : copyFrom.getLongitude()); }
/** * Constructs a geo:Point element copying the lat and lon values from the * given point. If the given point is null an empty geo:Point element will * be created. */ public W3CPoint(Point copyFrom) { this(copyFrom == null ? null : copyFrom.getLatitude(), copyFrom == null ? null : copyFrom.getLongitude()); }
/** * Copy constructor to create a point from another point. */ public PointConstruct(XmlNamespace namespace, String name, Point copyFrom) { this(namespace, name, copyFrom == null ? null : copyFrom.getLatitude(), copyFrom == null ? null : copyFrom.getLongitude()); }
@Override public String toString() { if (lowerLeft != null && upperRight != null) { return lowerLeft.getLatitude() + " " + lowerLeft.getLongitude() + " " + upperRight.getLatitude() + " " + upperRight.getLongitude(); } return null; }
/** * Constructs a geo:Point element copying the lat and lon values from the * given point. If the given point is null an empty geo:Point element will * be created. */ public W3CPoint(Point copyFrom) { this(copyFrom == null ? null : copyFrom.getLatitude(), copyFrom == null ? null : copyFrom.getLongitude()); }
/** * Constructs a geo:Point element copying the lat and lon values from the * given point. If the given point is null an empty geo:Point element will * be created. */ public W3CPoint(Point copyFrom) { this(copyFrom == null ? null : copyFrom.getLatitude(), copyFrom == null ? null : copyFrom.getLongitude()); }
@Override public String toString() { if (lowerLeft != null && upperRight != null) { return lowerLeft.getLatitude() + " " + lowerLeft.getLongitude() + " " + upperRight.getLatitude() + " " + upperRight.getLongitude(); } return null; }
@Override public String toString() { if (lowerLeft != null && upperRight != null) { return lowerLeft.getLatitude() + " " + lowerLeft.getLongitude() + " " + upperRight.getLatitude() + " " + upperRight.getLongitude(); } return null; }
/** * Sets the geo point of the extension passed in. This will first try to * replace any existing point information. If there is no existing point, then * it will simply add the point extension. * * @param ext The extension point to add the Point to. * @param point The new point information. */ public static void setPoint(ExtensionPoint ext, Point point) { Point existing = getPointExtension(ext); if (existing != null) { Double lat = point != null ? point.getLatitude() : null; Double lon = point != null ? point.getLongitude() : null; existing.setGeoLocation(lat, lon); } else if (point != null) { ext.setExtension(point); } }
/** * Sets the geo point of the extension passed in. This will first try to * replace any existing point information. If there is no existing point, then * it will simply add the point extension. * * @param ext The extension point to add the Point to. * @param point The new point information. */ public static void setPoint(ExtensionPoint ext, Point point) { Point existing = getPointExtension(ext); if (existing != null) { Double lat = point != null ? point.getLatitude() : null; Double lon = point != null ? point.getLongitude() : null; existing.setGeoLocation(lat, lon); } else if (point != null) { ext.setExtension(point); } }
/** * Sets the geo point of the extension passed in. This will first try to * replace any existing point information. If there is no existing point, then * it will simply add the point extension. * * @param ext The extension point to add the Point to. * @param point The new point information. */ public static void setPoint(ExtensionPoint ext, Point point) { Point existing = getPointExtension(ext); if (existing != null) { Double lat = point != null ? point.getLatitude() : null; Double lon = point != null ? point.getLongitude() : null; existing.setGeoLocation(lat, lon); } else if (point != null) { ext.setExtension(point); } }