Examples of City


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

            }
        });
        // local vars: current city and current day
        String currentDate = "";
        Point2D.Double anchorLocation = new Point2D.Double(locationResources.get(0).latitude, locationResources.get(0).longitude);
        City anchorCity = getClosestCity(anchorLocation.x, anchorLocation.y);
        int count = 0;
        LocationFacet lastLocationResourceMatchingAnchor=locationResources.get(0);
        long start = locationResources.get(0).start;

        for (LocationFacet locationResource : locationResources) {
            try {
                City newCity = anchorCity;
                Point2D.Double location = new Point2D.Double(locationResource.latitude, locationResource.longitude);
                boolean withinAnchorRange = isWithinRange(location, anchorLocation);

                if (!withinAnchorRange) {
                    anchorLocation = new Point2D.Double(locationResource.latitude, locationResource.longitude);
View Full Code Here

Examples of org.infinispan.query.indexedembedded.City

   public void testPersistence() throws PersistenceException, ParseException {
      verifyFullTextHasMatches(0);

      Country italy = new Country();
      italy.countryName = "Italy";
      City rome = new City();
      rome.name = "Rome";
      italy.cities.add(rome);

      cache.put("IT", italy);
      assert ! store.contains("IT");
View Full Code Here

Examples of org.infinispan.query.indexedembedded.City

   public void testPersistence() throws CacheLoaderException, ParseException {
      verifyFullTextHasMatches(0);

      Country italy = new Country();
      italy.countryName = "Italy";
      City rome = new City();
      rome.name = "Rome";
      italy.cities.add(rome);

      cache.put("IT", italy);
      assert ! store.containsKey("IT");
View Full Code Here

Examples of org.infinispan.query.indexedembedded.City

   public void testPersistence() throws PersistenceException, ParseException {
      verifyFullTextHasMatches(0);

      Country italy = new Country();
      italy.countryName = "Italy";
      City rome = new City();
      rome.name = "Rome";
      italy.cities.add(rome);

      cache.put("IT", italy);
      assert ! store.contains("IT");
View Full Code Here

Examples of org.jsondoc.sample.pojo.City

    @ApiError(code="9000", description="Illegal argument")
  })
  @RequestMapping(value="/{name}", method=RequestMethod.GET)
  public @ResponseBody @ApiResponseObject Country getCountryByName(@PathVariable @ApiParam(name="name", paramType=ApiParamType.PATH) String name) {
    List<City> cities = new ArrayList<City>();
    cities.add(new City("Sydney", 19329, 43));
    cities.add(new City("Melbourne", 85743, 12));
    cities.add(new City("Perth", 58735, 39));
    return new Country(32198, 5487, "Australia", cities, Continent.AUSTRALIA);
  }
View Full Code Here

Examples of org.openbravo.model.common.geography.City

    final OBCriteria<City> obc = OBDal.getInstance().createCriteria(City.class);
    for (final City c : obc.list()) {
      OBDal.getInstance().remove(c);
    }

    final City city = OBProvider.getInstance().get(City.class);
    city.setAreaCode("3941");
    city.setCoordinates("00");
    city.setCoordinates("lo");
    city.setPostalCode("postal");
    city.setName("name");
    city.setCountry(getOneInstance(Country.class));
    city.setRegion(getOneInstance(Region.class));
    OBDal.getInstance().save(city);
    commitTransaction();
    cityId = city.getId();
  }
View Full Code Here

Examples of org.openfaces.demo.beans.util.City

                currentString = reader.readLine();
                if (currentString == null) break;
                String[] cityAttributes = currentString.split("\t");
                String currentName = new String(cityAttributes[0].getBytes(), "utf-8");
                String currentCountry = new String(cityAttributes[2].getBytes(), "utf-8");
                City currentCity = new City(id, currentName, Integer.valueOf(cityAttributes[1]), currentCountry);
                cityById.put(id, currentCity);
                citiesList.add(currentCity);
                id++;
            }
            reader.close();
View Full Code Here

Examples of org.qi4j.runtime.query.model.City

        Domain cars = uow.newEntity( Domain.class );
        setName( cars, "Cars" );
        cars.description().set( "Cars" );

        City kualaLumpur = uow.newEntity( City.class, "kualalumpur" );
        setName( kualaLumpur, "Kuala Lumpur" );
        kualaLumpur.country().set( "Malaysia" );
        kualaLumpur.county().set( "Some Jaya" );

        City penang = uow.newEntity( City.class, "penang" );
        setName( penang, "Penang" );
        penang.country().set( "Malaysia" );
        penang.county().set( "Some Other Jaya" );

        Female vivianSmith = uow.newEntity( FemaleEntity.class );
        setName( vivianSmith, "Vivian Smith" );
        vivianSmith.placeOfBirth().set( kualaLumpur );
        vivianSmith.yearOfBirth().set( 1992 );
View Full Code Here

Examples of org.qi4j.test.indexing.model.City

    public void script04()
        throws EntityFinderException
    {
        QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
        Person personTemplate = templateFor( Person.class );
        City placeOfBirth = personTemplate.placeOfBirth().get();
        Query<Person> query = unitOfWork.newQuery( qb.where( eq( placeOfBirth.name(), "Kuala Lumpur" ) ) );
        System.out.println( "*** script04: " + query );
        verifyUnorderedResults( query, "Joe Doe", "Ann Doe" );
    }
View Full Code Here

Examples of org.springframework.springfaces.traveladvisor.domain.City

    assertThat(page.getTotalElements(), is(1L));
  }

  @Test
  public void shouldFindByNameAndCountry() throws Exception {
    City melbourneUsa = this.cityRepository.findByNameAndCountryAllIgnoringCase("Melbourne", "USA");
    City melbourneAustralia = this.cityRepository.findByNameAndCountryAllIgnoringCase("Melbourne", "Australia");
    assertThat(melbourneUsa.getName(), is("Melbourne"));
    assertThat(melbourneUsa.getCountry(), is("USA"));
    assertThat(melbourneAustralia.getName(), is("Melbourne"));
    assertThat(melbourneAustralia.getCountry(), is("Australia"));
  }
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.