// Path: src/main/java/nl/uva/larissa/json/model/Statement.java
// @JsonPropertyOrder({ "id", "actor", "verb", "object", "result", "context",
// 		"timestamp", "stored", "authority", "version" })
// @ValidRevisionUsage
// @ValidPlatformUsage
// public class Statement {
// 	@JsonProperty(required = false)
// 	@IsUUID
// 	private String id;
// 	@NotNull
// 	@Valid
// 	private Actor actor;
// 	@NotNull
// 	@Valid
// 	private Verb verb;
// 	@NotNull
// 	@Valid
// 	@JsonProperty("object")
// 	private StatementObject statementObject;
// 	private Result result;
// 	@Valid
// 	private Context context;
// 	// xAPI 1.0.1 4.1.7 A timestamp SHOULD be the current or a past time when it
// 	// is outside of a Sub-Statement.
// 	@Past
// 	private Date timestamp;
// 
// 	// should be set by the LRS, not the client
// 	@Null
// 	private Date stored;
// 	private Authority authority;
// 	private String version;
// 
// 	public String getId() {
// 		return id;
// 	}
// 
// 	public void setId(String id) {
// 		this.id = id;
// 	}
// 
// 	public Actor getActor() {
// 		return actor;
// 	}
// 
// 	public void setActor(Actor actor) {
// 		this.actor = actor;
// 	}
// 
// 	public Verb getVerb() {
// 		return verb;
// 	}
// 
// 	public void setVerb(Verb verb) {
// 		this.verb = verb;
// 	}
// 
// 	public StatementObject getStatementObject() {
// 		return statementObject;
// 	}
// 
// 	public void setStatementObject(StatementObject statementObject) {
// 		this.statementObject = statementObject;
// 	}
// 
// 	public Result getResult() {
// 		return result;
// 	}
// 
// 	public void setResult(Result result) {
// 		this.result = result;
// 	}
// 
// 	public Date getTimestamp() {
// 		return timestamp;
// 	}
// 
// 	public void setTimestamp(Date timestamp) {
// 		this.timestamp = timestamp;
// 	}
// 
// 	public Date getStored() {
// 		return stored;
// 	}
// 
// 	public void setStored(Date stored) {
// 		this.stored = stored;
// 	}
// 
// 	public Authority getAuthority() {
// 		return authority;
// 	}
// 
// 	public void setAuthority(Authority authority) {
// 		this.authority = authority;
// 	}
// 
// 	public String getVersion() {
// 		return version;
// 	}
// 
// 	public void setVersion(String version) {
// 		this.version = version;
// 	}
// 
// 	public Context getContext() {
// 		return context;
// 	}
// 
// 	public void setContext(Context context) {
// 		this.context = context;
// 	}
// }
// 
// Path: src/main/java/nl/uva/larissa/json/model/StatementResult.java
// public class StatementResult {
// 
// 	private List<Statement> statements;
// 	// xAPI 1.0.1 4.2 Empty string if there are no more results to fetch
// 	private String more = "";
// 
// 	@JsonIgnore
// 	private Date consistentThrough;
// 
// 	public StatementResult(List<Statement> statements, Date consistentThrough) {
// 		this.statements = statements;
// 		this.consistentThrough = consistentThrough;
// 	}
// 
// 	public Date getConsistentThrough() {
// 		return consistentThrough;
// 	}
// 
// 	public void setConsistentThrough(Date consistentThrough) {
// 		this.consistentThrough = consistentThrough;
// 	}
// 
// 	public List<Statement> getStatements() {
// 		return statements;
// 	}
// 
// 	public void setStatements(List<Statement> statements) {
// 		this.statements = statements;
// 	}
// 
// 	public String getMore() {
// 		return more;
// 	}
// 
// 	public void setMore(String more) {
// 		this.more = more;
// 	}
// }


import java.util.List;
import nl.uva.larissa.json.model.Statement;
import nl.uva.larissa.json.model.StatementResult;
package nl.uva.larissa.repository;



/**
 * The interface for the Repository for storing and retrieving Statement objects
 * 
 * @FIXME ugly side-effects on store-methods
 * 
 */
public interface StatementRepository {
	/**
	 * Stores a Statement
	 * 
	 * @param statement
	 *            A valid Statement according to the xAPI 1.0.1 specification.
	 *            Statement.id may be null to instruct the repository to
	 *            generate an id instead.
	 * @return The id which may be used to reference the stored Statement.
	 *         Should be the id of the original Statement if it was not null.
	 * 
	 * @throws DuplicateIdException
	 *             If statement.id has a value that is already in use.
	 * 
	 * @throws VoidingTargetException
	 *             If statement is voiding but refers to an invalid target for
	 *             voiding
	 * 
	 * @throws UnknownStatementException
	 *             If statement.object.objectType=='StatementRef' and targets an
	 *             unknown statement-id <br>
	 * <br>
	 *             <b>side-effect</b> if Statement.id was null, Statement.id may
	 *             be set to the return-value.
	 * 
	 * 
	 */
	public String storeStatement(Statement statement)
			throws DuplicateIdException, VoidingTargetException,
			UnknownStatementException;

