Package rocks.xmpp.extensions.geoloc.model

Examples of rocks.xmpp.extensions.geoloc.model.GeoLocation


                                @Override
                                public void handle(ActionEvent actionEvent) {

                                    try {
                                        GeoLocationManager geoLocationManager = xmppSession.getExtensionManager(GeoLocationManager.class);
                                        geoLocationManager.publish(new GeoLocation(45.44, 12.33));
                                    } catch (XmppException e) {
                                        e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
                                    }

                                }
View Full Code Here


                "          <lat>45.44</lat>\n" +
                "          <locality>Venice</locality>\n" +
                "          <lon>12.33</lon>\n" +
                "          <tzo>-08:00</tzo>\n" +
                "        </geoloc>\n";
        GeoLocation geoLocation = unmarshal(xml, GeoLocation.class);
        Assert.assertNotNull(geoLocation);
        Assert.assertEquals(geoLocation.getLanguage(), "en");
        Assert.assertEquals(geoLocation.getAccuracy(), 20.0);
        Assert.assertEquals(geoLocation.getCountry(), "Italy");
        Assert.assertEquals(geoLocation.getLatitude(), 45.44);
        Assert.assertEquals(geoLocation.getLocality(), "Venice");
        Assert.assertEquals(geoLocation.getLongitude(), 12.33);
        Assert.assertEquals(geoLocation.getTimeZone(), TimeZone.getTimeZone("GMT-08:00"));

    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.geoloc.model.GeoLocation

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.