Examples of City


Examples of com.maxmind.geoip2.record.City

            final Country country = geolocAndGetCountry(remoteAddress);
            geolocData.setRemoteAddress(remoteAddress);
            if(country != null
                    && StringUtils.isNotEmpty(country.getIsoCode())){
                geolocData.setCountry(country);
                final City city = geolocAndGetCity(remoteAddress);
                geolocData.setCity(city);
            }
        }
        return geolocData;
    }
View Full Code Here

Examples of com.maxmind.geoip2.record.City

   
    /**
     *
     */
    public String geolocAndGetCityName(final String customerRemoteAddr) throws Exception {
        final City city = geolocAndGetCity(customerRemoteAddr);
        return city.getName();
    }
View Full Code Here

Examples of com.maxmind.geoip2.record.City

     *
     */
    protected EngineEcoSession handleGeolocData(final HttpServletRequest request, EngineEcoSession engineEcoSession, final GeolocData geolocData) throws Exception {
        if (geolocData != null) {
            // FIND LATITUDE/LONGITUDE BY CITY/COUNTRY
            City city = geolocData.getCity();
            Country country = geolocData.getCountry();
            GeolocCity geolocCity = geolocService.getGeolocCityByCityAndCountry(city.getName(), country.getName());
            if (geolocCity != null) {
                geolocData.setLatitude(geolocCity.getLatitude());
                geolocData.setLongitude(geolocCity.getLongitude());
            } else {
                // LATITUDE/LONGITUDE DOESN'T EXIST - WE USE GOOGLE GEOLOC TO FOUND IT
                geolocCity = geolocService.geolocByCityAndCountry(city.getName(), country.getName());
                if (geolocCity != null) {
                    geolocData.setLatitude(geolocCity.getLatitude());
                    geolocData.setLongitude(geolocCity.getLongitude());
                }
            }
View Full Code Here

Examples of com.netflix.zeno.examples.address.AddressRefactor.City

    }

    @Override
    protected AddressRefactor doDeserialize(NFDeserializationRecord rec) {
        String streetAddress = deserializePrimitiveString(rec, "street");
        City city = deserializeObject(rec, "city");
        String postalCode = deserializeObject(rec, "postalCode");

        return new AddressRefactor(streetAddress, city, postalCode);
    }
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

    beginCities = database.countClusterElements("City");

    Country italy = new Country("Italy");

    Profile garibaldi = new Profile("GGaribaldi", "Giuseppe", "Garibaldi", null);
    garibaldi.setLocation(new Address("Residence", new City(italy, "Rome"), "Piazza Navona, 1"));

    Profile bonaparte = new Profile("NBonaparte", "Napoleone", "Bonaparte", garibaldi);
    bonaparte.setLocation(new Address("Residence", garibaldi.getLocation().getCity(), "Piazza di Spagna, 111"));
    database.save(bonaparte);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

  }

  @Test(dependsOnMethods = "testCityEquality")
  public void testSaveCircularLink() {
    Profile winston = new Profile("WChurcill", "Winston", "Churcill", null);
    winston.setLocation(new Address("Residence", new City(new Country("England"), "London"), "unknown"));

    Profile nicholas = new Profile("NChurcill", "Nicholas ", "Churcill", winston);
    nicholas.setLocation(winston.getLocation());

    nicholas.setInvitedBy(winston);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

  @Test(dependsOnMethods = "testQueryCircular")
  public void testSaveMultiCircular() {
    startRecordNumber = database.countClusterElements("Profile");

    Profile bObama = new Profile("ThePresident", "Barack", "Obama", null);
    bObama.setLocation(new Address("Residence", new City(new Country("Hawaii"), "Honolulu"), "unknown"));
    bObama.addFollower(new Profile("PresidentSon1", "Malia Ann", "Obama", bObama));
    bObama.addFollower(new Profile("PresidentSon2", "Natasha", "Obama", bObama));

    database.save(bObama);
  }
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

    Account a;
    for (Object o : database.browseCluster("Account")) {
      a = (Account) o;

      if (i % 2 == 0)
        a.getAddresses().set(0, new Address("work", new City(new Country("Spain"), "Madrid"), "Plaza central"));

      a.setSalary(i + 500.10f);

      database.save(a);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

    database = ODatabaseObjectPool.global().acquire(url, "admin", "admin");

    long profiles = database.countClass("Profile");

    Profile neo = new Profile("Neo").setValue("test").setLocation(
        new Address("residence", new City(new Country("Spain"), "Madrid"), "Rio de Castilla"));
    neo.addFollowing(new Profile("Morpheus"));
    neo.addFollowing(new Profile("Trinity"));

    database.save(neo);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

  @Test
  public void createAnnotatedObjects() {
    database = new ODatabaseObjectTx(url).open("admin", "admin");

    Country austria = new Country("Austria");
    City graz = new City(austria, "Graz");
    database.save(graz);

    account = new Account();
    database.save(account);
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.