use of uk.org.siri.siri.EntryQualifierStructure in project onebusaway-application-modules by camsys.
the class ServiceAlertsHelper method getServiceAlertBeanAsPtSituationElementStructure.
public PtSituationElementStructure getServiceAlertBeanAsPtSituationElementStructure(ServiceAlertBean serviceAlert) {
PtSituationElementStructure ptSit = new PtSituationElementStructure();
EntryQualifierStructure value = new EntryQualifierStructure();
if (serviceAlert != null) {
value.setValue(serviceAlert.getId());
ptSit.setSituationNumber(value);
} else {
// nothing to do
return ptSit;
}
if (serviceAlert.getCreationTime() != 0)
ptSit.setCreationTime(new Date(serviceAlert.getCreationTime()));
handleDescriptions(serviceAlert, ptSit);
handleOtherFields(serviceAlert, ptSit);
handleAffects(serviceAlert, ptSit);
handleConsequences(serviceAlert, ptSit);
return ptSit;
}
use of uk.org.siri.siri.EntryQualifierStructure in project onebusaway-application-modules by camsys.
the class ServiceAlertsHelper method addClosedSituationExchangesToSiri.
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);
}
Aggregations