Examples of Deduplicator


Examples of org.locationtech.geogig.storage.Deduplicator

        List<ObjectId> toSend = new LinkedList<ObjectId>(traverser.commits);
        Collections.reverse(toSend);
        Set<ObjectId> have = new HashSet<ObjectId>(traverser.have);

        Deduplicator deduplicator = deduplicationService.createDeduplicator();
        try {
            sendPackedObjects(toSend, have, deduplicator, progress);
        } finally {
            deduplicator.release();
        }

        ObjectId originalRemoteRefValue = ObjectId.NULL;
        if (remoteRef.isPresent()) {
            originalRemoteRefValue = remoteRef.get().getObjectId();
View Full Code Here

Examples of org.locationtech.geogig.storage.Deduplicator

        if (refList.isEmpty()) {
            ref = null;
        } else {
            ref = refList.get(0);
        }
        Deduplicator deduplicator = cli.getGeogig().command(CreateDeduplicator.class).call();
        try {
            Iterator<RevObject> iter = cli.getGeogig() //
                    .command(WalkGraphOp.class).setReference(ref) //
                    .setDeduplicator(deduplicator) //
                    // .setStrategy(lsStrategy) //
                    .call();

            final ConsoleReader console = cli.getConsole();
            if (!iter.hasNext()) {
                if (ref == null) {
                    console.println("The working tree is empty");
                } else {
                    console.println("The specified path is empty");
                }
                return;
            }

            Function<RevObject, CharSequence> printFunctor = new Function<RevObject, CharSequence>() {
                @Override
                public CharSequence apply(RevObject input) {
                    if (verbose) {
                        return String.format("%s: %s %s", input.getId(), input.getType(), input);
                    } else {
                        return String.format("%s: %s", input.getId(), input.getType());
                    }
                }
            };

            Iterator<CharSequence> lines = Iterators.transform(iter, printFunctor);

            while (lines.hasNext()) {
                console.println(lines.next());
            }
            console.flush();
        } finally {
            deduplicator.release();
        }
    }
View Full Code Here

Examples of org.locationtech.geogig.storage.Deduplicator

            }

            Request request = getRequest();
            final GeoGIG ggit = getGeogig(request).get();
            final Repository repository = ggit.getRepository();
            final Deduplicator deduplicator = ggit.command(CreateDeduplicator.class).call();

            BinaryPackedObjects packer = new BinaryPackedObjects(repository.stagingDatabase());
            Representation rep = new RevObjectBinaryRepresentation(packer, want, have, deduplicator);
            Response response = getResponse();
            response.setEntity(rep);
View Full Code Here

Examples of org.opentripplanner.routing.trippattern.Deduplicator

        TripPattern firstTripPattern  = new TripPattern(firstRoute, firstStopPattern);
        TripPattern secondTripPattern = new TripPattern(secondRoute, secondStopPattern);
        TripPattern thirdTripPattern  = new TripPattern(thirdRoute, thirdStopPattern);

        TripTimes firstTripTimes  = new TripTimes(firstTrip, firstStopTimes, new Deduplicator());
        TripTimes secondTripTimes = new TripTimes(secondTrip, secondStopTimes, new Deduplicator());
        TripTimes thirdTripTimes  = new TripTimes(thirdTrip, thirdStopTimes, new Deduplicator());

        firstTripPattern.add(firstTripTimes);
        secondTripPattern.add(secondTripTimes);
        thirdTripPattern.add(thirdTripTimes);
View Full Code Here

Examples of org.opentripplanner.routing.trippattern.Deduplicator

        stopTimes.add(stopDwellTime);
        stopTimes.add(stopArriveTime);
        trip.setId(agencyAndId);
        trip.setTripHeadsign("The right");

        TripTimes tripTimes = new TripTimes(trip, stopTimes, new Deduplicator());
        StopPattern stopPattern = new StopPattern(stopTimes);
        TripPattern tripPattern = new TripPattern(route, stopPattern);

        when(depart.getTripPattern()).thenReturn(tripPattern);
        when(dwell.getTripPattern()).thenReturn(tripPattern);
View Full Code Here

Examples of org.opentripplanner.routing.trippattern.Deduplicator

        stopArriveTime.setStop(stopArrive);
        stopTimes.add(stopDepartTime);
        stopTimes.add(stopArriveTime);
        trip.setId(agencyAndId);

        TripTimes tripTimes = new TripTimes(trip, stopTimes, new Deduplicator());
        StopPattern stopPattern = new StopPattern(stopTimes);
        TripPattern tripPattern = new TripPattern(route, stopPattern);

        when(depart.getTripPattern()).thenReturn(tripPattern);
View Full Code Here

Examples of org.opentripplanner.routing.trippattern.Deduplicator

        stopTimes.add(stopDepartTime);
        stopTimes.add(stopDwellTime);
        stopTimes.add(stopArriveTime);
        trip.setId(agencyAndId);

        TripTimes tripTimes = new TripTimes(trip, stopTimes, new Deduplicator());
        StopPattern stopPattern = new StopPattern(stopTimes);
        TripPattern tripPattern = new TripPattern(route, stopPattern);

        when(depart.getTripPattern()).thenReturn(tripPattern);
        when(dwell.getTripPattern()).thenReturn(tripPattern);
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.