当前位置: 首页>>代码示例>>Java>>正文


Java GeoEventDefinition.setName方法代码示例

本文整理汇总了Java中com.esri.ges.core.geoevent.GeoEventDefinition.setName方法的典型用法代码示例。如果您正苦于以下问题:Java GeoEventDefinition.setName方法的具体用法?Java GeoEventDefinition.setName怎么用?Java GeoEventDefinition.setName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.esri.ges.core.geoevent.GeoEventDefinition的用法示例。


在下文中一共展示了GeoEventDefinition.setName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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)
	{
		;
	}
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:19,代码来源:CAPInboundAdapterDefinition.java

示例2: 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;
}
 
开发者ID:Esri,项目名称:motion-calculator-for-geoevent,代码行数:19,代码来源:MotionCalculator.java

示例3: 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)
	{
		;
	}
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:32,代码来源:ESDInboundAdapterDefinition.java

示例4: 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;
}
 
开发者ID:Esri,项目名称:extent-enricher-for-geoevent,代码行数:50,代码来源:GeometryExtentEnricher.java

示例5: GeoNamesOSMPOIProcessorDefinition

import com.esri.ges.core.geoevent.GeoEventDefinition; //导入方法依赖的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

示例6: AutoArrivalDepartureProcessorDefinition

import com.esri.ges.core.geoevent.GeoEventDefinition; //导入方法依赖的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

示例7: lookup

import com.esri.ges.core.geoevent.GeoEventDefinition; //导入方法依赖的package包/类
synchronized private GeoEventDefinition lookup(GeoEventDefinition edIn) throws Exception
{
	GeoEventDefinition edOut = edMapper.containsKey(edIn.getGuid()) ? geoEventDefinitionManager.getGeoEventDefinition(edMapper.get(edIn.getGuid())) : null;
	if (edOut == null)
	{
		edOut = edIn.augment(Arrays.asList(fieldDefinition));
		edOut.setName(geoEventDefinitionName);
		edOut.setOwner(getId());
		geoEventDefinitionManager.addTemporaryGeoEventDefinition(edOut, geoEventDefinitionName.isEmpty());
		edMapper.put(edIn.getGuid(), edOut.getGuid());
	}
	return edOut;
}
 
开发者ID:Esri,项目名称:solutions-geoevent-java,代码行数:14,代码来源:CacheAwareFieldCalculator.java

示例8: CoTAdapterService

