本文整理汇总了Java中com.esri.ges.adapter.AdapterDefinition类的典型用法代码示例。如果您正苦于以下问题:Java AdapterDefinition类的具体用法?Java AdapterDefinition怎么用?Java AdapterDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AdapterDefinition类属于com.esri.ges.adapter包,在下文中一共展示了AdapterDefinition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DefenseInboundAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
public DefenseInboundAdapter(AdapterDefinition definition) throws ComponentException, ParserConfigurationException, SAXException, IOException
{
super(definition);
messageParser = new MessageParser(this);
saxFactory = SAXParserFactory.newInstance();
saxParser = saxFactory.newSAXParser();
}
示例2: createAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
@Override
public Adapter createAdapter() throws ComponentException
{
List<AdapterService> adapterServices = adapterRegistry.findOutboundAdapters(null);
for (AdapterService adapterService : adapterServices)
{
if (adapterService.getAdapterDefinition().getName().equalsIgnoreCase(featureAdapterName))
{
featureAdapter = (OutboundAdapter) adapterService.createAdapter();
}
}
AdapterDefinition basedef = featureAdapter.getDefinition();
definition.getPropertyDefinitions().putAll(basedef.getPropertyDefinitions());
return new MultiFeatureJsonOutboundAdapter(definition, featureAdapter, geoEventCreator);
}
示例3: CAPInboundAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
public CAPInboundAdapter(AdapterDefinition definition) throws ComponentException
{
super(definition);
MAP = new LinkedHashMap(MAX_ENTRIES + 1, 1.1f, false){protected boolean removeEldestEntry(Map.Entry eldest){return size() > MAX_ENTRIES;}};
arcgisWGS = com.esri.core.geometry.SpatialReference.create(4326);
arcgisKmUnit = com.esri.core.geometry.Unit.create(9036);
}
示例4: parseEvent
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
private GeoEvent parseEvent(String data)
{
// Create an instance of the message using the guid that we generated when
// we started up.
GeoEvent msg;
try
{
msg = geoEventCreator.create(((AdapterDefinition)definition).getGeoEventDefinition("CAPAlert").getGuid());
}
catch (MessagingException e)
{
return null;
}
return msg;
}
示例5: getDefinition
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
@Override
public AdapterDefinition getDefinition()
{
// AdapterDefinition basedef = featureAdapter.getDefinition();
// definition.getPropertyDefinitions().putAll(basedef.getPropertyDefinitions());
return definition;
}
示例6: TweetStatusAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
public TweetStatusAdapter(AdapterDefinition definition) throws ComponentException
{
super(definition);
LOGGER.debug("CREATED_MSG");
charset = Charset.forName("UTF-8");
decoder = charset.newDecoder();
}
示例7: NmeaInboundAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
public NmeaInboundAdapter(AdapterDefinition definition) throws ComponentException
{
super(definition);
translators.put("NMEAGPGGA", new NMEAGPGGAMessageTranslator());
translators.put("NMEAGPGLL", new NMEAGPGLLMessageTranslator());
translators.put("NMEAGPRMC", new NMEAGPRMCMessageTranslator());
}
示例8: run
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
@Override
public void run()
{
while (!messages.isEmpty())
{
String[] data = new String(messages.remove(0)).split(",");
if (data.length > 0)
{
String gedName = "NMEA" + data[0];
if (translators.containsKey(gedName))
{
try
{
NMEAMessageTranslator translator = translators.get(gedName);
translator.validate(data);
GeoEvent geoEvent = geoEventCreator.create(((AdapterDefinition) definition).getGeoEventDefinition(gedName).getGuid());
geoEvent.setField(0, channelId);
translator.translate(geoEvent, data);
geoEventListener.receive(geoEvent);
}
catch (Exception error)
{
LOGGER.error("TRANSLATION_ERROR", error.getMessage());
LOGGER.info(error.getMessage(), error);
}
}
}
}
}
示例9: TaipInboundAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
public TaipInboundAdapter(AdapterDefinition definition) throws ComponentException
{
super(definition);
lookup.put("RPV", "TAIP0xF0");
lookup.put("RCP", "TAIP0xF1");
lookup.put("RLN", "TAIP0xF2");
lookup.put("RAM", "TAIPRAM");
translators.put("RPV", new TAIP0xF0MessageTranslator());
translators.put("RCP", new TAIP0xF1MessageTranslator());
translators.put("RLN", new TAIP0xF2MessageTranslator());
translators.put("RAM", new TAIPRAMMessageTranslator());
}
示例10: run
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
@Override
public void run()
{
while (!messages.isEmpty())
{
ByteBuffer message = ByteBuffer.wrap(messages.remove(0));
if (message.remaining() >= 3)
{
byte[] chars = new byte[3];
message.get(chars);
String taipFormat = new String(chars);
if (lookup.containsKey(taipFormat))
{
try
{
GeoEvent geoEvent = geoEventCreator.create(((AdapterDefinition) definition).getGeoEventDefinition(lookup.get(taipFormat)).getGuid());
translators.get(taipFormat).translate(channelId, message, geoEvent);
geoEventListener.receive(geoEvent);
}
catch (Throwable error)
{
LOGGER.error("TRANSLATION_ERROR", error.getMessage());
LOGGER.info(error.getMessage(), error);
}
}
else
LOGGER.error("TRANSLATION_ERROR_FORMAT_NOT_SUPPORTED", taipFormat);
}
}
}
示例11: GtfsRealtimeInboundAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
public GtfsRealtimeInboundAdapter(AdapterDefinition definition) throws ComponentException
{
super(definition);
}
示例12: RegexTextInboundAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
public RegexTextInboundAdapter(AdapterDefinition adapterDefinition)
throws ComponentException
{
super(adapterDefinition);
}
示例13: getAdapterDefinition
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
@Override
public AdapterDefinition getAdapterDefinition() {
return this;
}
示例14: CoTAdapterOutbound
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
/**
* @param definition
* @throws ComponentException
*/
public CoTAdapterOutbound(AdapterDefinition definition)
throws ComponentException {
super(definition);
// TODO Auto-generated constructor stub
}
示例15: DefenseOutboundAdapter
import com.esri.ges.adapter.AdapterDefinition; //导入依赖的package包/类
public DefenseOutboundAdapter(AdapterDefinition definition) throws ComponentException
{
super(definition);
}