Examples of Village


Examples of it.hotel.model.village.Village

  }
 
 
  private void setVillage() {
   
    village = new Village();
   
    village.setAddress("address");
    village.setBankaccount("1234567890");
    village.setBriefdescription("briefDescription");
    village.setDescription("description");
View Full Code Here

Examples of it.hotel.model.village.Village

   */
  @Override
  protected Map referenceData (HttpServletRequest req) throws Exception{

    Map map = super.referenceData(req);
    Village village = new Village();
    map.put("structure", village);
    return map;
  }
View Full Code Here

Examples of net.traviangui.model.Village

    // multiple times.
//    TagNode node = cleaner.clean( new File("tests/accept.html"));

    TagNode node = cleaner.clean( new File("tests/materias.html"));

    Village village = new Village();
        IOVillage.updateVillageOverview( village);
        System.out.println( village);


    Object[] myNodes;
View Full Code Here

Examples of net.traviangui.model.Village

        {
//            String[] data = Util.patternExtract( "\\?newdid=(\\d+)", domVillageUrls[i].toString(), 2);
//            int codD = Integer.parseInt( Util.patternExtract( "\\?newdid=(\\d+)", domVillageUrls[i].toString(), 1)[0]);

//            if( !villages.exists( id)) {
                Village v = new Village( );
                v.setName( domVillageNames[i].toString());
                v.setUrl( new URL( "http://s3.travian.net/" + domVillageUrls[i].toString()));
//                v.setId( id);
//              v.setCoordX( Integer.parseInt( domVillageCoordX[i].toString().replace( "(", "")));
//              v.setCoordY( Integer.parseInt( domVillageCoordY[i].toString().replace( ")", "")));
//              System.out.println( domVillageCoords[i].toString());

                Scanner s = new Scanner( domVillageCoords[i].toString());
                s.useDelimiter( "[ ()|\n\r\f\t]+");
//              s.findInLine( "\\s*\\((\\d+)\\s*|\\s*(\\d+)\\)");
//              s.findInLine( "\\s*\\((\\d+)\\s*|\\s*(\\d+)\\)");

//                String[] data = Util.patternExtract( "\\(([+\\-\\d]+)[^|]*.*|.*([+\\-\\d]+)\\)", domVillageCoords[i].toString(), 2);
//System.out.println( data[0]);
//System.out.println( data[1]);

                v.setCoordX( s.nextInt());
                v.setCoordY( s.nextInt());
               
                player.addVillage( v);
//            }
        }

View Full Code Here

Examples of net.traviangui.model.Village

        for( int i=0 ; i<domVillageNames.length ; i++)
        {
            int id = Integer.parseInt( Util.patternExtract( "\\?newdid=(\\d+)", domVillageUrls[i].toString(), 1)[0]);

            if( !villages.exists( id)) {
                Village v = new Village( );
                v.setName( domVillageNames[i].toString());
//              v.setUrl( new URL( domVillageUrls[i].toString()));
                v.setId( id);
//              v.setCoordX( Integer.parseInt( domVillageCoordX[i].toString().replace( "(", "")));
//              v.setCoordY( Integer.parseInt( domVillageCoordY[i].toString().replace( ")", "")));
//              System.out.println( domVillageCoords[i].toString());

                Scanner s = new Scanner( domVillageCoords[i].toString());
                s.useDelimiter( "[ ()|\n\r\f\t]+");
//              s.findInLine( "\\s*\\((\\d+)\\s*|\\s*(\\d+)\\)");
//              s.findInLine( "\\s*\\((\\d+)\\s*|\\s*(\\d+)\\)");

//                String[] data = Util.patternExtract( "\\(([+\\-\\d]+)[^|]*.*|.*([+\\-\\d]+)\\)", domVillageCoords[i].toString(), 2);
//System.out.println( data[0]);
//System.out.println( data[1]);

                v.setCoordX( s.nextInt());
                v.setCoordY( s.nextInt());
               
                villages.add( v);
            }
        }

View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Village

  @Test
  public void testVillageByName() {
   
    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);   
    Village village = CannedQueries.villageByName("Village 1", event1);
    assertEquals("Village 1", village.getName());
    assertDetached(village);
  }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Village

 
 
  @Test
  public void testUnitsForVillage() {
    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);   
    Village village = CannedQueries.villageByName("Village 1", event1);
   
    Collection<Unit> units = CannedQueries.unitsForVillage(village);
    TestUtils.assertNames(units, "Unit 1");
    assertDetached(units);
  }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Village

  }

  @Test
  public void testBookingsForVillage() {
    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);   
    Village village = CannedQueries.villageByName("Village 1", event1);
   
    Collection<Booking> bookings = CannedQueries.bookingsForVillage(village);
   
    // FIXME: The last name shouldn't need to be there, but is due to unit bookings not existing, and so events not partitioning the bookings
    TestUtils.assertNames(bookings, "Test person", "Test person 2", "Person booked after earlybird", "Test person in other event");
    //TestUtils.assertNames(bookings, "Test person", "Test person 2", "Person booked after earlybird");
    assertDetached(bookings);
   
    Village village2 = CannedQueries.villageByName("Village 2", event1);
   
    Collection<Booking> bookings2 = CannedQueries.bookingsForVillage(village2);
    assertEquals(0, bookings2.size());
    assertDetached(bookings2);
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Village

      events.add(new Event("Closed event", null, null, false, RegisteredPricingStrategy.COCAMP))
      pm.makePersistentAll(events);
     
      // Villages
      List<Village> villages = new ArrayList<Village>();
      Village village1 = new Village(TestConstants.VILLAGE1_NAME, event1);
      villages.add(village1);
      villages.add(new Village("Village 2", event1));
      villages.add(new Village("Empty village", event1));
      villages.add(new Village("Village on other event", events.get(1)));
      pm.makePersistentAll(villages);
     
      // Organisations
      List<Organisation> organisations = new ArrayList<Organisation>();
      Organisation orgWcf = new Organisation(TestConstants.ORG1_NAME, true);
      organisations.add(orgWcf);
     
      Organisation otherOrg = new Organisation("Unapproved organisation", false);
      organisations.add(otherOrg);
      pm.makePersistentAll(organisations);
     
      // Units
      List<Unit> units = new ArrayList<Unit>();
      Unit unit1 = new Unit(TestConstants.UNIT1_NAME, organisations.get(0), true);
      unit1.setVillageKey(village1.getKeyCheckNotNull());
     
      // FIXME: Note, all units are in all events for now...
     
      //unit1.addEventRegistration(event1);
      //unit1.addEventRegistration(event2); 
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Village

  protected List<Object> renderRow(List<Method> reportedMethods, Object data) {
    List<Object> cells = new ArrayList<Object>();
   
    Booking b = (Booking) data;
    Village v = b.getVillage();
    if (v != null)
      cells.add(v.getName());
    else
      cells.add(null);
   
    cells.add(b.getUnit().getName());
    cells.add(b.getName());
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.