Examples of voyage()


Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.handling.HandlingEvent.voyage()

                map.put( "trackingId", trackingId );
                HandlingEvent lastEvent = cargo.delivery().get().lastHandlingEvent().get();
                if( lastEvent != null )
                {
                    String voyageString = lastEvent.voyage().get() != null ?
                                          lastEvent.voyage()
                                              .get()
                                              .voyageNumber()
                                              .get()
                                              .number()
                                              .get() : "UNKNOWN_VOYAGE";
View Full Code Here

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

                {
                    Leg leg = item.getModelObject();

                    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 ) ) );
View Full Code Here

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

                    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?
                    itineraryProgressIndex = c.itineraryProgressIndex + 1;
                }
                else
View Full Code Here

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

                ValueBuilder<NextHandlingEvent> nextHandlingEvent = vbf.newValueBuilder( NextHandlingEvent.class );
                nextHandlingEvent.prototype().handlingEventType().set( LOAD );
                nextHandlingEvent.prototype().location().set( nextCarrierMovement.loadLocation().get() );
                nextHandlingEvent.prototype().time().set( nextCarrierMovement.loadTime().get() );
                nextHandlingEvent.prototype().voyage().set( nextCarrierMovement.voyage().get() );
                newDelivery.nextHandlingEvent().set( nextHandlingEvent.newInstance() );

                // Step 5 - Save cargo delivery snapshot

                cargo.delivery().set( newDeliveryBuilder.newInstance() );
View Full Code Here

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

                    ValueBuilder<NextHandlingEvent> nextHandlingEvent = vbf.newValueBuilder( NextHandlingEvent.class );
                    nextHandlingEvent.prototype().handlingEventType().set( LOAD );
                    nextHandlingEvent.prototype().location().set( firstLeg.loadLocation().get() );
                    nextHandlingEvent.prototype().time().set( firstLeg.loadTime().get() );
                    nextHandlingEvent.prototype().voyage().set( firstLeg.voyage().get() );
                    newDelivery.nextHandlingEvent().set( nextHandlingEvent.newInstance() );
                }

                // Step 5 - Save cargo delivery snapshot
View Full Code Here

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

                        .get()
                        .getString() );
                }

                // Unexpected carrier
                if( !plannedCarrierMovement.voyage().get().equals( c.voyage ) )
                {
                    newDelivery.isMisdirected().set( true );
                    cargo.delivery().set( newDeliveryBuilder.newInstance() );

                    // ...Expected arrival location - should we accept this?
View Full Code Here

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

                                                                                       + c.voyage
                            .toString() + ". Notify shipper to unload unexpected cargo in next port." );
                    }

                    throw new CargoMisdirectedException( c.loadEvent, c.itinerary, "Itinerary expected load onto voyage "
                                                                                   + plannedCarrierMovement.voyage()
                        .get() );
                }

                // Unexpected carrier destination
                if( !plannedCarrierMovement.unloadLocation().get().equals( carrierMovement.arrivalLocation().get() ) )
View Full Code Here

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

        {
            @Override
            protected void populateItem( ListItem<Leg> item )
            {
                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.voyage()

        new InspectLoadedCargo( cargo, handlingEvent ).inspect();

        Leg currentCarrierMovement = itinerary.leg( delivery.itineraryProgressIndex().get() );
        assertThat( currentCarrierMovement.unloadLocation().get(), is( equalTo( DALLAS ) ) );
        assertThat( currentCarrierMovement.unloadTime().get(), is( equalTo( DAY8 ) ) );
        assertThat( currentCarrierMovement.voyage().get(), is( equalTo( V202 ) ) );

        assertDelivery( LOAD, NEWYORK, DAY7, V202,
                        ONBOARD_CARRIER, notArrived,
                        ROUTED, directed, itinerary.eta(), leg3,
                        UNLOAD, DALLAS, DAY8, V202 );
View Full Code Here

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

        // Itinerary should have progressed to leg 5
        Leg nextCarrierMovement = itinerary.leg( cargo.delivery().get().itineraryProgressIndex().get() );
        assertThat( nextCarrierMovement.loadLocation().get(), is( equalTo( ROTTERDAM ) ) );
        assertThat( nextCarrierMovement.loadTime().get(), is( equalTo( DAY20 ) ) );
        assertThat( nextCarrierMovement.voyage().get(), is( equalTo( V203 ) ) );

        assertDelivery( UNLOAD, ROTTERDAM, DAY17, V202,
                        IN_PORT, notArrived,
                        ROUTED, directed, itinerary.eta(), leg5,
                        LOAD, ROTTERDAM, DAY20, V203 ); // leg 5 load location
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.