Package net.fortytwo.twitlogic.model

Examples of net.fortytwo.twitlogic.model.Place


            client.getStatistics().placeQueued(p);

            if (asynchronous) {
                return placeMappingQueue.offer(p.getId());
            } else {
                Place p2 = client.fetchPlace(p.getId());
                boolean b = placeMappingHandler.isOpen();
                if (b) {
                    placeMappingHandler.handle(p2);
                }
View Full Code Here


        }
    }

    public synchronized Place fetchPlace(String id) throws TwitterClientException {
        try {
            return new Place(twitter.getGeoDetails(id));
        } catch (TwitterException e) {
            throw new TwitterClientException(e);
        }
    }
View Full Code Here

    public Place fetchPlace(final String id) throws TwitterClientException {
        HttpGet request = new HttpGet(TwitterAPI.API_PLACES_URL + id + ".json");

        JSONObject object = requestJSONObject(request);
        try {
            return new Place(object);
        } catch (TweetParseException e) {
            throw new TwitterClientException(e);
        }
    }
View Full Code Here

                            continue;
                        }

                        try {
                            // Make an HTTP request for the place
                            Place p = client.fetchPlace(id);

                            // Handle the result
                            if (!resultHandler.isOpen()) {
                                LOGGER.fine("closing place mapping queue");
                                closed = true;
View Full Code Here

                PersistenceContext pc
                        = new PersistenceContext(c);

                PlacePersistenceHelper ph = new PlacePersistenceHelper(pc, client, false);
                for (String id : ids) {
                    Place p = new Place(id);
                    Feature f = pc.persist(p);
                    ph.submit(p, f);
                    c.commit();
                }
            } finally {
View Full Code Here

TOP

Related Classes of net.fortytwo.twitlogic.model.Place

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.