	/**
	 * Retrieves a Statement
	 * 
	 * @param id
	 *            UUID of the Statement to get.
	 * @return A StatementResult with 1 Statement, or with an empty list if no
	 *         Statement with the given id exists or if the Statement is voided.
	 */
// Path: src/main/java/nl/uva/larissa/json/model/Statement.java
// @JsonPropertyOrder({ "id", "actor", "verb", "object", "result", "context",
// 		"timestamp", "stored", "authority", "version" })
// @ValidRevisionUsage
// @ValidPlatformUsage
// public class Statement {
// 	@JsonProperty(required = false)
// 	@IsUUID
// 	private String id;
// 	@NotNull
// 	@Valid
// 	private Actor actor;
// 	@NotNull
// 	@Valid
// 	private Verb verb;
// 	@NotNull
// 	@Valid
// 	@JsonProperty("object")
// 	private StatementObject statementObject;
// 	private Result result;
// 	@Valid
// 	private Context context;
// 	// xAPI 1.0.1 4.1.7 A timestamp SHOULD be the current or a past time when it
// 	// is outside of a Sub-Statement.
// 	@Past
// 	private Date timestamp;
// 
// 	// should be set by the LRS, not the client
// 	@Null
// 	private Date stored;
// 	private Authority authority;
// 	private String version;
// 
// 	public String getId() {
// 		return id;
// 	}
// 
// 	public void setId(String id) {
// 		this.id = id;
// 	}
// 
// 	public Actor getActor() {
// 		return actor;
// 	}
// 
// 	public void setActor(Actor actor) {
// 		this.actor = actor;
// 	}
// 
// 	public Verb getVerb() {
// 		return verb;
// 	}
// 
// 	public void setVerb(Verb verb) {
// 		this.verb = verb;
// 	}
// 
// 	public StatementObject getStatementObject() {
// 		return statementObject;
// 	}
// 
// 	public void setStatementObject(StatementObject statementObject) {
// 		this.statementObject = statementObject;
// 	}
// 
// 	public Result getResult() {
// 		return result;
// 	}
// 
// 	public void setResult(Result result) {
// 		this.result = result;
// 	}
// 
// 	public Date getTimestamp() {
// 		return timestamp;
// 	}
// 
// 	public void setTimestamp(Date timestamp) {
// 		this.timestamp = timestamp;
// 	}
// 
// 	public Date getStored() {
// 		return stored;
// 	}
// 
// 	public void setStored(Date stored) {
// 		this.stored = stored;
// 	}
// 
// 	public Authority getAuthority() {
// 		return authority;
// 	}
// 
// 	public void setAuthority(Authority authority) {
// 		this.authority = authority;
// 	}
// 
// 	public String getVersion() {
// 		return version;
// 	}
// 
// 	public void setVersion(String version) {
// 		this.version = version;
// 	}
// 
// 	public Context getContext() {
// 		return context;
// 	}
// 
// 	public void setContext(Context context) {
// 		this.context = context;
// 	}
// }
// 
// Path: src/main/java/nl/uva/larissa/json/model/StatementResult.java
// public class StatementResult {
// 
// 	private List<Statement> statements;
// 	// xAPI 1.0.1 4.2 Empty string if there are no more results to fetch
// 	private String more = "";
// 
// 	@JsonIgnore
// 	private Date consistentThrough;
// 
// 	public StatementResult(List<Statement> statements, Date consistentThrough) {
// 		this.statements = statements;
// 		this.consistentThrough = consistentThrough;
// 	}
// 
// 	public Date getConsistentThrough() {
// 		return consistentThrough;
// 	}
// 
// 	public void setConsistentThrough(Date consistentThrough) {
// 		this.consistentThrough = consistentThrough;
// 	}
// 
// 	public List<Statement> getStatements() {
// 		return statements;
// 	}
// 
// 	public void setStatements(List<Statement> statements) {
// 		this.statements = statements;
// 	}
// 
// 	public String getMore() {
// 		return more;
// 	}
// 
// 	public void setMore(String more) {
// 		this.more = more;
// 	}
// }


// Path: src/main/java/nl/uva/larissa/repository/StatementRepository.java
import java.util.List;
import nl.uva.larissa.json.model.Statement;
import nl.uva.larissa.json.model.StatementResult;

package nl.uva.larissa.repository;



/**
 * The interface for the Repository for storing and retrieving Statement objects
 * 
 * @FIXME ugly side-effects on store-methods
 * 
 */
public interface StatementRepository {
	/**
	 * Stores a Statement
	 * 
	 * @param statement
	 *            A valid Statement according to the xAPI 1.0.1 specification.
	 *            Statement.id may be null to instruct the repository to
	 *            generate an id instead.
	 * @return The id which may be used to reference the stored Statement.
	 *         Should be the id of the original Statement if it was not null.
	 * 
	 * @throws DuplicateIdException
	 *             If statement.id has a value that is already in use.
	 * 
	 * @throws VoidingTargetException
	 *             If statement is voiding but refers to an invalid target for
	 *             voiding
	 * 
	 * @throws UnknownStatementException
	 *             If statement.object.objectType=='StatementRef' and targets an
	 *             unknown statement-id <br>
	 * <br>
	 *             <b>side-effect</b> if Statement.id was null, Statement.id may
	 *             be set to the return-value.
	 * 
	 * 
	 */
	public String storeStatement(Statement statement)
			throws DuplicateIdException, VoidingTargetException,
			UnknownStatementException;

	/**
	 * Retrieves a Statement
	 * 
	 * @param id
	 *            UUID of the Statement to get.
	 * @return A StatementResult with 1 Statement, or with an empty list if no
	 *         Statement with the given id exists or if the Statement is voided.
	 */
	public StatementResult getStatement(String id);