Package org.qi4j.sample.dcicargo.pathfinder_b.api

Examples of org.qi4j.sample.dcicargo.pathfinder_b.api.TransitEdge


                    if( depth >= voyage.getTransitEdges().size() )
                    {
                        continue;
                    }

                    final TransitEdge voyageEdge = voyage.getTransitEdges().get( depth );

                    final String departure = voyageEdge.getFromUnLocode();
                    final String arrival = voyageEdge.getToUnLocode();
                    final Date departureTime = voyageEdge.getFromDate();
                    final Date arrivalTime = voyageEdge.getToDate();

                    boolean expectsDeparture = departure.equals( expectedDeparture );
                    boolean uniqueDeparture = !oldDepartures.contains( departure );
                    boolean uniqueArrival = !oldDepartures.contains( arrival );
                    boolean afterLastArrivalTime = departureTime.after( lastArrivalTime );
View Full Code Here


            for( final String to : locations )
            {
                fromDate = nextDate( date );
                toDate = nextDate( fromDate );
                date = nextDate( toDate );
                transitEdges.add( new TransitEdge( voyageNumber, from, to, fromDate, toDate ) );

                // Arrival location of last carrier movement becomes departure location of next
                from = to;
            }

            // Final carrier movement
            fromDate = nextDate( date );
            toDate = nextDate( fromDate );
            transitEdges.add( new TransitEdge( voyageNumber, from, destination, fromDate, toDate ) );

            voyages.add( new TransitPath( transitEdges ) );
        }

        // Output for testing...
View Full Code Here

TOP

Related Classes of org.qi4j.sample.dcicargo.pathfinder_b.api.TransitEdge

Copyright © 2018 www.massapicom. 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.