本文整理汇总了Java中com.esri.ges.core.geoevent.FieldType类的典型用法代码示例。如果您正苦于以下问题:Java FieldType类的具体用法?Java FieldType怎么用?Java FieldType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FieldType类属于com.esri.ges.core.geoevent包,在下文中一共展示了FieldType类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: traverseFieldGroup
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
private String traverseFieldGroup(FieldDefinition parentFieldDef, StringBuilder sb, FieldGroup fg){
StringBuilder mine=new StringBuilder();
//System.out.println("**Start: "+ parentFieldDef.getName());
for (FieldDefinition fieldDef: parentFieldDef.getChildren()){
if(fieldDef.getType()==FieldType.Group){
//System.out.println("Found another Group:"+ fieldDef.getName());
try {
mine.append("<"+fieldDef.getName()+getAttributes(fieldDef,mine,fg.getFieldGroup(fieldDef.getName()))+">"+traverseFieldGroup(fieldDef,mine,fg.getFieldGroup(fieldDef.getName()))+"</"+fieldDef.getName()+">");
} catch (FieldException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}else{
//System.out.println("not a group:" + fieldDef.getName()+"="+fg.getField(fieldDef.getName())+ " toString: "+ fieldDef.toString());
if(fg.getField(fieldDef.getName())!=null){
if (fieldDef.getName().equals("#text"))
mine.append(fg.getField(fieldDef.getName()));
}
}
}
//System.out.println("**End: "+ parentFieldDef.getName());
return mine.toString();
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:27,代码来源:CoTAdapterOutbound.java
示例2: lookupType
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
private static FieldType lookupType(String attributeType, HashMap<String,String> typeTable )
{
if( typeTable.containsKey(attributeType) )
attributeType = typeTable.get(attributeType);
FieldType t = FieldType.String;
if( attributeType.equals("") )
t = FieldType.String;
else if( attributeType.equals("xs:string"))
t = FieldType.String;
else if( attributeType.equals("xs:dateTime"))
t = FieldType.Date;
else if( attributeType.equals("xs:integer"))
t = FieldType.Integer;
else if( attributeType.equals("xs:nonNegativeInteger"))
t = FieldType.Integer;
else if( attributeType.equals("xs:decimal"))
t = FieldType.Double;
else if( attributeType.equals("xs:boolean"))
t = FieldType.Boolean;
else
System.out.println("Cannot recognize the type \""+attributeType+"\"");
return t;
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:24,代码来源:CoTDetailsDeff.java
示例3: CAPInboundAdapterDefinition
import com.esri.ges.core.geoevent.FieldType; //导入依赖的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)
{
;
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:19,代码来源:CAPInboundAdapterDefinition.java
示例4: afterPropertiesSet
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
@Override
public void afterPropertiesSet() {
pointType = properties.get("pointType").getValueAsString();
processWkid = (Integer)properties.get("wkid").getValue();
outDef = properties.get("outdefname").getValueAsString();
fds = new ArrayList<FieldDefinition>();
try {
//fds.add(new DefaultFieldDefinition("trackId", FieldType.String,
//"TRACK_ID"));
fds.add(new DefaultFieldDefinition("LocationTimeStamp", FieldType.Date, "TIMESTAMP"));
//fds.add(new DefaultFieldDefinition("geometry", FieldType.Geometry));
if ((ged = manager.searchGeoEventDefinition(outDef, definition.getUri().toString())) == null)
{
createDef = true;
}
}
catch(ConfigurationException e)
{
LOGGER.error(e.getMessage());
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:25,代码来源:Line2PtProcessor.java
示例5: afterPropertiesSet
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
@Override
public void afterPropertiesSet() {
mgrs = properties.get("mgrs").getValueAsString();
overwrite = (Boolean) properties.get("overwrite").getValue();
returnBB = (Boolean) properties.get("returnbb").getValue();
if (overwrite)
geofld = "GEOMETRY";
else {
geofld = properties.get("geofld").getValueAsString();
try {
FieldDefinition fd = new DefaultFieldDefinition(geofld,
FieldType.Geometry);
fds = new ArrayList<FieldDefinition>();
fds.add(fd);
} catch (ConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
newdef = properties.get("eventdef").getValueAsString();
//accuracy = (Integer) properties.get("accuracy").getValue();
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:24,代码来源:LatLongProcessor.java
示例6: afterPropertiesSet
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
@Override
public void afterPropertiesSet()
{
expression = getProperty("expression").getValueAsString().trim();
fieldName = null;
resultDestination = Validator.valueOfIgnoreCase(ResultDestination.class, getProperty("resultDestination").getValueAsString(), null);
geoEventMutator = false;
if (resultDestination != null)
if (ResultDestination.NEW_FIELD.equals(resultDestination))
{
fieldName = getProperty("newFieldName").getValueAsString().trim();
fieldTagName = Validator.compactSpaces(getProperty("newFieldTag").getValueAsString()).trim();
}
else if (ResultDestination.EXISTING_FIELD.equals(resultDestination))
{
fieldName = getProperty("existingFieldName").getValueAsString().trim();
geoEventMutator = true;
}
fieldType = Validator.valueOfIgnoreCase(FieldType.class, getProperty("newFieldType").getValueAsString().trim(), null);
geoEventDefinitionName = getProperty("newGeoEventDefinitionName").getValueAsString().trim();
fieldDefinition = null;
}
开发者ID:Esri,项目名称:solutions-geoevent-java,代码行数:23,代码来源:CacheAwareFieldCalculator.java
示例7: report
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
private static void report( int indent, FieldDefinition def )
{
for( int i = 0; i < indent; i++ )
System.out.print(" ");
System.out.println( def );
if( def.getType() == FieldType.Group )
{
for( FieldDefinition child : def.getChildren() )
report( indent + 4, child);
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:12,代码来源:CoTAdapterService.java
示例8: main
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
public static void main( String[] args )
{
try
{
//GeoEventDefinition cotDef = new DefaultGeoEventDefinition();
FieldDefinition detailsField = new DefaultFieldDefinition("detail", FieldType.Group);
CoTAdapterService service = new CoTAdapterService();
service.getAdditionalSchemasFromXSDFolder(detailsField);
report(0,detailsField);
} catch (ConfigurationException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:16,代码来源:CoTAdapterService.java
示例9: getAttributes
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
private String getAttributes(FieldDefinition parentFieldDef, StringBuilder sb, FieldGroup fg){
StringBuilder mine=new StringBuilder();
for (FieldDefinition fieldDef: parentFieldDef.getChildren()){
if(fieldDef.getType()!=FieldType.Group){
if(fg.getField(fieldDef.getName())!=null){
if (!fieldDef.getName().equals("#text"))
mine.append(" "+fieldDef.getName()+"=\""+fg.getField(fieldDef.getName())+"\"");
}
}
}
return mine.toString();
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:13,代码来源:CoTAdapterOutbound.java
示例10: afterPropertiesSet
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
@Override
public void afterPropertiesSet()
{
geofld = properties.get("geofld").getValueAsString();
newdef = properties.get("eventdef").getValueAsString();
accuracy = (Integer)properties.get("accuracy").getValue();
try {
FieldDefinition fd = new DefaultFieldDefinition("mgrs", FieldType.String);
fds = new ArrayList<FieldDefinition>();
fds.add(fd);
} catch (ConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:16,代码来源:MGRSProcessor.java
示例11: afterPropertiesSet
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
public void afterPropertiesSet() {
notificationMode = Validator.valueOfIgnoreCase(
TrackIdleProcessorNotificationMode.class,
getProperty("notificationMode").getValueAsString(),
TrackIdleProcessorNotificationMode.OnChange);
idleLimit = Converter.convertToInteger(getProperty("idleLimit")
.getValueAsString(), 300);
tolerance = Converter.convertToLong(getProperty("tolerance")
.getValueAsString(), 50l);
keepFields = (Boolean) getProperty("keepfields").getValue();
outDefName = getProperty("outdefname").getValueAsString();
fds = new ArrayList<FieldDefinition>();
try {
//fds.add(new DefaultFieldDefinition("trackId", FieldType.String,
//"TRACK_ID"));
fds.add(new DefaultFieldDefinition("idle", FieldType.Boolean));
fds.add(new DefaultFieldDefinition("idleDuration", FieldType.Double));
fds.add(new DefaultFieldDefinition("idleStart", FieldType.Date));
//fds.add(new DefaultFieldDefinition("geometry", FieldType.Geometry));
if ((ged = manager.searchGeoEventDefinition(outDefName, definition.getUri().toString())) == null)
{
createDef = true;
}
} catch (ConfigurationException e) {
}
// geoEventDefinitions.put(ged.getName(), ged);
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:34,代码来源:TrackIdleProcessor.java
示例12: STWAProcessor
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
public STWAProcessor(GeoEventProcessorDefinition definition)
throws ComponentException {
super(definition);
typelist.add(FieldType.Integer);
typelist.add(FieldType.Short);
typelist.add(FieldType.Long);
typelist.add(FieldType.Float);
typelist.add(FieldType.Double);
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:11,代码来源:STWAProcessor.java
示例13: process
import com.esri.ges.core.geoevent.FieldType; //导入依赖的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;
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:33,代码来源:STWAProcessor.java
示例14: ESDInboundAdapterDefinition
import com.esri.ges.core.geoevent.FieldType; //导入依赖的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)
{
;
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:32,代码来源:ESDInboundAdapterDefinition.java
示例15: lookup
import com.esri.ges.core.geoevent.FieldType; //导入依赖的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;
}
开发者ID:Esri,项目名称:extent-enricher-for-geoevent,代码行数:50,代码来源:GeometryExtentEnricher.java
示例16: GeoNamesOSMPOIProcessorDefinition
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
public GeoNamesOSMPOIProcessorDefinition()
{
try
{
PropertyDefinition geoNamesUsernameProperty = new PropertyDefinition(GEONAMES_USERNAME_PROPERTY, PropertyType.String, "", "GeoNames Username (optional)", "If you purchased GeoNames Premium services, enter your username. If blank, a more limited free account will be used.", false, false);
propertyDefinitions.put(GEONAMES_USERNAME_PROPERTY, geoNamesUsernameProperty);
PropertyDefinition geoNamesOSMPOIsRadiusProperty = new PropertyDefinition(GEONAMES_OSMPOIsRADIUS_PROPERTY, PropertyType.Double, 1, "GeoNames OpenStreetmap POI Search Radius (Km)", "The distance from the geoevent's location within which to search for OpenStreetmap Points of Interest. Max for a free account = 1, max for a premium account = 3.", true, false);
propertyDefinitions.put(GEONAMES_OSMPOIsRADIUS_PROPERTY, geoNamesOSMPOIsRadiusProperty);
PropertyDefinition geoNamesOSMPOIsMaxRowsProperty = new PropertyDefinition(GEONAMES_OSMPOIsMAXROWS_PROPERTY, PropertyType.Integer, 50, "GeoNames OpenStreetmap POI Max Rows", "The maximum number of OpenStreetmap Points of Interest to return. Max for a free account = 50, max for a premium account = 150.", true, false);
propertyDefinitions.put(GEONAMES_OSMPOIsMAXROWS_PROPERTY, geoNamesOSMPOIsMaxRowsProperty);
GeoEventDefinition ged = new DefaultGeoEventDefinition();
ged.setName("GeoNamesOSMPOI");
List<FieldDefinition> fds = new ArrayList<FieldDefinition>();
fds.add(new DefaultFieldDefinition("trackId", FieldType.String, "TRACK_ID"));
fds.add(new DefaultFieldDefinition("timestamp", FieldType.Date, "TIME_START"));
fds.add(new DefaultFieldDefinition("incidentId", FieldType.String));
fds.add(new DefaultFieldDefinition("typeName", FieldType.String));
fds.add(new DefaultFieldDefinition("distance", FieldType.Double));
fds.add(new DefaultFieldDefinition("name", FieldType.String));
fds.add(new DefaultFieldDefinition("lng", FieldType.Double));
fds.add(new DefaultFieldDefinition("typeClass", FieldType.String));
fds.add(new DefaultFieldDefinition("lat", FieldType.Double));
fds.add(new DefaultFieldDefinition("geometry", FieldType.Geometry, "GEOMETRY"));
ged.setFieldDefinitions(fds);
geoEventDefinitions.put(ged.getName(), ged);
}
catch (PropertyException ex)
{
;
}
catch (ConfigurationException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
开发者ID:Esri,项目名称:geonames-for-geoevent,代码行数:41,代码来源:GeoNamesOSMPOIProcessorDefinition.java
示例17: AutoArrivalDepartureProcessorDefinition
import com.esri.ges.core.geoevent.FieldType; //导入依赖的package包/类
public AutoArrivalDepartureProcessorDefinition()
{
try
{
GeoEventDefinition md = new DefaultGeoEventDefinition();
md.setName("incident");
List<FieldDefinition> ads = new ArrayList<FieldDefinition>();
ads.add(new DefaultFieldDefinition("id", FieldType.String));
ads.add(new DefaultFieldDefinition("name", FieldType.String));
ads.add(new DefaultFieldDefinition("type", FieldType.String));
ads.add(new DefaultFieldDefinition("status", FieldType.String));
ads.add(new DefaultFieldDefinition("alertType", FieldType.String));
ads.add(new DefaultFieldDefinition("openCondition", FieldType.String));
ads.add(new DefaultFieldDefinition("closeCondition", FieldType.String));
ads.add(new DefaultFieldDefinition("description", FieldType.String));
ads.add(new DefaultFieldDefinition("timestamp", FieldType.Date, "TIME_START"));
ads.add(new DefaultFieldDefinition("definitionName", FieldType.String));
ads.add(new DefaultFieldDefinition("definitionOwner", FieldType.String));
ads.add(new DefaultFieldDefinition("trackId", FieldType.String, "TRACK_ID"));
ads.add(new DefaultFieldDefinition("shape", FieldType.Geometry, "GEOMETRY"));
ads.add(new DefaultFieldDefinition("duration", FieldType.Long));
ads.add(new DefaultFieldDefinition("dismissed", FieldType.Boolean));
ads.add(new DefaultFieldDefinition("assignedTo", FieldType.String));
ads.add(new DefaultFieldDefinition("note", FieldType.String));
md.setFieldDefinitions(ads);
geoEventDefinitions.put(md.getName(), md);
}
catch(Exception e)
{
LOG.error("Error setting up Incident Detector Definition.", e);
}
}
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:33,代码来源:AutoArrivalDepartureProcessorDefinition.java
注:本文中的com.esri.ges.core.geoevent.FieldType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论