[
https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16104302#comment-16104302
]
ASF GitHub Bot commented on RYA-324:
------------------------------------
Github user pujav65 commented on a diff in the pull request:
https://github.com/apache/incubator-rya/pull/182#discussion_r129997867
--- Diff:
extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/GeoIndexerType.java
---
@@ -31,31 +28,49 @@
/**
* Geo Mesa based indexer.
*/
- GEO_MESA(GeoMesaGeoIndexer.class),
+ GEO_MESA("org.apache.rya.indexing.accumulo.geo.GeoMesaGeoIndexer"),
/**
* Geo Wave based indexer.
*/
- GEO_WAVE(GeoWaveGeoIndexer.class),
+ GEO_WAVE("org.apache.rya.indexing.accumulo.geo.GeoWaveGeoIndexer"),
/**
* MongoDB based indexer.
*/
- MONGO_DB(MongoGeoIndexer.class);
+ MONGO_DB("org.apache.rya.indexing.mongodb.geo.MongoGeoIndexer"),
+
+
MONGO_GEO_TEMPORAL("org.apache.rya.indexing.geotemporal.mongo.MongoGeoTemporalIndexer"),
+
MONGO_GEO_TEMPORAL_OPTIMIZER("org.apache.rya.indexing.geotemporal.GeoTemporalOptimizer");
- private Class<? extends GeoIndexer> geoIndexerClass;
+ //private Class<? extends GeoIndexer> geoIndexerClass;
+ private String geoIndexerClassString;
/**
* Creates a new {@link GeoIndexerType}.
* @param geoIndexerClass the {@link GeoIndexer} {@link Class}.
* (not {@code null})
*/
- private GeoIndexerType(final Class<? extends GeoIndexer>
geoIndexerClass) {
- this.geoIndexerClass = checkNotNull(geoIndexerClass);
+ private GeoIndexerType(final String geoIndexerClassString) {
+ this.geoIndexerClassString = checkNotNull(geoIndexerClassString);
}
/**
* @return the {@link GeoIndexer} {@link Class}. (not {@code null})
*/
- public Class<? extends GeoIndexer> getGeoIndexerClass() {
- return geoIndexerClass;
- }
+ public String getGeoIndexerClassString() {
+
+ return geoIndexerClassString;
+ }
+
+ /**
+ * @return True if the class exists on the classpath.
+ */
+ public boolean isOnClassPath() {
+ try {
+ Class.forName(geoIndexerClassString, false,
this.getClass().getClassLoader());
--- End diff --
I agree. A factory seems like a better pattern, it seems like we could be
doing something more elegant here.
> geoWave and geoMesa depend on different versions of the GeoTools
> ----------------------------------------------------------------
>
> Key: RYA-324
> URL: https://issues.apache.org/jira/browse/RYA-324
> Project: Rya
> Issue Type: Bug
> Components: sail
> Affects Versions: 3.2.10
> Reporter: David W. Lotts
> Assignee: David W. Lotts
> Labels: dependencies, geo, refactor
> Fix For: 3.2.10
>
>
> Refactored geo libraries into separate projects/modules/jars.
> Geo libraries are optional and turned off by default because the GeoTools is
> has an incompatible license.
> Further, geoWave and geoMesa depend on different versions of the GeoTools, so
> they must be in separate projects.
> The new modules (projects) are
> geo.common
> geo.mongo
> geo.geomesa
> geo.geowave
> These are modules of the project rya.geoindexing
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)