/** * 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 gml:Envelope by copying from the given box. This calls the * {@link #GmlEnvelope(Point, Point)} constructor with the points in the box, * or with nulls if the box itself is null. */ public GmlEnvelope(Box box) { this(box == null ? null : box.getLowerLeft(), box == null ? null : box.getUpperRight()); }
/** * Creates an immutable instance of GeoLong extension with the coordinate * set to the value passed in. * * @param lon The longitude coordinate reprensented by this element. * @throws IllegalArgumentException if the longitude is not between * -180 and 180 degrees. */ public GeoLong(Double lon) throws IllegalArgumentException { super(Namespaces.W3C_GEO_NAMESPACE, "long", null, null); setRequired(true); if (lon != null) { setLongitude(lon); setImmutable(true); } }
/** * Creates an immutable instance of GeoLat extension with the coordinate * set to the value passed in. * * @param lat The latitude coordinate reprensented by this element. * @throws IllegalArgumentException if the the latitude is not between * -90 and 90. */ public GeoLat(Double lat) throws IllegalArgumentException { super(Namespaces.W3C_GEO_NAMESPACE, "lat", null, null); setRequired(true); if (lat != null) { setLatitude(lat); setImmutable(true); } }
/** * 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()); }
/** * Creates an immutable instance of GeoLat extension with the coordinate * set to the value passed in. * * @param lat The latitude coordinate reprensented by this element. * @throws IllegalArgumentException if the the latitude is not between * -90 and 90. */ public GeoLat(Double lat) throws IllegalArgumentException { super(Namespaces.W3C_GEO_NAMESPACE, "lat", null, null); setRequired(true); if (lat != null) { setLatitude(lat); setImmutable(true); } }
/** * Constructs a gml:Envelope by copying from the given box. This calls the * {@link #GmlEnvelope(Point, Point)} constructor with the points in the box, * or with nulls if the box itself is null. */ public GmlEnvelope(Box box) { this(box == null ? null : box.getLowerLeft(), box == null ? null : box.getUpperRight()); }
/** * Creates an immutable instance of GeoLong extension with the coordinate * set to the value passed in. * * @param lon The longitude coordinate reprensented by this element. * @throws IllegalArgumentException if the longitude is not between * -180 and 180 degrees. */ public GeoLong(Double lon) throws IllegalArgumentException { super(Namespaces.W3C_GEO_NAMESPACE, "long", null, null); setRequired(true); if (lon != null) { setLongitude(lon); setImmutable(true); } }
/** * 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()); }
/** * Creates an immutable instance of GeoLat extension with the coordinate * set to the value passed in. * * @param lat The latitude coordinate reprensented by this element. * @throws IllegalArgumentException if the the latitude is not between * -90 and 90. */ public GeoLat(Double lat) throws IllegalArgumentException { super(Namespaces.W3C_GEO_NAMESPACE, "lat", null, null); setRequired(true); if (lat != null) { setLatitude(lat); setImmutable(true); } }
/** * Constructs a georss:box element by copying the data from the given box. * Will call the {@link #GeoRssBox(Point, Point)} constructor with the parts * of the passed in box, or with nulls if the box itself is null. */ public GeoRssBox(Box box) { this(box == null ? null : box.getLowerLeft(), box == null ? null : box.getUpperRight()); }
/** * 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 georss:box element by copying the data from the given box. * Will call the {@link #GeoRssBox(Point, Point)} constructor with the parts * of the passed in box, or with nulls if the box itself is null. */ public GeoRssBox(Box box) { this(box == null ? null : box.getLowerLeft(), box == null ? null : box.getUpperRight()); }
@Override public String toString() { if (lowerLeft != null && upperRight != null) { return lowerLeft.getLatitude() + " " + lowerLeft.getLongitude() + " " + upperRight.getLatitude() + " " + upperRight.getLongitude(); } return null; }
/** * Constructs a gml:Envelope by copying from the given box. This calls the * {@link #GmlEnvelope(Point, Point)} constructor with the points in the box, * or with nulls if the box itself is null. */ public GmlEnvelope(Box box) { this(box == null ? null : box.getLowerLeft(), box == null ? null : box.getUpperRight()); }
/** * 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 georss:box element by copying the data from the given box. * Will call the {@link #GeoRssBox(Point, Point)} constructor with the parts * of the passed in box, or with nulls if the box itself is null. */ public GeoRssBox(Box box) { this(box == null ? null : box.getLowerLeft(), box == null ? null : box.getUpperRight()); }
/** * 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; }