@Test public void test_01() throws InvalidConditionException { QueryCondition qc = new QueryCondition(); qc.setField(new Path("gatheringEvent.siteCoordinates.geoShape")); qc.setOperator(ComparisonOperator.IN); MultiPolygon polygon = new MultiPolygon(); TypeReference<List<List<List<LngLatAlt>>>> typeRef = new TypeReference<List<List<List<LngLatAlt>>>>() {}; String s = "[ [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.35, 0.35], [100.65, 0.35], [100.65, 0.65], [100.35, 0.65], [100.35, 0.35] ] ] ]"; List<List<List<LngLatAlt>>> coords = JsonUtil.deserialize(s, typeRef); polygon.setCoordinates(coords); qc.setValue(polygon); ConditionTranslator translator = ConditionTranslatorFactory.getTranslator(qc, DocumentType.SPECIMEN); assertEquals("01",ShapeInShapeConditionTranslator.class, translator.getClass()); }
public static ConditionTranslator getTranslator(QueryCondition condition, DocumentType<?> type) throws InvalidConditionException { return getTranslator(condition, new MappingInfo<>(type.getMapping())); }
ConditionTranslatorFactory { public static ConditionTranslator getTranslator(QueryCondition condition, DocumentType<?> type) throws InvalidConditionException { return getTranslator(condition, new MappingInfo<>(type.getMapping())); } }
ConditionTranslatorFactory { public static ConditionTranslator getTranslator(QueryCondition condition, DocumentType<?> type) throws InvalidConditionException { return getTranslator(condition, new MappingInfo<>(type.getMapping())); } private  ConditionTranslatorFactory(); }
ConditionTranslatorFactory { public static ConditionTranslator getTranslator(QueryCondition condition, DocumentType<?> type) throws InvalidConditionException { return getTranslator(condition, new MappingInfo<>(type.getMapping())); } private  ConditionTranslatorFactory(); static ConditionTranslator getTranslator(QueryCondition condition, DocumentType<?> type); static ConditionTranslator getTranslator(QueryCondition condition,
			MappingInfo<?> mappingInfo); }
ConditionTranslatorFactory { public static ConditionTranslator getTranslator(QueryCondition condition, DocumentType<?> type) throws InvalidConditionException { return getTranslator(condition, new MappingInfo<>(type.getMapping())); } private  ConditionTranslatorFactory(); static ConditionTranslator getTranslator(QueryCondition condition, DocumentType<?> type); static ConditionTranslator getTranslator(QueryCondition condition,
			MappingInfo<?> mappingInfo);  }