@Test public void testCreate() throws Exception { assertTrue( SolrSpatialStrategy.createStrategy(newDescriptor(null)) instanceof DefaultStrategy); assertTrue( SolrSpatialStrategy.createStrategy( newDescriptor( "org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType")) instanceof DefaultStrategy); assertTrue( SolrSpatialStrategy.createStrategy( newDescriptor("org.apache.solr.schema.LatLonType")) instanceof DefaultStrategy); assertTrue( SolrSpatialStrategy.createStrategy( newDescriptor("org.apache.solr.schema.BBoxField")) instanceof BBoxStrategy); assertTrue( SolrSpatialStrategy.createStrategy( newDescriptor("org.apache.solr.spatial.pending.BBoxFieldType")) instanceof BBoxStrategy); }
static SolrSpatialStrategy createStrategy(GeometryDescriptor att) { String solrType = (String) att.getUserData().get(SolrFeatureSource.KEY_SOLR_TYPE); if (solrType != null && solrType.contains("BBoxField")) { return BBOX; } return DEFAULT; }
SolrSpatialStrategy { static SolrSpatialStrategy createStrategy(GeometryDescriptor att) { String solrType = (String) att.getUserData().get(SolrFeatureSource.KEY_SOLR_TYPE); if (solrType != null && solrType.contains("BBoxField")) { return BBOX; } return DEFAULT; } }
SolrSpatialStrategy { static SolrSpatialStrategy createStrategy(GeometryDescriptor att) { String solrType = (String) att.getUserData().get(SolrFeatureSource.KEY_SOLR_TYPE); if (solrType != null && solrType.contains("BBoxField")) { return BBOX; } return DEFAULT; }  }
SolrSpatialStrategy { static SolrSpatialStrategy createStrategy(GeometryDescriptor att) { String solrType = (String) att.getUserData().get(SolrFeatureSource.KEY_SOLR_TYPE); if (solrType != null && solrType.contains("BBoxField")) { return BBOX; } return DEFAULT; }  abstract String encode(Geometry geometry); abstract Geometry decode(String str); }
SolrSpatialStrategy { static SolrSpatialStrategy createStrategy(GeometryDescriptor att) { String solrType = (String) att.getUserData().get(SolrFeatureSource.KEY_SOLR_TYPE); if (solrType != null && solrType.contains("BBoxField")) { return BBOX; } return DEFAULT; }  abstract String encode(Geometry geometry); abstract Geometry decode(String str);  }