Examples of unloadLocation()


Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.itinerary.Leg.unloadLocation()

            {
                // After UNLOAD, expect LOAD location and voyage of following itinerary leg, or CLAIM if no more legs
                for( Iterator<Leg> it = itinerary.legs().get().iterator(); it.hasNext(); )
                {
                    final Leg leg = it.next();
                    if( leg.unloadLocation().get().equals( lastUnloadLocation ) )
                    {
                        // Cargo has a matching unload location in itinerary

                        if( it.hasNext() )
                        {
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.itinerary.Leg.unloadLocation()

                    item.add( new Label( "loadLocation", leg.loadLocation().get().getCode() ) );
                    item.add( new Label( "loadTime", new Model<Date>( leg.loadTime().get() ) ) );
                    item.add( new Label( "voyage", leg.voyage().get().voyageNumber().get().number().get() ) );

                    Boolean isMisrouted = routingStatus == RoutingStatus.MISROUTED && item.getIndex() == ( getList().size() - 1 );
                    item.add( new Label( "unloadLocation", leg.unloadLocation().get().getCode() )
                                  .add( new ErrorColor( isMisrouted ) ) );

                    item.add( new Label( "unloadTime", new Model<Date>( leg.unloadTime().get() ) ) );
                }
            } );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.itinerary.Leg.unloadLocation()

            {
                Leg leg = item.getModelObject();
                item.add( new Label( "voyage", leg.voyage().get().toString() ),
                          new Label( "loadLocation", leg.loadLocation().get().getCode() ),
                          new Label( "loadTime", new Model<Date>( leg.loadTime().get() ) ),
                          new Label( "unloadLocation", leg.unloadLocation().get().getCode() ),
                          new Label( "unloadTime", new Model<Date>( leg.unloadTime().get() ) )
                );
            }
        } );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.itinerary.Leg.unloadLocation()

                    item.add( new Label( "loadLocation", leg.loadLocation().get().getCode() ) );
                    item.add( new Label( "loadTime", new Model<Date>( leg.loadTime().get() ) ) );
                    item.add( new Label( "voyage", leg.voyage().get().voyageNumber().get().number().get() ) );

                    Boolean isMisrouted = routingStatus == MISROUTED && item.getIndex() == ( getList().size() - 1 );
                    item.add( new Label( "unloadLocation", leg.unloadLocation().get().getCode() )
                                  .add( new ErrorColor( isMisrouted ) ) );

                    item.add( new Label( "unloadTime", new Model<Date>( leg.unloadTime().get() ) ) );
                }
            } );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.itinerary.Leg.unloadLocation()

                     *
                     * The itinerary index starts over from the first leg of the new itinerary
                     * */
                    itineraryProgressIndex = 0;
                }
                else if( !plannedCarrierMovement.unloadLocation().get().equals( c.unloadLocation ) )
                {
                    newDelivery.isMisdirected().set( true );
                    cargo.delivery().set( newDeliveryBuilder.newInstance() );
                    throw new CargoMisdirectedException( c.unloadEvent, "Itinerary expected unload in "
                                                                        + plannedCarrierMovement.unloadLocation()
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.itinerary.Leg.unloadLocation()

                else if( !plannedCarrierMovement.unloadLocation().get().equals( c.unloadLocation ) )
                {
                    newDelivery.isMisdirected().set( true );
                    cargo.delivery().set( newDeliveryBuilder.newInstance() );
                    throw new CargoMisdirectedException( c.unloadEvent, "Itinerary expected unload in "
                                                                        + plannedCarrierMovement.unloadLocation()
                        .get() );
                }
                else if( !plannedCarrierMovement.voyage().get().equals( c.voyage ) )
                {
                    // Do we care if cargo unloads from an unexpected carrier?
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.itinerary.Leg.unloadLocation()

                {
                    newDelivery.isMisdirected().set( true );
                    cargo.delivery().set( newDeliveryBuilder.newInstance() );

                    // ...Expected arrival location - should we accept this?
                    if( plannedCarrierMovement.unloadLocation()
                        .get()
                        .equals( carrierMovement.arrivalLocation().get() ) )
                    {
                        throw new CargoMisdirectedException( c.loadEvent, c.itinerary, "Cargo is heading to expected arrival location "
                                                                                       + plannedCarrierMovement.unloadLocation()
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.itinerary.Leg.unloadLocation()

                    if( plannedCarrierMovement.unloadLocation()
                        .get()
                        .equals( carrierMovement.arrivalLocation().get() ) )
                    {
                        throw new CargoMisdirectedException( c.loadEvent, c.itinerary, "Cargo is heading to expected arrival location "
                                                                                       + plannedCarrierMovement.unloadLocation()
                            .get() + " but on unexpected voyage "
                                                                                       + c.voyage
                            .toString() + ". Notify shipper to unload unexpected cargo in next port." );
                    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.itinerary.Leg.unloadLocation()

                                                                                   + plannedCarrierMovement.voyage()
                        .get() );
                }

                // Unexpected carrier destination
                if( !plannedCarrierMovement.unloadLocation().get().equals( carrierMovement.arrivalLocation().get() ) )
                {
                    newDelivery.isMisdirected().set( true );
                    cargo.delivery().set( newDeliveryBuilder.newInstance() );
                    throw new CargoMisdirectedException( c.loadEvent, "Itinerary expects voyage " + c.voyage.toString()
                                                                      + " to arrive in " + plannedCarrierMovement.unloadLocation()
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.itinerary.Leg.unloadLocation()

                if( !plannedCarrierMovement.unloadLocation().get().equals( carrierMovement.arrivalLocation().get() ) )
                {
                    newDelivery.isMisdirected().set( true );
                    cargo.delivery().set( newDeliveryBuilder.newInstance() );
                    throw new CargoMisdirectedException( c.loadEvent, "Itinerary expects voyage " + c.voyage.toString()
                                                                      + " to arrive in " + plannedCarrierMovement.unloadLocation()
                        .get() + " but carrier is now going to "
                                                                      + carrierMovement.arrivalLocation().get() );
                }

                // True exception
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.