@@ -0,0 +1,1765 @@
+package fgis.server.services;%0A%0Aimport fgis.server.entity.fgis.Resource;%0Aimport fgis.server.entity.fgis.ResourceTrack;%0Aimport fgis.server.entity.fgis.dao.ResourceRepository;%0Aimport fgis.server.entity.fgis.dao.ResourceTrackRepository;%0Aimport java.util.Date;%0Aimport java.util.Random;%0Aimport javax.ejb.EJB;%0Aimport javax.ejb.Schedule;%0Aimport javax.ejb.Stateless;%0Aimport org.geolatte.geom.DimensionalFlag;%0Aimport org.geolatte.geom.Point;%0Aimport org.geolatte.geom.PointSequenceBuilder;%0Aimport org.geolatte.geom.PointSequenceBuilders;%0Aimport org.geolatte.geom.crs.CrsId;%0A%0A@javax.ejb.Local%0A@Stateless%0Apublic class DataGeneratorEJB%0A%7B%0A  @EJB%0A  private ResourceRepository _resourceService;%0A%0A  @EJB%0A  private ResourceTrackRepository _resourceTrackRepository;%0A%0A%0A  @Schedule( second = %22*/5%22, minute = %22*%22, hour = %22*%22, persistent = false )%0A  public void insertData()%0A  %7B%0A    final String resourceName = %22Peter%22;%0A    Resource resource = _resourceService.findByName( resourceName );%0A    if ( null == resource )%0A    %7B%0A      resource = new Resource( resourceName );%0A      _resourceService.persist( resource );%0A    %7D%0A    final Random random = new Random();%0A%0A    final PointSequenceBuilder builder =%0A      PointSequenceBuilders.variableSized( DimensionalFlag.d2D, CrsId.UNDEFINED );%0A    final double latPosition = 144.92978643046 + random.nextDouble() / 1;%0A    final double longPosition = 37.794939500455+ random.nextDouble() / 1;%0A    builder.add( latPosition , longPosition );%0A%0A    System.out.println( %22Generating point %22 + latPosition + %22, %22 + longPosition +%0A                        %22 for resource %22 + resource.getName() );%0A%0A    final Point point = new Point( builder.toPointSequence() );%0A    _resourceTrackRepository.persist( new ResourceTrack( resource, new Date(), point ) );%0A  %7D%0A%7D%0A

Add simple service that generates points for a person over time