public VisibilityProcessorDefinition() { try { PropertyDefinition procGpService = new PropertyDefinition( "gpservice", PropertyType.String, "", lblGPService, descGPService, true, false); propertyDefinitions.put(procGpService.getPropertyName(), procGpService); PropertyDefinition procImageService = new PropertyDefinition( "imageservice", PropertyType.String, "", lblElevService, descElevService, true, false); propertyDefinitions.put(procImageService.getPropertyName(), procImageService); List<LabeledValue> allowedObsSrc = new ArrayList<LabeledValue>(); allowedObsSrc.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.OBS_SRC_GEOEVENT}", "Geoevent")); allowedObsSrc.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.OBS_SRC_FIELD}", "Field")); PropertyDefinition procObserverSource = new PropertyDefinition( "observerSource", PropertyType.String, "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.OBS_SRC_GEOEVENT}", lblObsSrc, descObsSrc, true, false, allowedObsSrc); propertyDefinitions.put(procObserverSource.getPropertyName(), procObserverSource); PropertyDefinition procObserverX = new PropertyDefinition( "observerX", PropertyType.Double, 0.0, lblObsX, descObsX, true, false); procObserverX.setDependsOn("observerSource=Constant"); propertyDefinitions.put(procObserverX.getPropertyName(), procObserverX); PropertyDefinition procObserverY = new PropertyDefinition( "observerY", PropertyType.Double, 0.0, lblObsY, descObsY, true, false); procObserverY.setDependsOn("observerSource=Constant"); propertyDefinitions.put(procObserverY.getPropertyName(), procObserverY); PropertyDefinition procEventX = new PropertyDefinition( "observerXEvent", PropertyType.String, "", lblObsXFld, descObsXFld, true, false); procEventX.setDependsOn("observerSource=Field"); propertyDefinitions.put(procEventX.getPropertyName(), procEventX); PropertyDefinition procEventY = new PropertyDefinition( "observerYEvent", PropertyType.String, "", lblObsYFld, descObsYFld, true, false); procEventY.setDependsOn("observerSource=Field"); propertyDefinitions.put(procEventY.getPropertyName(), procEventY); List<LabeledValue> allowedSrc = new ArrayList<LabeledValue>(); allowedSrc.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.SRC_CONSTANT}", "Constant")); allowedSrc.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.SRC_GEOEVENT}", "Event")); PropertyDefinition procRadiusSource = new PropertyDefinition( "radiusSource", PropertyType.String, "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.SRC_CONSTANT}", lblRadSrc, descRadSrc, true, false, allowedSrc); propertyDefinitions.put(procRadiusSource.getPropertyName(), procRadiusSource); PropertyDefinition procRadius = new PropertyDefinition("radius", PropertyType.Double, 1000, lblRad, descRad, true, false); procRadius.setDependsOn("radiusSource=Constant"); propertyDefinitions.put(procRadius.getPropertyName(), procRadius); PropertyDefinition procRadiusEvent = new PropertyDefinition( "radiusEvent", PropertyType.String, "", lblRadFld, descRadFld, true, false); procRadiusEvent.setDependsOn("radiusSource=Event"); propertyDefinitions.put(procRadiusEvent.getPropertyName(), procRadiusEvent); List<LabeledValue> unitsAllowedVals = new ArrayList<LabeledValue>(); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_METERS_LBL}", "Meters")); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_KM_LBL}", "Kilometers")); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_FT_LBL}", "Feet")); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_MILES_LBL}", "Miles")); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_NM_LBL}", "Nautical Miles")); PropertyDefinition procUnits = new PropertyDefinition( "units", PropertyType.String, "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_METERS_LBL}", lblRadUnits, descRadUnits, true, false, unitsAllowedVals); propertyDefinitions.put(procUnits.getPropertyName(), procUnits); PropertyDefinition procElevSource = new PropertyDefinition( "elevationSource", PropertyType.String, "", lblObsElevSrc, descObsElevSrc, true, false, allowedSrc); propertyDefinitions.put(procElevSource.getPropertyName(), procElevSource); PropertyDefinition procElev = new PropertyDefinition( "elevation", PropertyType.Double, 0, lblElev, descElev, true, false); procElev.setDependsOn("elevationSource=Constant"); propertyDefinitions.put(procElev.getPropertyName(), procElev); PropertyDefinition procElevEvent = new PropertyDefinition( "elevationEvent", PropertyType.String, "", lblElevFld, descElevFld, true, false); procElevEvent.setDependsOn("elevationSource=Event"); propertyDefinitions.put(procElevEvent.getPropertyName(), procElevEvent); List<LabeledValue> allowedElevUnits = new ArrayList<LabeledValue>(); allowedElevUnits.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_METERS_LBL}", "Meters")); allowedElevUnits.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_FT_LBL}", "Feet")); PropertyDefinition procUnitsElev = new PropertyDefinition( "units_elev", PropertyType.String, "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.UNITS_METERS_LBL}", lblElevUnits, descElevUnits, true, false, allowedElevUnits); propertyDefinitions.put(procUnitsElev.getPropertyName(), procUnitsElev); PropertyDefinition pdOutDefName = new PropertyDefinition( "outdefname", PropertyType.String, "viewshed_out", "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.LBL_OUT_DEF_NAME}", "${com.esri.geoevent.solutions.processor.visibility.visibility-processor.DESC_OUT_DEF_NAME}", true, false); propertyDefinitions.put(pdOutDefName.getPropertyName(), pdOutDefName); PropertyDefinition procWKIDBuffer = new PropertyDefinition( "wkidbuffer", PropertyType.Integer, 3857, lblWKIDProc, descWKIDProc, true, false); propertyDefinitions.put(procWKIDBuffer.getPropertyName(), procWKIDBuffer); PropertyDefinition procWKIDOut = new PropertyDefinition( "wkidout", PropertyType.Integer, 4326, lblWKIDOut, descWKIDOut, true, false); propertyDefinitions.put(procWKIDOut.getPropertyName(), procWKIDOut); } catch (PropertyException e) { LOG.error("Geometry processor"); LOG.error(e.getMessage()); LOG.error(e.getStackTrace()); } catch (Exception e) { LOG.error("Geometry processor"); LOG.error(e.getMessage()); LOG.error(e.getStackTrace()); } }
public SpatialQProcessorDefinition() { try { List<LabeledValue> allowedGeoSources = new ArrayList<LabeledValue>(); allowedGeoSources.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.SRC_GEO_EVENT_LBL}", "Geoevent")); allowedGeoSources.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.SRC_GEO_EVENT_DEF_LBL}", "Event_Definition")); allowedGeoSources.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.SRC_GEO_BUFFER_LBL}", "Buffer")); PropertyDefinition procGeometrySource = new PropertyDefinition( "geosrc", PropertyType.String, "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.SRC_GEO_EVENT_LBL}", lblGeoSrc, descGeoSrc, true, false, allowedGeoSources); propertyDefinitions.put(procGeometrySource.getPropertyName(), procGeometrySource); PropertyDefinition procGeometryEventDef = new PropertyDefinition( "geoeventdef", PropertyType.String, "", lblGeoFld, descGeoFld, false, false); procGeometryEventDef.setDependsOn("geosrc=Event_Definition"); propertyDefinitions.put(procGeometryEventDef.getPropertyName(), procGeometryEventDef); PropertyDefinition procSetAsEventGeo = new PropertyDefinition( "setgeo", PropertyType.Boolean, false, "Set events geometry to input", "Set geoevent's geometry to input geometry", false, false); procSetAsEventGeo.setDependsOn("geosrc=Event_Definition"); propertyDefinitions.put(procSetAsEventGeo.getPropertyName(), procSetAsEventGeo); PropertyDefinition procRadius = new PropertyDefinition( "radius", PropertyType.Double, 1000, lblBufferDist, descBufferDist, true, false); procRadius.setDependsOn("geosrc=Buffer"); propertyDefinitions.put(procRadius.getPropertyName(), procRadius); List<LabeledValue> unitsAllowedVals = new ArrayList<LabeledValue>(); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.UNITS_METERS_LBL}", "Meters")); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.UNITS_KM_LBL}", "Kilometers")); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.UNITS_FT_LBL}", "Feet")); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.UNITS_MILES_LBL}", "Miles")); unitsAllowedVals.add( new LabeledValue( "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.UNITS_NM_LBL}", "Nautical Miles")); PropertyDefinition procUnits = new PropertyDefinition( "units", PropertyType.String, "${com.esri.geoevent.solutions.processor.spatialquery.spatialquery-processor.UNITS_METERS_LBL}", lblBufferUnits, descBufferUnits, true, false, unitsAllowedVals); procUnits.setDependsOn("geosrc=Buffer"); propertyDefinitions.put(procUnits.getPropertyName(), procUnits); PropertyDefinition procWKIDBuffer = new PropertyDefinition( "wkidbuffer", PropertyType.Integer, 3857, lblWKIDBuffer, descWKIDBuffer, true, false); procWKIDBuffer.setDependsOn("geosrc=Buffer"); propertyDefinitions.put(procWKIDBuffer.getPropertyName(), procWKIDBuffer); PropertyDefinition procWKIDOut = new PropertyDefinition( "wkidout", PropertyType.Integer, 4326, lblWKIDOut, descWKIDOut, true, false); propertyDefinitions.put(procWKIDOut.getPropertyName(), procWKIDOut); PropertyDefinition procGEDName = new PropertyDefinition( "gedname", PropertyType.String, "", lblGeoDefName, descGeoDefName, true, false); propertyDefinitions.put(procGEDName.getPropertyName(), procGEDName); PropertyDefinition pConn = new PropertyDefinition( "connection", PropertyType.ArcGISConnection, null, lblConnection, descConnection, true, false); propertyDefinitions.put(pConn.getPropertyName(), pConn); PropertyDefinition pFolder = new PropertyDefinition( "folder", PropertyType.ArcGISFolder, null, lblFolder, descFolder, true, false); propertyDefinitions.put(pFolder.getPropertyName(), pFolder); PropertyDefinition pService = new PropertyDefinition( "service", PropertyType.ArcGISFeatureService, null, lblService, descService, true, false); propertyDefinitions.put(pService.getPropertyName(), pService); PropertyDefinition pLayer = new PropertyDefinition( "layer", PropertyType.ArcGISLayer, null, lblLayer, descLayer, true, false); propertyDefinitions.put(pLayer.getPropertyName(), pLayer); PropertyDefinition pdRE = new PropertyDefinition( "endpoint", PropertyType.String, "", lblEndPoint, descEndPoint, false, false); propertyDefinitions.put(pdRE.getPropertyName(), pdRE); PropertyDefinition pdwc = new PropertyDefinition("wc", PropertyType.String, "", lblWC, descWC, false, false); propertyDefinitions.put(pdwc.getPropertyName(), pdwc); PropertyDefinition pField = new PropertyDefinition( "field", PropertyType.String, null, lblQueryFld, descQueryFld, true, false); propertyDefinitions.put(pField.getPropertyName(), pField); } catch (PropertyException e) { LOG.error("Geometry processor"); LOG.error(e.getMessage()); LOG.error(e.getStackTrace()); return; } catch (Exception e) { LOG.error("Geometry processor"); LOG.error(e.getMessage()); LOG.error(e.getStackTrace()); return; } }