-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSubStatementObject.java
More file actions
35 lines (31 loc) · 1.25 KB
/
SubStatementObject.java
File metadata and controls
35 lines (31 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Copyright 2016-2023 Berry Cloud Ltd. All rights reserved.
*/
package dev.learning.xapi.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
/**
* This interface represents the xAPI SubStatement object.
* <p>
* <strong>Note:</strong> A SubStatement object cannot be a SubStatement.
* </p>
*
* @author Thomas Turrell-Croft
*
* @see <a href="https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#substatements">xAPI
* SubStatements</a>
*/
@JsonInclude(Include.NON_EMPTY)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "objectType", defaultImpl = Activity.class,
include = As.PROPERTY)
@JsonSubTypes({@JsonSubTypes.Type(value = Activity.class, name = "Activity"),
@JsonSubTypes.Type(value = Agent.class, name = "Agent"),
@JsonSubTypes.Type(value = Group.class, name = "Group"),
@JsonSubTypes.Type(value = StatementReference.class, name = "StatementRef")})
@JsonIgnoreProperties("objectType")
public interface SubStatementObject {
}