pos.setAttributeValue("radius", position.getRadius().toString());
}
}
private static void addGmlPosition(Entry entry, Position position) {
ExtensibleElement pos = entry.addExtension(QNAME_WHERE);
if (position instanceof Point) {
Point point = (Point) position;
ExtensibleElement p = pos.addExtension(QNAME_GML_POINT);
p.addSimpleExtension(QNAME_GML_POS, point.getCoordinate().toString());
} else if (position instanceof Line) {
Multiple m = (Multiple) position;
ExtensibleElement p = pos.addExtension(QNAME_GML_LINESTRING);
p.addSimpleExtension(QNAME_GML_POSLIST, m.getCoordinates().toString());
} else if (position instanceof Polygon) {
Multiple m = (Multiple) position;
ExtensibleElement p = pos.addExtension(QNAME_GML_POLYGON);
p = p.addExtension(QNAME_GML_EXTERIOR);
p = p.addExtension(QNAME_GML_LINEARRING);
p.addSimpleExtension(QNAME_GML_POSLIST, m.getCoordinates().toString());
} else if (position instanceof Box) {
Box m = (Box) position;
ExtensibleElement p = pos.addExtension(QNAME_GML_ENVELOPE);
if (m.getLowerCorner() != null)
p.addSimpleExtension(QNAME_GML_LOWERCORNER,m.getLowerCorner().toString());
if (m.getUpperCorner() != null)
p.addSimpleExtension(QNAME_GML_UPPERCORNER, m.getUpperCorner().toString());
}
setPositionAttributes(pos,position);
}