import org.argeo.jcr.gis.GisNames;
import org.argeo.jcr.gis.GisTypes;
import org.argeo.jts.jcr.JtsJcrUtils;
-import org.argeo.security.SystemExecutionService;
import org.geotools.data.DataStore;
import org.geotools.data.DefaultTransaction;
import org.geotools.data.FeatureStore;
// TODO: use common factory finder?
private FilterFactory2 ff = new FilterFactoryImpl();
+ /** Expects to execute with system authentication */
public void init() {
- systemExecutionService.execute(new Runnable() {
- public void run() {
- initGeoJcrIndex();
- }
- });
+ if (systemExecutionService != null)// legacy
+ systemExecutionService.execute(new Runnable() {
+ public void run() {
+ initGeoJcrIndex();
+ }
+ });
+ else
+ initGeoJcrIndex();
}
protected void initGeoJcrIndex() {
if (node.isNodeType(GIS_LOCATED)) {
locatedNode = node;
} else if (node.isNodeType(GIS_INDEXED)) {
- locatedNode = findLocatedparent(node);
+ locatedNode = findLocatedParent(node);
} else {
throw new ArgeoException("Unsupported node " + node);
}
}
}
- protected Node findLocatedparent(Node child) {
+ protected Node findLocatedParent(Node child) {
try {
if (child.getParent().isNodeType(GIS_LOCATED))
return child.getParent();
else
- return findLocatedparent(child.getParent());
+ return findLocatedParent(child.getParent());
} catch (Exception e) {
// also if child is root node
throw new ArgeoException("Cannot find located parent", e);
this.session = session;
}
- public void setSystemExecutionService(
- Executor systemExecutionService) {
+ public void setSystemExecutionService(Executor systemExecutionService) {
this.systemExecutionService = systemExecutionService;
}