use of uk.org.siri.siri_2.EntryQualifierStructure in project onebusaway-application-modules by camsys.
the class ServiceAlertsHelperV2 method addSituationElement.
/*
public void addSituationExchangeToServiceDelivery(ServiceDelivery serviceDelivery,
Map<String, ServiceAlertBean> currentServiceAlerts) {
addSituationExchangeToServiceDelivery(serviceDelivery, currentServiceAlerts.values());
}
public void addClosedSituationExchangesToSiri(
ServiceDelivery serviceDelivery, Collection<String> deletedIds) {
Map<String, PtSituationElementStructure> ptSituationElements = new HashMap<String, PtSituationElementStructure>();
for (String id : deletedIds) {
PtSituationElementStructure ptSit = new PtSituationElementStructure();
EntryQualifierStructure value = new EntryQualifierStructure();
value.setValue(id);
ptSit.setSituationNumber(value);
ptSit.setProgress(WorkflowStatusEnumeration.CLOSED);
ptSituationElements.put(id, ptSit);
}
addPtSituationElementsToServiceDelivery(serviceDelivery,
ptSituationElements);
}
*/
private void addSituationElement(TransitDataService transitDataService, Map<String, PtSituationElementStructure> ptSituationElements, List<SituationRefStructure> situationRefs) {
if (situationRefs == null)
return;
for (SituationRefStructure situationRef : situationRefs) {
String situationId = situationRef.getSituationSimpleRef().getValue();
ServiceAlertBean serviceAlert = transitDataService.getServiceAlertForId(situationId);
PtSituationElementStructure e = getServiceAlertBeanAsPtSituationElementStructure(serviceAlert);
ptSituationElements.put(situationId, e);
}
}
use of uk.org.siri.siri_2.EntryQualifierStructure in project onebusaway-application-modules by camsys.
the class ServiceAlertsHelperV2 method getServiceAlertBeanAsPtSituationElementStructure.
public PtSituationElementStructure getServiceAlertBeanAsPtSituationElementStructure(ServiceAlertBean serviceAlert) {
PtSituationElementStructure ptSit = new PtSituationElementStructure();
EntryQualifierStructure value = new EntryQualifierStructure();
value.setValue(serviceAlert.getId());
ptSit.setSituationNumber(value);
if (serviceAlert.getCreationTime() != 0)
ptSit.setCreationTime(DateUtil.toXmlGregorianCalendar(serviceAlert.getCreationTime()));
handleDescriptions(serviceAlert, ptSit);
handleOtherFields(serviceAlert, ptSit);
handleAffects(serviceAlert, ptSit);
handleConsequences(serviceAlert, ptSit);
return ptSit;
}
Aggregations