import com.esri.ges.core.geoevent.GeoEventDefinition; //导入方法依赖的package包/类
public CoTAdapterService()
{
	super(AdapterType.INBOUND);
	try {
		try
		{
			propertyDefinitions.put(COT_TYPES_PATH_LABEL, new PropertyDefinition(COT_TYPES_PATH_LABEL, PropertyType.String, "", "CoT Types Path", "This is the complete path for the cot types file.", false, false) );
			propertyDefinitions.put(XSD_PATH_LABEL, new PropertyDefinition(XSD_PATH_LABEL, PropertyType.String, "", "XSD_Path", "This directory is where additional xsd files can be installed.  When the Adapter is installed, any xsd files found in this folder are used to add schema elements to the CoT GeoEvent Definition.", false, false ) );
			propertyDefinitions.put(MAXIMUM_BUFFER_SIZE_LABEL, new PropertyDefinition(MAXIMUM_BUFFER_SIZE_LABEL, PropertyType.Integer, ""+(1024*1024), "Maximum Buffer Size", "This is the maximum number of XML characters that will be stored in memory while looking for a complete Cursor on Target message.  If the adapter receives more than this amount of text, it will assume that it has somehow missed the end of the message, and it will scan for something that looks like the beginning of a new message.", false, false ) );
		} catch (PropertyException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		FieldDefinition detailField = new DefaultFieldDefinition("detail", FieldType.Group);

		getBuiltInSchemas(detailField);

		// INCLUDE the following line if we want to convert CoTTypes to
		// human readable. - NOTE load from JAR is OK.
		// coTHash=CoTUtilities.getCoTTypeMap(this.getClass().getResourceAsStream("/CoTTypes/CoTtypes.xml"));

		// INCLUDE the following line if we are going to extract attributes
		// from XSD files. -NOTE problem loading from JAR
		getAdditionalSchemasFromXSDFolder(detailField);

		GeoEventDefinition geoEventDefinition = new DefaultGeoEventDefinition();
		geoEventDefinition.setName("CoT");
		this.fieldDefinitions = new ArrayList<FieldDefinition>();
		fieldDefinitions.add(new DefaultFieldDefinition("version",
				FieldType.Double));
		fieldDefinitions.add(new DefaultFieldDefinition("uid",
				FieldType.String, "TRACK_ID"));
		fieldDefinitions.add(new DefaultFieldDefinition("type",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("2525b",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"typeDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("how",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"parsedhow", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("time",
				FieldType.Date));
		fieldDefinitions.add(new DefaultFieldDefinition("start",
				FieldType.Date, "TIME_START"));
		fieldDefinitions.add(new DefaultFieldDefinition("stale",
				FieldType.Date));
		fieldDefinitions.add(new DefaultFieldDefinition("access",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("opex",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"opexDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("qos",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"qosDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("point",
				FieldType.Geometry, "GEOMETRY"));
		fieldDefinitions.add( detailField );

		

		geoEventDefinition.setFieldDefinitions(fieldDefinitions);
		geoEventDefinitions.put(geoEventDefinition.getName(),
				geoEventDefinition);
		guid = geoEventDefinition.getGuid();
	} catch (ConfigurationException ex) {

	}
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:75,代码来源:CoTAdapterService.java

示例9: CoTInboundAdapterDefinition

import com.esri.ges.core.geoevent.GeoEventDefinition; //导入方法依赖的package包/类
public CoTInboundAdapterDefinition(AdapterType type) {
	super(AdapterType.INBOUND);
	try {
		try
		{
			propertyDefinitions.put(COT_TYPES_PATH_LABEL, new PropertyDefinition(COT_TYPES_PATH_LABEL, PropertyType.String, "", "CoT_Types_Path", "This is the complete path for the cot types file.", false, false) );
			propertyDefinitions.put(XSD_PATH_LABEL, new PropertyDefinition(XSD_PATH_LABEL, PropertyType.String, "", "XSD_Path", "This directory is where additional xsd files can be installed.  When the Adapter is installed, any xsd files found in this folder are used to add schema elements to the CoT GeoEvent Definition.", false, false ) );
			propertyDefinitions.put(MAXIMUM_BUFFER_SIZE_LABEL, new PropertyDefinition(MAXIMUM_BUFFER_SIZE_LABEL, PropertyType.Integer, ""+(1024*1024), "Maximum Buffer Size", "This is the maximum number of XML characters that will be stored in memory while looking for a complete Cursor on Target message.  If the adapter receives more than this amount of text, it will assume that it has somehow missed the end of the message, and it will scan for something that looks like the beginning of a new message.", false, false ) );
			
		} catch (PropertyException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		FieldDefinition detailField = new DefaultFieldDefinition("detail", FieldType.Group);

		getBuiltInSchemas(detailField);

		// INCLUDE the following line if we want to convert CoTTypes to
		// human readable. - NOTE load from JAR is OK.
		// coTHash=CoTUtilities.getCoTTypeMap(this.getClass().getResourceAsStream("/CoTTypes/CoTtypes.xml"));

		// INCLUDE the following line if we are going to extract attributes
		// from XSD files. -NOTE problem loading from JAR
		getAdditionalSchemasFromXSDFolder(detailField);

		GeoEventDefinition geoEventDefinition = new DefaultGeoEventDefinition();
		geoEventDefinition.setName("CoT");
		this.fieldDefinitions = new ArrayList<FieldDefinition>();
		fieldDefinitions.add(new DefaultFieldDefinition("version",
				FieldType.Double));
		fieldDefinitions.add(new DefaultFieldDefinition("uid",
				FieldType.String, "TRACK_ID"));
		fieldDefinitions.add(new DefaultFieldDefinition("type",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("2525b",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"typeDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("how",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"parsedhow", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("time",
				FieldType.Date));
		fieldDefinitions.add(new DefaultFieldDefinition("start",
				FieldType.Date, "TIME_START"));
		fieldDefinitions.add(new DefaultFieldDefinition("stale",
				FieldType.Date));
		fieldDefinitions.add(new DefaultFieldDefinition("access",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("opex",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"opexDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("qos",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"qosDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("point",
				FieldType.Geometry, "GEOMETRY"));
		fieldDefinitions.add( detailField );
		

		geoEventDefinition.setFieldDefinitions(fieldDefinitions);
		geoEventDefinitions.put(geoEventDefinition.getName(),
				geoEventDefinition);
		guid = geoEventDefinition.getGuid();
	} catch (ConfigurationException ex) {

	} 
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:74,代码来源:CoTInboundAdapterDefinition.java

示例10: process

import com.esri.ges.core.geoevent.GeoEventDefinition; //导入方法依赖的package包/类
@Override
public GeoEvent process(GeoEvent evt) throws Exception {
	MapGeometry mapGeo = (MapGeometry) evt.getField(geofld);
	Geometry geo = mapGeo.getGeometry();
	int wkid = mapGeo.getSpatialReference().getID();
	if(wkid != 4326)
	{
		return null;
	}
	if(geo.getType() != Geometry.Type.Point)
	{
		return null;
	}
	Point pt = (Point)geo;
	double[] coords = {pt.getX(), pt.getY()};
	PeGeogcs pegeocs = PeFactory.geogcs(4326);
	String[] mgrsvals = new String[1];
	PeNotationMgrs.geog_to_mgrs(pegeocs, 1, coords, accuracy, false, mgrsvals);
	String mgrs = mgrsvals[0];
	//LL ll = new LL(pt.getX(), pt.getY());
	//ll.setAccuracy(accuracy);
	
	//MGRS2LatLongConverter converter = new MGRS2LatLongConverter();
	//String mgrs = converter.LL2MRGS(ll);
	GeoEventDefinition edOut;
	GeoEventDefinition geoDef = evt.getGeoEventDefinition();
	if((edOut=manager.searchGeoEventDefinition(newdef, getId()))==null)
	{
		edOut = geoDef.augment(fds);
		edOut.setOwner(getId());
		edOut.setName(newdef);
		manager.addGeoEventDefinition(edOut);
	}
	GeoEventCreator  geoEventCreator = messaging.createGeoEventCreator();
	GeoEvent geOut = geoEventCreator.create(edOut.getGuid(), new Object[] {
		evt.getAllFields(), mgrs });
	geOut.setProperty(GeoEventPropertyName.TYPE, "message");
	geOut.setProperty(GeoEventPropertyName.OWNER_ID, getId());
	geOut.setProperty(GeoEventPropertyName.OWNER_ID, definition.getUri());
	return geOut;
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:42,代码来源:MGRSProcessor.java

示例11: CoTInboundAdapterDefinition

import com.esri.ges.core.geoevent.GeoEventDefinition; //导入方法依赖的package包/类
public CoTInboundAdapterDefinition(AdapterType type) {
	super(AdapterType.INBOUND);
	try {
		try
		{
			propertyDefinitions.put(COT_TYPES_PATH_LABEL, new PropertyDefinition(COT_TYPES_PATH_LABEL, PropertyType.String, "", lblCotTypes, descCotTypes, false, false) );
			propertyDefinitions.put(XSD_PATH_LABEL, new PropertyDefinition(XSD_PATH_LABEL, PropertyType.String, "", lblXSDPath, descXSDPath, false, false ) );
			propertyDefinitions.put(MAXIMUM_BUFFER_SIZE_LABEL, new PropertyDefinition(MAXIMUM_BUFFER_SIZE_LABEL, PropertyType.Integer, ""+(1024*1024), lblMaxBuffer, descMaxBuffer, false, false ) );
			
		} catch (PropertyException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		FieldDefinition detailField = new DefaultFieldDefinition("detail", FieldType.Group);

		getBuiltInSchemas(detailField);

		// INCLUDE the following line if we want to convert CoTTypes to
		// human readable. - NOTE load from JAR is OK.
		// coTHash=CoTUtilities.getCoTTypeMap(this.getClass().getResourceAsStream("/CoTTypes/CoTtypes.xml"));

		// INCLUDE the following line if we are going to extract attributes
		// from XSD files. -NOTE problem loading from JAR
		getAdditionalSchemasFromXSDFolder(detailField);

		GeoEventDefinition geoEventDefinition = new DefaultGeoEventDefinition();
		geoEventDefinition.setName("CoT");
		this.fieldDefinitions = new ArrayList<FieldDefinition>();
		fieldDefinitions.add(new DefaultFieldDefinition("version",
				FieldType.Double));
		fieldDefinitions.add(new DefaultFieldDefinition("uid",
				FieldType.String, "TRACK_ID"));
		fieldDefinitions.add(new DefaultFieldDefinition("type",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("2525b",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"typeDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("how",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"parsedhow", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("time",
				FieldType.Date));
		fieldDefinitions.add(new DefaultFieldDefinition("start",
				FieldType.Date, "TIME_START"));
		fieldDefinitions.add(new DefaultFieldDefinition("stale",
				FieldType.Date));
		fieldDefinitions.add(new DefaultFieldDefinition("access",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("opex",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"opexDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("qos",
				FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition(
				"qosDescription", FieldType.String));
		fieldDefinitions.add(new DefaultFieldDefinition("point",
				FieldType.Geometry, "GEOMETRY"));
		fieldDefinitions.add( detailField );
		

		geoEventDefinition.setFieldDefinitions(fieldDefinitions);
		geoEventDefinitions.put(geoEventDefinition.getName(),
				geoEventDefinition);
		guid = geoEventDefinition.getGuid();
	} catch (ConfigurationException ex) {

	} 
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:74,代码来源:CoTInboundAdapterDefinition.java


注:本文中的com.esri.ges.core.geoevent.GeoEventDefinition.setName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。