Package com.gnizr.db.dao

Examples of com.gnizr.db.dao.PointMarker


    int bmid = bookmarkManager.getBookmarkId(loggedInUser, "http://zirr.us/");
    assertTrue((bmid <=0));
  }
 
  public void testAddPointMarker1() throws Exception{
    PointMarker pm1 = new PointMarker();
    pm1.setId(-1);
    pm1.setMarkerIconId(5);
    pm1.setNotes("this is marker1 notes");
    pm1.setPoint(10.0, 20.00);
   
    PointMarker pm2 = new PointMarker();
    pm2.setId(-2);
    pm2.setMarkerIconId(10);
    pm2.setNotes("this is marker2 notes <h1>hello</h1> <br> <hr>");
    pm2.setPoint(20.0, 40.00);
   
    User loggedInUser = userManager.getUser("hchen1");
    action.setLoggedInUser(loggedInUser);
    action.setTitle("CNN homepage");
    action.setUrl("http://cnn.com");
View Full Code Here


    assertEquals(2,found);
    bookmarkManager.deleteBookmark(bm);
  }
 
  public void testAddPointMarker2() throws Exception{
    PointMarker pm1 = new PointMarker();
    pm1.setId(-1);
    pm1.setMarkerIconId(5);
    pm1.setNotes("this is marker1 notes");
    pm1.setPoint(10.0, 20.00);
   
    PointMarker pm2 = new PointMarker();
    pm2.setId(-2);
    pm2.setMarkerIconId(10);
    pm2.setNotes("this is marker2 notes");
    pm2.setPoint(20.0, 40.00);
       
    User loggedInUser = userManager.getUser("hchen1");
    action.setLoggedInUser(loggedInUser);
    action.setTitle("CNN homepage");
    action.setUrl("http://cnn.com");
View Full Code Here

    assertEquals(2,found);
    bookmarkManager.deleteBookmark(bm);
  }
 
  public void testAddPointMarker3() throws Exception{
    PointMarker pm1 = new PointMarker();
    pm1.setId(-1);
    pm1.setMarkerIconId(5);
    pm1.setNotes("this is marker1 notes");
    pm1.setPoint(10.0, 20.00);
   
    PointMarker pm2 = new PointMarker();
    pm2.setId(-2);
    pm2.setMarkerIconId(10);
    pm2.setNotes("this is marker2 notes");
    pm2.setPoint(20.0, 40.00);
       
    User loggedInUser = userManager.getUser("hchen1");
    action.setLoggedInUser(loggedInUser);
    action.setTitle("CNN homepage");
    action.setUrl("http://cnn.com");
View Full Code Here

    assertEquals(2,found);
    bookmarkManager.deleteBookmark(bm);
  }
 
  public void testAddPointMarker4() throws Exception{
    PointMarker pm1 = new PointMarker();
    pm1.setId(-1);
    pm1.setMarkerIconId(5);
    pm1.setNotes("this is marker1 notes");
    pm1.setPoint(10.0, 20.00);
   
    PointMarker pm2 = new PointMarker();
    pm2.setId(-2);
    pm2.setMarkerIconId(10);
    pm2.setNotes("this is marker2 notes");
    pm2.setPoint(20.0, 40.00);
       
    User loggedInUser = userManager.getUser("hchen1");
    action.setLoggedInUser(loggedInUser);
    action.setTitle("CNN homepage");
    action.setUrl("http://cnn.com");
View Full Code Here

    return new FlatXmlDataSet(TestListBookmarkHasGeomMarker.class
        .getResourceAsStream("/TestListBookmarkHasGeomMarker-input.xml"));
  }

  public void testListBmarkInFolder() throws Exception{
    PointMarker pm = new PointMarker();
    pm.setMarkerIconId(0);
    pm.setNotes("notes");
    pm.setPoint(10.0, 10.0);
   
    PointMarker[] markers = new PointMarker[]{pm};
    bookmarkManager.addPointMarkers(new Bookmark(307), Arrays.asList(markers));
   
    action.setUsername("gnizr");
View Full Code Here

   
    assertTrue(bookmarkManager.deleteBookmark(new Bookmark(307)));
  }
 
  public void testListBmarkInArchive() throws Exception{
    PointMarker pm = new PointMarker();
    pm.setMarkerIconId(0);
    pm.setNotes("notes");
    pm.setPoint(10.0, 10.0);
   
    PointMarker[] markers = new PointMarker[]{pm};
    bookmarkManager.addPointMarkers(new Bookmark(307), Arrays.asList(markers));
   
    action.setUsername("hchen1");
View Full Code Here

    assertTrue(geomMarkerDao.deletePointMarker(m1.getId()));
    assertTrue(geomMarkerDao.deletePointMarker(m2.getId()));
  }
 
  public void testGetPointMarker() throws Exception{
    PointMarker pm = geomMarkerDao.getPointMarker(m1.getId());
    assertNotNull(pm);
    assertEquals(m1.getId(),pm.getId());
    assertEquals(m1.getMarkerIconId(),pm.getMarkerIconId());
    assertEquals(m1.getNotes(),pm.getNotes());
    assertTrue(m1.getPoint().equals(pm.getPoint()));
 
View Full Code Here

    assertEquals(m1.getNotes(),pm.getNotes());
    assertTrue(m1.getPoint().equals(pm.getPoint()));
 
 
  public void testUpdatePointMarker() throws Exception{
    PointMarker pm = geomMarkerDao.getPointMarker(m1.getId());
    pm.setMarkerIconId(10);
    pm.setNotes("newnotes");
    Point p3 = factory.createPoint(new Coordinate(30,30));
    pm.setPoint(p3);
    assertTrue(geomMarkerDao.updatePointMarker(pm));
    pm = geomMarkerDao.getPointMarker(m1.getId());
    assertEquals(m1.getId(),pm.getId());
    assertEquals(10,pm.getMarkerIconId());
    assertEquals("newnotes",pm.getNotes());
  }
View Full Code Here

    List<PointMarker> pm = new ArrayList<PointMarker>();
    GeoRSSModule geoRSSModule = GeoRSSUtils.getGeoRSS(entry);
    if(geoRSSModule != null){
      double lat = geoRSSModule.getPosition().getLatitude();
      double lng = geoRSSModule.getPosition().getLongitude();
      PointMarker p = new PointMarker();
      p.setNotes("lat/lon: " + lat+","+lng);
      p.setPoint(lng,lat);
      pm.add(p);
    }
    return pm;
  }
View Full Code Here

  private void addGeonamesPointMarker(BookmarkManager bookmarkManager,Bookmark bookmark, MachineTag mt) throws NoSuchUserException, NoSuchLinkException, MissingIdException, NoSuchBookmarkException{
    String placename = TagUtil.mapUnderscoreToSpace(mt.getValue());
    Geo geo = GeonamesSearch.searchGeonames(placename);
    if(geo != null){
      PointMarker pm = new PointMarker();
      pm.setPoint(geo.getLongitude(), geo.getLatitude());
      pm.setNotes(placename);       
      bookmarkManager.addPointMarker(bookmark,pm);
    }
  }
View Full Code Here

TOP

Related Classes of com.gnizr.db.dao.PointMarker

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.