
com.orientechnologies.spatial.shape.legacy.OShapeBuilderLegacyImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of orientdb-spatial Show documentation
Show all versions of orientdb-spatial Show documentation
Lucene plugin for OrientDB NoSQL document graph dbms
package com.orientechnologies.spatial.shape.legacy;
import com.orientechnologies.orient.core.index.OCompositeKey;
import com.spatial4j.core.context.SpatialContext;
import com.spatial4j.core.shape.Shape;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Enrico Risa on 23/10/15.
*/
public class OShapeBuilderLegacyImpl implements OShapeBuilderLegacy {
List builders = new ArrayList();
public static OShapeBuilderLegacyImpl INSTANCE = new OShapeBuilderLegacyImpl();
protected OShapeBuilderLegacyImpl() {
builders.add(new OPointLegecyBuilder());
builders.add(new ORectangleLegacyBuilder());
}
@Override
public Shape makeShape(OCompositeKey key, SpatialContext ctx) {
for (OShapeBuilderLegacy f : builders) {
if (f.canHandle(key)) {
return f.makeShape(key, ctx);
}
}
return null;
}
@Override
public boolean canHandle(OCompositeKey key) {
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy