Examples of City


Examples of net.goodsSystem.city.domain.City

  {
    String id=getRequest().getParameter("id");
    if(id!=null&&!"".equals(id)){
      city=cityConfigService.getCityById(id);
    }else{
      city=new City();
    }
    return SUCCESS;
  }
View Full Code Here

Examples of org.dozer.vo.deep.City

  public House getHouse() {
    House house = newInstance(House.class);
    Address address = newInstance(Address.class);
    address.setStreet("1234 street");
    City city = newInstance(City.class);
    city.setName("Denver");
    address.setCity(city);

    house.setAddress(address);

    Person person = newInstance(Person.class);
View Full Code Here

Examples of org.drools.planner.examples.tsp.domain.City

            readConstantLine("NODE_COORD_SECTION");
            List<City> cityList = new ArrayList<City>(cityListSize);
            for (int i = 0; i < cityListSize; i++) {
                String line = bufferedReader.readLine();
                String[] lineTokens = splitBySpace(line, 3, 4);
                City city = new City();
                city.setId(Long.parseLong(lineTokens[0]));
                city.setLatitude(Double.parseDouble(lineTokens[1]));
                city.setLongitude(Double.parseDouble(lineTokens[2]));
                if (lineTokens.length >= 4) {
                    city.setName(lineTokens[3]);
                }
                cityList.add(city);
            }
            travelingSalesmanTour.setCityList(cityList);
        }
View Full Code Here

Examples of org.encog.examples.nonlinear.tsp.City

    cities = new City[CITIES];
    for (int i = 0; i < cities.length; i++) {
      int xPos = (int) (Math.random() * MAP_SIZE);
      int yPos = (int) (Math.random() * MAP_SIZE);

      cities[i] = new City(xPos, yPos);
    }
  }
View Full Code Here

Examples of org.encog.examples.nonlinear.tsp.City

    cities = new City[CITIES];
    for (int i = 0; i < cities.length; i++) {
      int xPos = (int) (Math.random() * MAP_SIZE);
      int yPos = (int) (Math.random() * MAP_SIZE);

      cities[i] = new City(xPos, yPos);
    }
  }
View Full Code Here

Examples of org.encog.examples.nonlinear.tsp.City

    double result = 0.0;
   
    int[] path = (int[])genome.getOrganism();
   
    for (int i = 0; i < cities.length - 1; i++) {
      City city1 = cities[path[i]];
      City city2 = cities[path[i+1]];
     
      final double dist = city1.proximity(city2);
      result += dist;
    }
   
View Full Code Here

Examples of org.fluxtream.core.domain.metadata.City

    public VisitedCityModel(VisitedCity vcity, Configuration env, String date){
        this.visitedCityId = vcity.getId();
        this.daysInferred = vcity.daysInferred;
        this.date = date;
        source = vcity.locationSource.toString();
        City city = vcity.city;
        name = city.geo_name;
        country = env.getCountry(city.geo_country_code);
        if (country == null)
            return;
        country = WordUtils.capitalize(country.toLowerCase());
View Full Code Here

Examples of org.fluxtream.core.domain.metadata.City

    @Autowired
    WWOHelper wwoHelper;

    @Override
  public TimeZone getTimeZone(double latitude, double longitude) {
    City closestCity = getClosestCity(latitude, longitude);
    TimeZone timeZone = TimeZone.getTimeZone(closestCity.geo_timezone);
    return timeZone;
  }
View Full Code Here

Examples of org.fluxtream.core.domain.metadata.City

        em.flush();
    }

    @Override
    public void setDayMainCity(final long guestId, final float latitude, final float longitude, final String date) {
        final City closestCity = getClosestCity(latitude, longitude);
        setDayMainCity(guestId, date, closestCity);
    }
View Full Code Here

Examples of org.fluxtream.core.domain.metadata.City

    }

    @Override
    public List<WeatherInfo> getWeatherInfo(double latitude, double longitude,
                                            String date) {
        City closestCity = getClosestCity(latitude, longitude);
        List<WeatherInfo> weather = JPAUtils.find(em, WeatherInfo.class, "weather.byDateAndCity.between", closestCity.geo_name, date);

        if (weather != null && weather.size() > 0) {
            addIcons(weather);
            return weather;
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.