本文整理汇总了Java中com.thales.ntis.subscriber.datex.D2LogicalModel.getPayloadPublication方法的典型用法代码示例。如果您正苦于以下问题:Java D2LogicalModel.getPayloadPublication方法的具体用法?Java D2LogicalModel.getPayloadPublication怎么用?Java D2LogicalModel.getPayloadPublication使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.thales.ntis.subscriber.datex.D2LogicalModel
的用法示例。
在下文中一共展示了D2LogicalModel.getPayloadPublication方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleEventUpdate
import com.thales.ntis.subscriber.datex.D2LogicalModel; //导入方法依赖的package包/类
private void handleEventUpdate(D2LogicalModel d2LogicalModel) {
synchronized (LOCK_EVENT_UPDATES) {
try {
SituationPublication situationPublication = (SituationPublication) d2LogicalModel.getPayloadPublication();
if (situationPublication != null) {
List<Situation> situations = situationPublication.getSituation();
LOG.info(NUMBER_OF_EVENTS_IN_PAYLOAD, situations.size());
for (Situation situation : situations) {
// Only have 1 situationRecord per situation (index=0)
SituationRecord situationRecord = situation.getSituationRecord().get(0);
EVENT_CACHE.put(situationRecord.getId(), situationRecord);
processEventData(situationRecord);
}
}
} catch (Exception e) {
LOG.error(e.getMessage());
}
}
}
示例2: handle
import com.thales.ntis.subscriber.datex.D2LogicalModel; //导入方法依赖的package包/类
@Override
public void handle(D2LogicalModel d2LogicalModel) {
LOG.info("handling Ntis Model Notification Request !");
if (d2LogicalModel.getPayloadPublication() != null) {
GenericPublication genericPublication = ((GenericPublication) d2LogicalModel.getPayloadPublication());
XMLGregorianCalendar publicationTime = genericPublication.getPublicationTime();
LOG.info("Ntis model publication time: " + publicationTime);
String genericPublicationName = genericPublication.getGenericPublicationName();
LOG.info("Generic publication name: " + genericPublicationName);
GenericPublicationExtensionType genericPublicationExtension = genericPublication.getGenericPublicationExtension();
NtisModelVersionInformation ntisModelVersionInformation = genericPublicationExtension
.getNtisModelVersionInformation();
LOG.info("Network model - file name " + ntisModelVersionInformation.getModelFilename());
LOG.info("Network model - version " + ntisModelVersionInformation.getModelVersion());
LOG.info("Network model - publication time " + ntisModelVersionInformation.getModelPublicationTime());
}
LOG.info("Ntis Model Notification Data Request: Processing Completed Successfuly");
}
开发者ID:ntisservices,项目名称:OBSOLETE-ntis-java-web-services-Release2.4,代码行数:21,代码来源:NtisModelNotificationDataServiceImpl.java
示例3: processEventsInFullRefresh
import com.thales.ntis.subscriber.datex.D2LogicalModel; //导入方法依赖的package包/类
private void processEventsInFullRefresh(D2LogicalModel request, HashMap<String, SituationRecord> tempEventCache) {
SituationPublication situationPublication = (SituationPublication) request.getPayloadPublication();
if (situationPublication != null) {
List<Situation> situations = situationPublication.getSituation();
LOG.info(NUMBER_OF_EVENTS_IN_PAYLOAD, situations.size());
for (Situation situation : situations) {
refreshEvent(situation.getSituationRecord().get(0), tempEventCache);
}
}
}
示例4: handle
import com.thales.ntis.subscriber.datex.D2LogicalModel; //导入方法依赖的package包/类
@Override
public void handle(D2LogicalModel d2LogicalModel) {
LOG.info(PUBLICATION_TYPE + ": received...");
SituationPublication situationPublication = null;
try {
situationPublication = (SituationPublication) d2LogicalModel.getPayloadPublication();
if (situationPublication != null) {
List<Situation> situations = situationPublication.getSituation();
LOG.info("Number of Events in payload: " + situations.size());
for (Situation situation : situations) {
// Only have 1 situationRecord per situation (index=0)
SituationRecord situationRecord = situation.getSituationRecord().get(0);
// Different types of event/situation record contain some common information and
// some type-specific data items and should be handled accordingly
processCommonEventData(situationRecord);
if (MaintenanceWorks.class.equals(situationRecord.getClass())) {
processMaintenanceWorksEvent((MaintenanceWorks) situationRecord);
}
}
LOG.info(PUBLICATION_TYPE + ": processed successfully.");
}
} catch (Exception e) {
LOG.error(e.getMessage());
}
}
示例5: handle
import com.thales.ntis.subscriber.datex.D2LogicalModel; //导入方法依赖的package包/类
@Override
public void handle(D2LogicalModel d2LogicalModel) {
LOG.info("handling TMU Request !");
try {
if (d2LogicalModel.getPayloadPublication() != null) {
List<SiteMeasurements> siteMeasurementsList = ((MeasuredDataPublication) d2LogicalModel.getPayloadPublication())
.getSiteMeasurements();
for (SiteMeasurements siteMeasurements : siteMeasurementsList) {
List<SiteMeasurementsIndexMeasuredValue> measuredValueList = siteMeasurements.getMeasuredValue();
for (SiteMeasurementsIndexMeasuredValue siteMeasurementsIndexMeasuredValue : measuredValueList) {
MeasuredValue measuredValue = siteMeasurementsIndexMeasuredValue.getMeasuredValue();
BasicData basicData = measuredValue.getBasicData();
if (basicData instanceof TrafficFlow) {
VehicleFlowValue value = ((TrafficFlow) basicData).getVehicleFlow();
LOG.info("Vehicle flow rate : " + value.getVehicleFlowRate().intValue());
} else if (basicData instanceof TrafficSpeed) {
float speed = ((TrafficSpeed) basicData).getAverageVehicleSpeed().getSpeed();
LOG.info("Traffic speed : " + speed);
} else if (basicData instanceof TrafficHeadway) {
float headWay = ((TrafficHeadway) basicData).getAverageTimeHeadway().getDuration();
LOG.info("Traffic Headway : " + headWay);
} else if (basicData instanceof TrafficConcentration) {
float percentage = ((TrafficConcentration) basicData).getOccupancy().getPercentage();
LOG.info("Traffic concentration percentage : " + percentage);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
LOG.error(e.getMessage());
}
LOG.info("TMU Request: Processing Completed Successfuly");
}
开发者ID:ntisservices,项目名称:OBSOLETE-ntis-java-web-services-Release2.4,代码行数:36,代码来源:TMUTrafficDataServiceImpl.java
示例6: handle
import com.thales.ntis.subscriber.datex.D2LogicalModel; //导入方法依赖的package包/类
@Override
public void handle(D2LogicalModel d2LogicalModel) {
LOG.info("handling VMS Request !");
try {
VmsPublication payloadPublication = (VmsPublication)
d2LogicalModel.getPayloadPublication();
if (payloadPublication != null) {
VmsUnit vmsUnit =
payloadPublication.getVmsUnit().get(0);
if (vmsUnit != null) {
LOG.info("Vmsunit GUID: " + vmsUnit.getVmsUnitReference().getId());
List<VmsUnitVmsIndexVms> vmsIndexList = vmsUnit.getVms();
if (vmsIndexList.size() > 0) {
VmsUnitVmsIndexVms vmsUnitVmsIndexVms =
vmsIndexList.get(0);
List<VmsMessageIndexVmsMessage> vmsMessageList =
vmsUnitVmsIndexVms.getVms().getVmsMessage();
if (vmsMessageList.size() > 0) {
VmsMessage vmsMessage =
vmsMessageList.get(0).getVmsMessage();
List<TextPage> textPageList =
vmsMessage.getTextPage();
if (textPageList.size() > 0) {
TextPage textPage = textPageList.get(0);
VmsText vmsText =
textPage.getVmsText();
List<VmsTextLineIndexVmsTextLine> vmsTextLineList = vmsText.getVmsTextLine();
if (vmsTextLineList.size() > 0) {
VmsTextLineIndexVmsTextLine vmsTextLineIndexVmsTextLine = vmsTextLineList.get(0);
LOG.info(" vms text line " +
vmsTextLineIndexVmsTextLine.getVmsTextLine().getVmsTextLine());
}
}
}
}
}
}
} catch (Exception e) {
LOG.error(e.getMessage());
}
LOG.info("VMSTraffic Data Request: Processing Completed Successfuly");
}
开发者ID:ntisservices,项目名称:OBSOLETE-ntis-java-web-services-Release2.4,代码行数:48,代码来源:VMSTrafficDataServiceImpl.java