Package org.openstreetmap.josm.io

Examples of org.openstreetmap.josm.io.OsmServerChangesetReader


            } else if (im.isPartiallyIdentified()) {
                refreshUserIdentity();
            }
            if (canceled)return;
            synchronized(this) {
                reader = new OsmServerChangesetReader();
            }
            ChangesetQuery query = new ChangesetQuery().beingOpen(true);
            if (im.isAnonymous())
                // we still don't know anything about the current user. Can't retrieve
                // its changesets
View Full Code Here


     * @param changesetId the changeset id
     * @throws OsmTransferException thrown if something went wrong
     */
    protected void downloadChangeset(int changesetId) throws OsmTransferException {
        synchronized(this) {
            reader = new OsmServerChangesetReader();
        }
        Changeset cs = reader.readChangeset(changesetId, getProgressMonitor().createSubTaskMonitor(0, false));
        synchronized(this) {
            reader = null;
        }
View Full Code Here

                    getProgressMonitor().setCustomText(tr("({0}/{1}) Downloading changeset {2}...", i, toDownload.size(), id));
                    downloadChangeset(id);
                }
                if (canceled) return;
                synchronized(this) {
                    reader = new OsmServerChangesetReader();
                }
                getProgressMonitor().setCustomText(tr("({0}/{1}) Downloading content for changeset {2}...", i, toDownload.size(), id));
                ChangesetDataSet ds = reader.downloadChangeset(id, getProgressMonitor().createSubTaskMonitor(0, false));
                synchronized(this) {
                    reader = null;
View Full Code Here

    @Override
    protected void realRun() throws SAXException, IOException, OsmTransferException {
        try {
            synchronized (this) {
                reader = new OsmServerChangesetReader();
            }
            downloadedChangesets = new HashSet<>();
            downloadedChangesets.addAll(reader.readChangesets(idsToDownload, getProgressMonitor().createSubTaskMonitor(0, false)));
        } catch(OsmTransferException e) {
            if (canceled)
View Full Code Here

                HistoryDataSet ds = null;
                try {
                    reader = new OsmServerHistoryReader(pid.getType(), pid.getUniqueId());
                    ds = reader.parseHistory(progressMonitor.createSubTaskMonitor(1, false));
                    // load corresponding changesets (mostly for changeset comment)
                    for (final Changeset i : new OsmServerChangesetReader().queryChangesets(
                            new ChangesetQuery().forChangesetIds(ds.getChangesetIds()), progressMonitor.createSubTaskMonitor(1, false))) {
                        ds.putChangeset(i);
                    }
                } catch(OsmTransferException e) {
                    if (canceled)
View Full Code Here

        protected void realRun() throws SAXException, IOException, OsmTransferException {
            try {
                userInfo = fetchUserInfo();
                if (canceled)
                    return;
                reader = new OsmServerChangesetReader();
                ChangesetQuery query = new ChangesetQuery().forUser(userInfo.getId()).beingOpen(true);
                changesets = reader.queryChangesets(
                        query,
                        getProgressMonitor().createSubTaskMonitor(1, false /* not internal */)
                );
View Full Code Here

                query = query.forUser(JosmUserIdentityManager.getInstance().getUserId());
            }
            if (canceled) return;
            getProgressMonitor().indeterminateSubTask(tr("Query and download changesets ..."));
            synchronized(this) {
                changesetReader= new OsmServerChangesetReader();
            }
            downloadedChangesets = new HashSet<>();
            downloadedChangesets.addAll(changesetReader.queryChangesets(query, getProgressMonitor().createSubTaskMonitor(0, false)));
            synchronized (this) {
                changesetReader = null;
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.io.OsmServerChangesetReader

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.