Package org.openstreetmap.josm.io

Examples of org.openstreetmap.josm.io.ChangesetQuery$ChangesetQueryUrlException


            }
            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
                return;
            else if (im.isFullyIdentified()) {
                query = query.forUser(im.getUserId());
            } else {
                // we only know the users name, not its id. Nevermind, try to read
                // its open changesets anyway.
                //
                query = query.forUser(im.getUserName());
            }
            changesets = reader.queryChangesets(
                    query,
                    getProgressMonitor().createSubTaskMonitor(1, false /* not internal */)
            );
View Full Code Here


            dialog.setVisible(true);
            if (dialog.isCanceled())
                return;

            try {
                ChangesetQuery query = dialog.getChangesetQuery();
                if (query == null) return;
                ChangesetQueryTask task = new ChangesetQueryTask(ChangesetCacheManager.this, query);
                ChangesetCacheManager.getInstance().runDownloadTask(task);
            } catch (IllegalStateException e) {
                JOptionPane.showMessageDialog(ChangesetCacheManager.this, e.getMessage(), tr("Error"), JOptionPane.ERROR_MESSAGE);
View Full Code Here

            JosmUserIdentityManager im = JosmUserIdentityManager.getInstance();
            if (im.isAnonymous()) {
                alertAnonymousUser();
                return;
            }
            ChangesetQuery query = new ChangesetQuery();
            if (im.isFullyIdentified()) {
                query = query.forUser(im.getUserId());
            } else {
                query = query.forUser(im.getUserName());
            }
            ChangesetQueryTask task = new ChangesetQueryTask(ChangesetCacheManager.this, query);
            ChangesetCacheManager.getInstance().runDownloadTask(task);
        }
View Full Code Here

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

            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 */)
                );
            } catch(Exception e) {
View Full Code Here

     *
     * @return the changeset query. null, if the data entered doesn't represent
     * a valid changeset query.
     */
    public ChangesetQuery buildChangesetQuery() {
        ChangesetQuery query = new ChangesetQuery();
        if (cbUserRestriction.isSelected()) {
            if (! pnlUserRestriction.isValidChangesetQuery())
                return null;
            pnlUserRestriction.fillInQuery(query);
        }
View Full Code Here

        return null;
    }

    public ChangesetQuery buildChangesetQuery() {
        BasicQuery q = getSelectedQuery();
        ChangesetQuery query = new ChangesetQuery();
        JosmUserIdentityManager im = JosmUserIdentityManager.getInstance();
        if (q == null)
            return query;
        switch(q) {
        case MOST_RECENT_CHANGESETS:
            break;
        case MY_OPEN_CHANGESETS:
            query = query.beingOpen(true);
            break;
        case CHANGESETS_IN_MAP_VIEW:
            Bounds b = Main.map.mapView.getLatLonBounds(Main.map.mapView.getBounds());
            query = query.inBbox(b);
            break;
        }

        if (cbMyChangesetsOnly.isSelected()) {
            if (im.isPartiallyIdentified()) {
                query = query.forUser(im.getUserName());
            } else if (im.isFullyIdentified()) {
                query = query.forUser(im.getUserId()).beingOpen(true);
            } else
                // anonymous -- can happen with a fresh config.
                throw new IllegalStateException(tr("Cannot create changeset query for open changesets of anonymous user"));
        }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.io.ChangesetQuery$ChangesetQueryUrlException

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.