• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ConfigurationException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ConfigurationException类属于com.esri.ges.core包,在下文中一共展示了ConfigurationException类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: CAPInboundAdapterDefinition

import com.esri.ges.core.ConfigurationException; //导入依赖的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: afterPropertiesSet

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


示例3: afterPropertiesSet

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


示例4: createAdapter

import com.esri.ges.core.ConfigurationException; //导入依赖的package包/类
@Override
public Adapter createAdapter() throws ComponentException{
	try {
		return new CoTAdapterInbound(definition, guid);
	} catch (ConfigurationException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		return null;
	}
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:11,代码来源:CoTAdapterServiceInbound.java


示例5: createAdapter

import com.esri.ges.core.ConfigurationException; //导入依赖的package包/类
@Override
public Adapter createAdapter() throws ComponentException
{
	try
	{
		return new CoTAdapter(this, guid);
	} catch (ConfigurationException e)
	{
		throw new ComponentException(e.getMessage());
	}
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:12,代码来源:CoTAdapterService.java


示例6: main

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


示例7: afterPropertiesSet

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


示例8: afterPropertiesSet

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


示例9: ESDInboundAdapterDefinition

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


示例10: GeoNamesOSMPOIProcessorDefinition

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


示例11: processGeoEvent

import com.esri.ges.core.ConfigurationException; //导入依赖的package包/类
private GeoEvent processGeoEvent(GeoEvent geoEvent) throws MalformedURLException, JSONException, ConfigurationException, GeoEventDefinitionManagerException, FieldException
{
	if (geoEvent.getTrackId() == null || geoEvent.getGeometry() == null)
	{
		LOGGER.warn("NULL_ERROR: TrackID and/or Geometry is NULL.");
		return null;
	}

	Geometry geom = geoEvent.getGeometry().getGeometry();
	if (geom.isEmpty())
		return geoEvent;

	if (!Geometry.isPoint(geom.getType().value()))
		return geoEvent;

	if (Geometry.isMultiVertex(geom.getType().value()))
		return geoEvent;

	Point point = (Point) geom;

	double lon = point.getX();
	double lat = point.getY();
	int wkid = geoEvent.getGeometry().getSpatialReference().getID();

	// fetch nearest street address (reverse geocode) via ArcGIS Online World GeoCode service
	// The response format. Values: html | json | kmz 
	// The default response format is html.
	agolSearchFormat = "json"; 
	URL agolURL = new URL("http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?location=" + Double.toString(lon) + "," + Double.toString(lat) + "&distance=" + Integer.toString(agolSearchDistance) + "&outSR=" + Integer.toString(wkid) + "&f=" + agolSearchFormat);
	String addressJson = getReverseGeocode(agolURL);
	GeoEvent agolStreetAddress = augmentGeoEventWithAddress(geoEvent, addressJson);
	return agolStreetAddress;
}
 
开发者ID:Esri,项目名称:reverse-geocoder-for-geoevent,代码行数:34,代码来源:ReverseGeocoderProcessor.java


示例12: afterPropertiesSet

import com.esri.ges.core.ConfigurationException; //导入依赖的package包/类
public void afterPropertiesSet()
{
	// read properties
	notificationMode = Validator.valueOfIgnoreCase(TrackIdleNotificationMode.class, getProperty("notificationMode").getValueAsString(), TrackIdleNotificationMode.OnChange);
	idleLimit = Converter.convertToInteger(getProperty("idleLimit").getValueAsString(), 300);
	tolerance = Converter.convertToLong(getProperty("tolerance").getValueAsString(), 50l);
	keepFields = (Boolean) getProperty("keepFields").getValue();
	outGedSuffixName = getProperty("outGedSuffixName").getValueAsString();
	accumulateIdleDuration = (Boolean) getProperty("accumulateIdleDuration").getValue();
	reportIdleDurationWhileNotIdle = (Boolean) getProperty("reportIdleDurationWhileNotIdle").getValue();

	// get the "TrackIdle" GED
	trackIdleGed = gedManager.searchGeoEventDefinition(TrackIdleDetectorDefinition.DEFAULT_TRACK_IDLE_GED_NAME, definition.getUri().toString());

	// prepare to augment track idle fields to a GED
	trackIdleFields = new ArrayList<FieldDefinition>();
	try
	{
		trackIdleFields.add(new DefaultFieldDefinition("idle", FieldType.Boolean));
		trackIdleFields.add(new DefaultFieldDefinition("idleDuration", FieldType.Double));
		trackIdleFields.add(new DefaultFieldDefinition("idleStart", FieldType.Date));
	}
	catch (ConfigurationException error)
	{
		LOGGER.error(error.getMessage(), error);
	}
}
 
开发者ID:Esri,项目名称:track-idle-detector-for-geoevent,代码行数:28,代码来源:TrackIdleDetector.java


示例13: readProperties

import com.esri.ges.core.ConfigurationException; //导入依赖的package包/类
protected void readProperties() throws ConfigurationException
{
	if (hasProperty(HOST_NAME_PROPERTY))
		host = getProperty(HOST_NAME_PROPERTY).getValueAsString();
	else
		host = "localhost";

	if (hasProperty(PORT_PROPERTY))
		port = ((Integer) getProperty(PORT_PROPERTY).getValue());
	else
		port = 27017;

	if (hasProperty(DATABASE_NAME_PROPERTY))
		databaseName = getProperty(DATABASE_NAME_PROPERTY).getValueAsString();
	else
		databaseName = "db";

	if (hasProperty(USER_NAME_PROPERTY))
		userName = getProperty(USER_NAME_PROPERTY).getValueAsString();
	else
		userName = "";

	if (hasProperty(PASSWORD_PROPERTY))
		password = getProperty(PASSWORD_PROPERTY).getValueAsString();
	else
		password = "";

	if (hasProperty(COLLECTION_NAME_PROPERTY))
		collectionName = getProperty(COLLECTION_NAME_PROPERTY).getValueAsString();
	else
		collectionName = "GeoEvents";

	if (hasProperty(WRITE_CONCERN_PROPERTY))
	{
		String writeConcernString = getProperty(WRITE_CONCERN_PROPERTY).getValueAsString();
		writeConcern = WriteConcern.valueOf(writeConcernString);
	}
}
 
开发者ID:Esri,项目名称:mongodb-for-geoevent,代码行数:39,代码来源:MongoDBOutboundTransport.java


示例14: CoTAdapterService

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


示例15: CoTInboundAdapterDefinition

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


示例16: CoTInboundAdapterDefinition

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


示例17: readProperties

import com.esri.ges.core.ConfigurationException; //导入依赖的package包/类
protected void readProperties() throws ConfigurationException
{
	if (hasProperty(HOST_NAME_PROPERTY))
		host = getProperty(HOST_NAME_PROPERTY).getValueAsString();
	else
		host = "localhost";

	if (hasProperty(PORT_PROPERTY))
		port = ((Integer) getProperty(PORT_PROPERTY).getValue());
	else
		port = 27017;

	if (hasProperty(FILE_PATH_PROPERTY))
	{
		filePath = getProperty(FILE_PATH_PROPERTY).getValueAsString();
		while (filePath.length() > 1 && filePath.endsWith("/"))
			filePath = filePath.substring(0, filePath.length() - 1);
	}
	else
		filePath = "/user/cloudera";

	if (hasProperty(BASE_FILENAME_PROPERTY))
		baseFilename = getProperty(BASE_FILENAME_PROPERTY).getValueAsString();
	else
		baseFilename = "gepOutput";

	if (hasProperty(FILENAME_SUFFIX_PROPERTY))
		filenameSuffix = getProperty(FILENAME_SUFFIX_PROPERTY).getValueAsString();
	else
		filenameSuffix = "json";

	if (hasProperty(USER_NAME_PROPERTY))
		userName = getProperty(USER_NAME_PROPERTY).getValueAsString();
	else
		userName = null;

	if (hasProperty(MAX_EVENTS_PER_FILE_PROPERTY))
		maxEventsPerFile = ((Integer) getProperty(MAX_EVENTS_PER_FILE_PROPERTY).getValue());
	else
		maxEventsPerFile = 10000;

}
 
开发者ID:Esri,项目名称:hadoop-for-geoevent,代码行数:43,代码来源:HDFSOutboundTransport.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ModelEncoder类代码示例发布时间:2022-05-23
下一篇:
Java LDP类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap