use of com.revolsys.record.io.format.saif.geometry.ContourLineString in project com.revolsys.open by revolsys.
the class ContourConverter method write.
@Override
public void write(final OsnSerializer serializer, final Object object) throws IOException {
if (object instanceof LineString) {
final LineString line = (LineString) object;
serializer.startObject(GEOMETRY_CLASS);
serializer.fieldName("arc");
super.write(serializer, object);
serializer.endAttribute();
if (line instanceof ContourLineString) {
final ContourLineString contourLine = (ContourLineString) line;
final String form = contourLine.getForm();
attributeEnum(serializer, "form", form);
super.writeAttributes(serializer, (ArcLineString) line);
final int value = contourLine.getValue();
attributeEnum(serializer, "form", Integer.toString(value));
} else if (line instanceof ArcLineString) {
super.writeAttributes(serializer, (ArcLineString) line);
}
serializer.endObject();
}
}
Aggregations