/** * <p> * An axis-aligned coarse representation of the detected text's location on the image. * </p> * * @param boundingBox * An axis-aligned coarse representation of the detected text's location on the image. * @return Returns a reference to this object so that method calls can be chained together. */ public Geometry withBoundingBox(BoundingBox boundingBox) { setBoundingBox(boundingBox); return this; }
if (context.testExpression("BoundingBox", targetDepth)) { context.nextToken(); geometry.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance().unmarshall(context));
public Geometry unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Geometry geometry = new Geometry(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("BoundingBox")) { geometry.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Polygon")) { geometry.setPolygon(new ListUnmarshaller<Point>(PointJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return geometry; }