// Path: osgi.enroute.trains.api/src/osgi/enroute/trains/cloud/api/Observation.java
// public class Observation extends DTO {
// 	public final static String TOPIC = "osgi/trains/observation";
// 
// 	public enum Type {
// 		CHANGE, //
// 		/**
// 		 * Detected an RFID
// 		 */
// 		LOCATED, 
// 		/**
// 		 * Assignment changed
// 		 */
// 		ASSIGNMENT, 
// 		/**
// 		 * Assignment reached
// 		 */
// 		ASSIGNMENT_REACHED,
// 		/**
// 		 * Signal changed color
// 		 */
// 		SIGNAL,
// 		/**
// 		 * Switched changed alternate state
// 		 */
// 		SWITCH,
// 		/**
// 		 * A segment is blocked 
// 		 */
// 		BLOCKED,
// 		/**
// 		 * A segment is dark
// 		 */
// 		DARK,
// 		/**
// 		 * A train emergency occurs
// 		 */
// 		EMERGENCY
// 		
// 	}
// 
// 	public Type type;
// 	public String segment;
// 	public String train;
// 	public Color signal;
// 	public String assignment;
// 	public long time;
// 	public long id;
// 	public String message;
// 	public boolean alternate;
// 	public boolean blocked;
// 	public boolean dark;
// 	public boolean emergency;
// }
// 
// Path: osgi.enroute.trains.api/src/osgi/enroute/trains/cloud/api/TrackForSegment.java
// public interface TrackForSegment extends TrackInfo {
// 
// 	/**
// 	 * Send when a train has been identified at a locator segment
// 	 * 
// 	 * @param rfid
// 	 *            The RFID for the train
// 	 * @param segment
// 	 *            The name of the segment
// 	 */
// 	void locatedTrainAt(String rfid, String segment);
// 
// 	/**
// 	 * Indicate that a switch has been set
// 	 * 
// 	 * @param segment
// 	 *            the name of the switch segment
// 	 * @param alternative
// 	 *            defines the normal or alternative track
// 	 */
// 	void switched(String segment, boolean alternative);
// 	
// 	/**
// 	 * Indicate that a signal changed color
// 	 * 
// 	 * @param segment
// 	 *            the name of the signal segment
// 	 * @param color
// 	 *            the new signal color
// 	 */
// 	void signal(String segment, Color color);
// 	
// 	/**
// 	 * External indication that a segment is broken 
// 	 */
// 	
// 	void blocked(String segment, String reason, boolean blocked);
// }


import java.util.List;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import osgi.enroute.rest.api.REST;
import osgi.enroute.trains.cloud.api.Observation;
import osgi.enroute.trains.cloud.api.TrackForSegment;
package osgi.enroute.trains.rest.provider;




/**
 * 
 */
@Component(name = "osgi.enroute.trains.rest", immediate=true)
public class RestImpl implements REST {

	@Reference
	TrackForSegment ts;
// Path: osgi.enroute.trains.api/src/osgi/enroute/trains/cloud/api/Observation.java
// public class Observation extends DTO {
// 	public final static String TOPIC = "osgi/trains/observation";
// 
// 	public enum Type {
// 		CHANGE, //
// 		/**
// 		 * Detected an RFID
// 		 */
// 		LOCATED, 
// 		/**
// 		 * Assignment changed
// 		 */
// 		ASSIGNMENT, 
// 		/**
// 		 * Assignment reached
// 		 */
// 		ASSIGNMENT_REACHED,
// 		/**
// 		 * Signal changed color
// 		 */
// 		SIGNAL,
// 		/**
// 		 * Switched changed alternate state
// 		 */
// 		SWITCH,
// 		/**
// 		 * A segment is blocked 
// 		 */
// 		BLOCKED,
// 		/**
// 		 * A segment is dark
// 		 */
// 		DARK,
// 		/**
// 		 * A train emergency occurs
// 		 */
// 		EMERGENCY
// 		
// 	}
// 
// 	public Type type;
// 	public String segment;
// 	public String train;
// 	public Color signal;
// 	public String assignment;
// 	public long time;
// 	public long id;
// 	public String message;
// 	public boolean alternate;
// 	public boolean blocked;
// 	public boolean dark;
// 	public boolean emergency;
// }
// 
// Path: osgi.enroute.trains.api/src/osgi/enroute/trains/cloud/api/TrackForSegment.java
// public interface TrackForSegment extends TrackInfo {
// 
// 	/**
// 	 * Send when a train has been identified at a locator segment
// 	 * 
// 	 * @param rfid
// 	 *            The RFID for the train
// 	 * @param segment
// 	 *            The name of the segment
// 	 */
// 	void locatedTrainAt(String rfid, String segment);
// 
// 	/**
// 	 * Indicate that a switch has been set
// 	 * 
// 	 * @param segment
// 	 *            the name of the switch segment
// 	 * @param alternative
// 	 *            defines the normal or alternative track
// 	 */
// 	void switched(String segment, boolean alternative);
// 	
// 	/**
// 	 * Indicate that a signal changed color
// 	 * 
// 	 * @param segment
// 	 *            the name of the signal segment
// 	 * @param color
// 	 *            the new signal color
// 	 */
// 	void signal(String segment, Color color);
// 	
// 	/**
// 	 * External indication that a segment is broken 
// 	 */
// 	
// 	void blocked(String segment, String reason, boolean blocked);
// }


// Path: osgi.enroute.trains.rest.provider/src/osgi/enroute/trains/rest/provider/RestImpl.java
import java.util.List;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import osgi.enroute.rest.api.REST;
import osgi.enroute.trains.cloud.api.Observation;
import osgi.enroute.trains.cloud.api.TrackForSegment;

package osgi.enroute.trains.rest.provider;




/**
 * 
 */
@Component(name = "osgi.enroute.trains.rest", immediate=true)
public class RestImpl implements REST {

	@Reference
	TrackForSegment ts;
	public List<Observation> getObservations(long time) {