public Envelope unmarshalEnvelope(EnvelopeType src) { Envelope dest = new Envelope(); if (src.isSetLowerCorner()) dest.setLowerCorner(unmarshalDirectPosition(src.getLowerCorner())); if (src.isSetUpperCorner()) dest.setUpperCorner(unmarshalDirectPosition(src.getUpperCorner())); if (src.isSetCoord()) { for (CoordType coord : src.getCoord()) dest.addCoord(unmarshalCoord(coord)); } if (src.isSetPos()) { for (DirectPositionType pos : src.getPos()) dest.addPos(unmarshalDirectPosition(pos)); } if (src.isSetCoordinates()) dest.setCoordinates(unmarshalCoordinates(src.getCoordinates())); if (src.isSetSrsName()) dest.setSrsName(src.getSrsName()); if (src.isSetSrsDimension()) dest.setSrsDimension(src.getSrsDimension().intValue()); if (src.isSetAxisLabels()) dest.setAxisLabels(src.getAxisLabels()); if (src.isSetUomLabels()) dest.setUomLabels(src.getUomLabels()); return dest; }
public EnvelopeType marshalEnvelope(Envelope src) { EnvelopeType dest = gml.createEnvelopeType(); if (src.isSetLowerCorner()) dest.setLowerCorner(marshalDirectPosition(src.getLowerCorner())); if (src.isSetUpperCorner()) dest.setUpperCorner(marshalDirectPosition(src.getUpperCorner())); if (src.isSetCoord()) { for (Coord coord : src.getCoord()) dest.getCoord().add(marshalCoord(coord)); } if (src.isSetPos()) { for (DirectPosition pos : src.getPos()) dest.getPos().add(marshalDirectPosition(pos)); } if (src.isSetCoordinates()) dest.setCoordinates(marshalCoordinates(src.getCoordinates())); if (src.isSetSrsName()) dest.setSrsName(src.getSrsName()); if (src.isSetSrsDimension()) dest.setSrsDimension(BigInteger.valueOf(src.getSrsDimension())); if (src.isSetAxisLabels()) dest.setAxisLabels(src.getAxisLabels()); if (src.isSetUomLabels()) dest.setUomLabels(src.getUomLabels()); return dest; }