本文整理汇总了Java中com.esri.ges.core.geoevent.GeoEventDefinition类的典型用法代码示例。如果您正苦于以下问题:Java GeoEventDefinition类的具体用法?Java GeoEventDefinition怎么用?Java GeoEventDefinition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GeoEventDefinition类属于com.esri.ges.core.geoevent包,在下文中一共展示了GeoEventDefinition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SetGeoEventAllowedFields
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
private void SetGeoEventAllowedFields(PropertyDefinition pd) {
Collection<GeoEventDefinition> geodefs = this.manager
.listAllGeoEventDefinitions();
ArrayList<String> names = new ArrayList<String>();
HashMap<String, GeoEventDefinition> defMap = new HashMap<String, GeoEventDefinition>();
Iterator<GeoEventDefinition> it = geodefs.iterator();
GeoEventDefinition geoEventDef;
while (it.hasNext()) {
geoEventDef = it.next();
String defName = geoEventDef.getName();
names.add(defName);
defMap.put(defName, geoEventDef);
}
Collections.sort(names);
for (String name : names) {
geoEventDef = defMap.get(name);
List<FieldDefinition> fldDefs = geoEventDef.getFieldDefinitions();
for (FieldDefinition f : fldDefs) {
pd.addAllowedValue(name + ":" + f.getName());
}
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:23,代码来源:QueryReportProcessorDefinition.java
示例2: SetGeoEventAllowedFields
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
private void SetGeoEventAllowedFields(PropertyDefinition pd)
{
Collection<GeoEventDefinition> geodefs = this.manager.listAllGeoEventDefinitions();
Iterator<GeoEventDefinition> it = geodefs.iterator();
GeoEventDefinition geoEventDef;
while (it.hasNext())
{
geoEventDef = it.next();
String defName = geoEventDef.getName();
for(int i = 0; i < geoEventDef.getFieldDefinitions().size(); ++i)
{
String fld = geoEventDef.getFieldDefinitions().get(i).getName();
pd.addAllowedValue(defName + ":" + fld);
}
}
}
示例3: toString
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("Property Definitions:\n ");
if (propertyDefinitions != null) {
for (PropertyDefinition pd : propertyDefinitions.values()) {
sb.append(" " + pd.toString());
}
}
sb.append("\nGeoEvent Definitions:\n");
if (geoEventDefinitions != null) {
for (GeoEventDefinition ge : geoEventDefinitions.values()) {
sb.append(" " + ge.toString() + "\n");
}
}
return sb.toString();
}
示例4: CAPInboundAdapterDefinition
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
public CAPInboundAdapterDefinition()
{
super(AdapterType.INBOUND);
try
{
GeoEventDefinition md = new DefaultGeoEventDefinition();
md.setName("SampleGeoEventDefinition");
List<FieldDefinition> fieldDefinitions = new ArrayList<FieldDefinition>();
fieldDefinitions.add(new DefaultFieldDefinition("track_id", FieldType.Long));
fieldDefinitions.add(new DefaultFieldDefinition("location", FieldType.Geometry));
md.setFieldDefinitions(fieldDefinitions);
geoEventDefinitions.put(md.getName(), md);
}
catch (ConfigurationException ex)
{
;
}
}
示例5: findAndCreate
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
private GeoEvent findAndCreate(String name)
{
Collection<GeoEventDefinition> results = geoEventCreator.getGeoEventDefinitionManager().searchGeoEventDefinitionByName(name);
if (!results.isEmpty())
{
try
{
return geoEventCreator.create(results.iterator().next().getGuid());
}
catch (MessagingException e)
{
LOG.error("GeoEvent creation failed: " + e.getMessage());
}
}
else
LOG.error("GeoEvent creation failed: GeoEvent definition '" + name + "' not found.");
return null;
}
示例6: populateGeoEvent
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
private GeoEvent populateGeoEvent(GeoEvent geoEvent, GeoEventDefinition edOut, Object outputGeometry) throws MessagingException
{
GeoEvent outGeoEvent;
if (outputGeometry == null)
outGeoEvent = geoEventCreator.create(edOut.getGuid(), geoEvent.getAllFields());
else
outGeoEvent = geoEventCreator.create(edOut.getGuid(), new Object[] { geoEvent.getAllFields(), outputGeometry });
outGeoEvent.setProperty(GeoEventPropertyName.TYPE, geoEvent.getProperty(GeoEventPropertyName.TYPE));
outGeoEvent.setProperty(GeoEventPropertyName.OWNER_ID, geoEvent.getProperty(GeoEventPropertyName.OWNER_ID));
outGeoEvent.setProperty(GeoEventPropertyName.OWNER_URI, geoEvent.getProperty(GeoEventPropertyName.OWNER_URI));
for (Map.Entry<GeoEventPropertyName, Object> property : geoEvent.getProperties())
{
if (!outGeoEvent.hasProperty(property.getKey()))
outGeoEvent.setProperty(property.getKey(), property.getValue());
}
return outGeoEvent;
}
示例7: lookupAndCreateEnrichedDefinition
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
synchronized private GeoEventDefinition lookupAndCreateEnrichedDefinition(GeoEventDefinition edIn) throws Exception
{
if (edIn == null)
{
LOGGER.debug("edIn is null");
return null;
}
GeoEventDefinition edOut = edMapper.containsKey(edIn.getGuid()) ? geoEventDefinitionManager.getGeoEventDefinition(edMapper.get(edIn.getGuid())) : null;
if (edOut == null)
{
edOut = edIn.augment(createFieldDefinitionList());
edOut.setName(newGeoEventDefinitionName);
edOut.setOwner(getId());
geoEventDefinitionManager.addTemporaryGeoEventDefinition(edOut, newGeoEventDefinitionName.isEmpty());
edMapper.put(edIn.getGuid(), edOut.getGuid());
}
return edOut;
}
示例8: SetGeoEventAllowedFields
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
private void SetGeoEventAllowedFields(PropertyDefinition pd) {
Collection<GeoEventDefinition> geodefs = this.manager
.listAllGeoEventDefinitions();
Iterator<GeoEventDefinition> it = geodefs.iterator();
GeoEventDefinition geoEventDef;
while (it.hasNext()) {
geoEventDef = it.next();
String defName = geoEventDef.getName();
for (int i = 0; i < geoEventDef.getFieldDefinitions().size(); ++i) {
String fld = geoEventDef.getFieldDefinitions().get(i).getName();
pd.addAllowedValue(defName + ":" + fld);
}
}
}
示例9: SetGeoEventAllowedFields
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
private void SetGeoEventAllowedFields(PropertyDefinition pd)
{
if (this.manager == null)
return;
Collection<GeoEventDefinition> geodefs = this.manager.listAllGeoEventDefinitions();
if (geodefs == null)
return;
Iterator<GeoEventDefinition> it = geodefs.iterator();
GeoEventDefinition geoEventDef;
while (it.hasNext())
{
geoEventDef = it.next();
String defName = geoEventDef.getName();
List<FieldDefinition> fieldDefs = geoEventDef.getFieldDefinitions();
if (fieldDefs != null)
{
int fieldDefSize = fieldDefs.size();
for(int i = 0; i < fieldDefSize; ++i)
{
String fld = geoEventDef.getFieldDefinitions().get(i).getName();
pd.addAllowedValue(defName + ":" + fld);
}
}
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:30,代码来源:SymbolIdToNameProcessorDefinition.java
示例10: buildCacheKey
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
private String buildCacheKey(GeoEvent geoEvent) {
if (geoEvent != null && geoEvent.getTrackId() != null) {
GeoEventDefinition definition = geoEvent.getGeoEventDefinition();
return definition.getOwner() + "/" + definition.getName() + "/"
+ geoEvent.getTrackId();
}
return null;
}
示例11: process
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
public GeoEvent process(GeoEvent evt) throws Exception {
GeoEventDefinition ged = evt.getGeoEventDefinition();
FieldDefinition fd = ged.getFieldDefinition(aggregateFld);
if (fd == null)
return null;
FieldType type = fd.getType();
if (!typelist.contains(type)) {
return null;
}
Double val = null;
if (type == FieldType.Double) {
val = (Double) evt.getField(aggregateFld);
} else if (type == FieldType.Integer) {
val = ((Integer) evt.getField(aggregateFld)) * 1.0;
} else if (type == FieldType.Long) {
val = ((Long) evt.getField(aggregateFld)) * 1.0;
} else if (type == FieldType.Short) {
val = ((Short) evt.getField(aggregateFld)) * 1.0;
} else if (type == FieldType.Float) {
val = ((Float) evt.getField(aggregateFld)) * 1.0;
}
if(val == null)
{
return null;
}
timestamp = System.currentTimeMillis();
cache.put(timestamp, val);
return null;
}
示例12: ESDInboundAdapterDefinition
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
public ESDInboundAdapterDefinition()
{
super(AdapterType.INBOUND);
try
{
GeoEventDefinition md = new DefaultGeoEventDefinition();
md.setName("ESDGeoEventDefinition");
List<FieldDefinition> fieldDefinitions = new ArrayList<FieldDefinition>();
fieldDefinitions.add(new DefaultFieldDefinition("track_id", FieldType.Long)); // 0
fieldDefinitions.add(new DefaultFieldDefinition("target_location", FieldType.Geometry)); // 1
fieldDefinitions.add(new DefaultFieldDefinition("target_width", FieldType.Long)); // 2
fieldDefinitions.add(new DefaultFieldDefinition("slant_range", FieldType.Long)); // 3
fieldDefinitions.add(new DefaultFieldDefinition("sensor_pointing_azimuth", FieldType.Float)); // 4
fieldDefinitions.add(new DefaultFieldDefinition("sensor_elevation_angle", FieldType.Float)); // 5
fieldDefinitions.add(new DefaultFieldDefinition("field_of_view", FieldType.Float)); // 6
fieldDefinitions.add(new DefaultFieldDefinition("sensor_altitude", FieldType.Long)); // 7
fieldDefinitions.add(new DefaultFieldDefinition("sensor_location", FieldType.Geometry)); // 8
fieldDefinitions.add(new DefaultFieldDefinition("sensor_name_enum", FieldType.Short)); // 9
fieldDefinitions.add(new DefaultFieldDefinition("collection_time", FieldType.Date)); // 10
fieldDefinitions.add(new DefaultFieldDefinition("mission_number", FieldType.Long)); // 11
fieldDefinitions.add(new DefaultFieldDefinition("mission_start_time", FieldType.Date)); // 12
fieldDefinitions.add(new DefaultFieldDefinition("security_classification", FieldType.String)); // 13
fieldDefinitions.add(new DefaultFieldDefinition("platform_code", FieldType.Short)); // 14
md.setFieldDefinitions(fieldDefinitions);
geoEventDefinitions.put(md.getName(), md);
}
catch (ConfigurationException ex)
{
;
}
}
示例13: process
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
/**
* This is the main override method for {@link GeoEventProcessor}. It calls two methods,
* {@link #lookup(GeoEventDefinition)} and {@link #populateGeoEvent(GeoEvent, GeoEventDefinition)} which do most of
* the work.
*
* @param geoevent
* of type {@link GeoEvent}.
* @throws Exception
*/
@Override
public GeoEvent process(GeoEvent geoEvent) throws Exception
{
GeoEvent augmentedGeoEvent = geoEvent;
if (geoEvent != null && geoEventDefinitionManager != null)
{
GeoEventDefinition edOut = lookup(geoEvent.getGeoEventDefinition());
augmentedGeoEvent = populateGeoEvent(geoEvent, edOut);
}
return augmentedGeoEvent;
}
示例14: lookup
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
/**
* <p>
* The lookup method is used to search the {@link GeoEventDefinitionManager} for the configurable
* {@link GeoEventDefinition} via the property <code>geoEventDefinitionName</code>. When it is is found, it will
* augment the {@link GeoEventDefinition} with the new Extent related fields <code>MinX</code>, <code>MinY</code>,
* <code>MaxX</code>, <code>MaxY</code> (all of type {@link FieldType#Double}). The augmented
* {@link GeoEventDefinition} will be added as a new "temporary" {@link GeoEventDefinitionManager} to the
* GeoEventDefinitionManager via
* {@link GeoEventDefinitionManager#addTemporaryGeoEventDefinition(GeoEventDefinition, boolean)}.
* </p>
*
* <p>
* <b>Optionally</b> if the configuration property <code>addCenterPoint</code> was set to <code>true</code>, the field
* <code>CenterPoint</code> of type {@link FieldType#Geometry} will be added as well.
* </p>
*
* @param edIn the GeoEventDefinition to augment.
* @return the augmented GeoEventDefinition
* @throws Exception if the incoming GeoEventDefinition cannot be augmented or created.
*
* @see GeoEventDefinition
* @see GeoEventDefinitionManager
*/
private synchronized GeoEventDefinition lookup(GeoEventDefinition edIn) throws Exception
{
GeoEventDefinition edOut = edMapper.containsKey(edIn.getGuid()) ? geoEventDefinitionManager.getGeoEventDefinition(edMapper.get(edIn.getGuid())) : null;
if (edOut == null)
{
List<FieldDefinition> newFields = new ArrayList<>();
newFields.add(new DefaultFieldDefinition("MinX", FieldType.Double));
newFields.add(new DefaultFieldDefinition("MinY", FieldType.Double));
newFields.add(new DefaultFieldDefinition("MaxX", FieldType.Double));
newFields.add(new DefaultFieldDefinition("MaxY", FieldType.Double));
if (addCenterPoint)
newFields.add(new DefaultFieldDefinition("CenterPoint", FieldType.Geometry));
edOut = edIn.augment(newFields);
edOut.setOwner(getId());
if (StringUtils.isNotBlank(geoEventDefinitionName))
{
edOut.setName(geoEventDefinitionName);
geoEventDefinitionManager.addTemporaryGeoEventDefinition(edOut, false);
}
else
geoEventDefinitionManager.addTemporaryGeoEventDefinition(edOut, true);
edMapper.put(edIn.getGuid(), edOut.getGuid());
}
return edOut;
}
示例15: populateGeoEvent
import com.esri.ges.core.geoevent.GeoEventDefinition; //导入依赖的package包/类
/**
* The populateGeoEvent method does the following things:
* <ol>
* <li>Creates a copy of the incoming GeoEvent using the {@link GeoEventCreator}.</li>
* <li>Check's the GeoEvent's Geometry (it make sure it exists) and creates an extent from it.</li>
* <li>Adds the fields <code>MinX</code>, <code>MinY</code>, <code>MaxX</code>, <code>MaxY</code></li> to the GeoEvent using the Geometry's extent.
* <li>Optionally, adds the Geometry's extent center point as well.</li>
* </ol>
*
* @param geoEvent The incoming GeoEvent to be augmented
* @param edOut the augmented GeoEventDefinition
* @return the augmented GeoEvent
*
* @throws MessagingException if the incoming GeoEvent cannot be augmented.
*
* @see GeoEvent
* @see GeoEventDefinition
*/
private GeoEvent populateGeoEvent(GeoEvent geoEvent, GeoEventDefinition edOut) throws MessagingException
{
GeoEvent outGeoEvent = geoEventCreator.create(edOut.getGuid(), new Object[] { geoEvent.getAllFields(), (addCenterPoint) ? new Object[5] : new Object[4] });
outGeoEvent.setProperty(GeoEventPropertyName.TYPE, geoEvent.getProperty(GeoEventPropertyName.TYPE));
outGeoEvent.setProperty(GeoEventPropertyName.OWNER_ID, geoEvent.getProperty(GeoEventPropertyName.OWNER_ID));
outGeoEvent.setProperty(GeoEventPropertyName.OWNER_URI, geoEvent.getProperty(GeoEventPropertyName.OWNER_URI));
MapGeometry geometry = geoEvent.getGeometry();
if (geometry != null)
{
Envelope2D boundingBox = new Envelope2D();
geometry.getGeometry().queryEnvelope2D(boundingBox);
try
{
outGeoEvent.setField("MinX", boundingBox.xmin);
outGeoEvent.setField("MinY", boundingBox.ymin);
outGeoEvent.setField("MaxX", boundingBox.xmax);
outGeoEvent.setField("MaxY", boundingBox.ymax);
if (addCenterPoint)
{
Point centerPt = new Point(boundingBox.getCenter());
outGeoEvent.setField("CenterPoint", new MapGeometry(centerPt, geometry.getSpatialReference()));
}
}
catch (FieldException error)
{
LOGGER.error("ERROR_SETTING_EXTENT_FIELDS", error.getMessage());
LOGGER.info(error.getMessage(), error);
}
}
else
LOGGER.debug("GEOMETRY_EMPTY_MSG");
return outGeoEvent;
}