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


Java Layer类代码示例

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


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

示例1: reloadStops

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public List<Stop> reloadStops(String agsConnectionName, String path, String featureService, String layer)
{
  removeAllStops();
  
  ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
  Layer lyr =  agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
  //getAllFeatures(String folder, String serviceName, int layerIndex, String queryDefinition, String outFields, boolean includeGeometry, ArcGISServerType serverType, long lastOid)
  try
  {
    List<JsonNode> nodes = agsConnection.getAllFeatures(path, featureService, lyr.getId(), "1=1", "*", true, ArcGISServerType.FeatureServer, 0);
    List<Stop> stops = parseFeaturesToStops(nodes);
    for(Stop stop : stops)
    {
      addOrReplaceStop(stop);
    }
  }
  catch (IOException e)
  {
    log.error(e);
  }
  return getStops();
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:24,代码来源:StopsManagerImpl.java

示例2: reloadVehicles

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public List<Vehicle> reloadVehicles(String agsConnectionName, String path, String featureService, String layer)
{
  removeAllVehicles();
  ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
  Layer lyr =  agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
  try
  {
    List<JsonNode> nodes = agsConnection.getAllFeatures(path, featureService, lyr.getId(), "1=1", "*", true, ArcGISServerType.FeatureServer, 0);
    List<Vehicle> vehicles = parseFeaturesToVehicles(nodes);
    for(Vehicle vehicle : vehicles)
    {
      addOrReplaceVehicle(vehicle);
    }
  }
  catch (IOException e)
  {
    log.error(e);
  }
  return getVehicles();
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:22,代码来源:VehiclesManagerImpl.java

示例3: reloadRoutes

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public List<Route> reloadRoutes(String agsConnectionName, String path, String featureService, String layer)
{
  removeAllRoutes();
  ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
  Layer lyr =  agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
  try
  {
    List<JsonNode> nodes = agsConnection.getAllFeatures(path, featureService, lyr.getId(), "1=1", "*", true, ArcGISServerType.FeatureServer, 0);
    List<Route> routes = parseFeaturesToRoutes(nodes);
    for(Route route:routes)
    {
      addOrReplaceRoute(route);
    }
  }
  catch (IOException e)
  {
    log.error(e);
  }
  return new ArrayList<Route>(getRoutes());
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:22,代码来源:RouteManagerImpl.java

示例4: clearAllStops

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllStops(String agsConnectionName, String path, String featureService, String stopLayer, String geofenceLayer)
{
  ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
  Layer stoplyr =  agsConnection.getLayer(path, featureService, stopLayer, ArcGISServerType.FeatureServer);
  agsConnection.deleteAllRecordsFromLayer(path , featureService, stoplyr.getId());
  removeAllStops();
  
  if(!Validator.isEmpty(geofenceLayer))
  {
    Layer geofencelyr = agsConnection.getLayer(path, featureService, geofenceLayer, ArcGISServerType.FeatureServer);
    agsConnection.deleteAllRecordsFromLayer(path , featureService, geofencelyr.getId());
  }
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:15,代码来源:StopsManagerImpl.java

示例5: clearAllAlertFeatures

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllAlertFeatures(String agsConnectionName, String path, String featureService, String layer)
{
  ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
  Layer lyr =  agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
  agsConnection.deleteAllRecordsFromLayer(path , featureService, lyr.getId());
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:8,代码来源:AlertsManagerImpl.java

示例6: clearAllMessageFeatures

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllMessageFeatures(String agsConnectionName, String path, String featureService, String layer)
{
  ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
  Layer lyr =  agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
  agsConnection.deleteAllRecordsFromLayer(path , featureService, lyr.getId());
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:8,代码来源:MessagesManagerImpl.java

示例7: clearAllVehicleFeatures

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllVehicleFeatures(String agsConnectionName, String path, String featureService, String layer)
{
  ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
  Layer lyr =  agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
  agsConnection.deleteAllRecordsFromLayer(path , featureService, lyr.getId());
  removeAllVehicles();
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:9,代码来源:VehiclesManagerImpl.java

示例8: clearAllRouteFeatures

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllRouteFeatures(String agsConnectionName, String path, String featureService, String layer)
{
  ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
  Layer lyr =  agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
  agsConnection.deleteAllRecordsFromLayer(path , featureService, lyr.getId());
  removeAllRoutes();
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:9,代码来源:RouteManagerImpl.java

示例9: CreateQueries

import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
public void CreateQueries()
{
	String connName = properties.get("connection").getValueAsString();
	ArcGISServerConnection conn = connectionManager.getArcGISServerConnection(connName);
	URL url = conn.getUrl();
	String folder = properties.get("folder").getValueAsString();
	
	String service = properties.get("service").getValueAsString();
	String lyrName = properties.get("layer").getValueAsString();
	Layer layer =conn.getLayer(folder, service, lyrName, ArcGISServerType.FeatureServer);
	String layerId = ((Integer)layer.getId()).toString();
	String field = properties.get("field").getValueAsString();
	
	String baseUrl = url.getProtocol() +"://"+ url.getHost() + ":" + url.getPort()
			+ url.getPath() + "rest/services/";
	String curPath = baseUrl + "/" + folder + "/" + service + "/FeatureServer/" + layerId;
	String restpath = curPath + "/query?";
	HashMap<String, Object> query = new HashMap<String, Object>();
	HashMap<String, String> fieldMap = new HashMap<String, String>();
	String fldsString = field;
	Field[] fields = conn.getFields(folder, service, layer.getId(), ArcGISServerType.FeatureServer);

	Boolean usingDist=false;
	String lyrHeaderCfg = "";
	String distToken="";
	String distUnits="";
	String wc="";
	String itemConfig = "";
	wc = properties.get("wc")
			.getValueAsString();
	lyrHeaderCfg = properties.get("lyrheader").getValueAsString();
	usingDist = (Boolean)properties.get("calcDistance").getValue();
	if(usingDist)
	{
		distToken=properties.get("dist_token").getValueAsString();
		distUnits=properties.get("dist_units").getValueAsString();
	}
	String token = properties.get("field-token")
			.getValueAsString();
	fieldMap.put(field, token);
	itemConfig = properties.get("item-config").getValueAsString();
	query.put("restpath", restpath);
	query.put("path", curPath);
	query.put("whereclause", wc);
	query.put("fields", fldsString );
	query.put("outfields", fields);
	query.put("tokenMap", fieldMap);
	query.put("headerconfig", lyrHeaderCfg);
	query.put("usingdist", usingDist);
	query.put("distunits", distUnits);
	query.put("disttoken", distToken);
	query.put("itemconfig", itemConfig);
	query.put("layer", layer.getName());
	UUID uid = UUID.randomUUID();
	query.put("id", uid);
	queries.add(query);
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:58,代码来源:QueryReportProcessor.java


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