-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: changed LocalDateTime to Instant
- Loading branch information
Showing
9 changed files
with
69 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
/** | ||
* | ||
*/ | ||
package unicon.matthews.caliper; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.time.Instant; | ||
import java.util.Map; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
@@ -20,7 +17,7 @@ | |
|
||
/** | ||
* @author ggilbert | ||
* | ||
* @author xchopin <[email protected]> | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown=true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
|
@@ -43,8 +40,8 @@ public class Agent implements Serializable { | |
private String name; | ||
private String description; | ||
private Map<String, String> extensions; | ||
private LocalDateTime dateCreated; | ||
private LocalDateTime dateModified; | ||
private Instant dateCreated; | ||
private Instant dateModified; | ||
|
||
private Agent() {} | ||
|
||
|
@@ -72,11 +69,11 @@ public Map<String, String> getExtensions() { | |
return extensions; | ||
} | ||
|
||
public LocalDateTime getDateCreated() { | ||
public Instant getDateCreated() { | ||
return dateCreated; | ||
} | ||
|
||
public LocalDateTime getDateModified() { | ||
public Instant getDateModified() { | ||
return dateModified; | ||
} | ||
|
||
|
@@ -200,12 +197,12 @@ public Builder withExtensions(Map<String,String> extensions) { | |
return this; | ||
} | ||
|
||
public Builder withDateCreated(LocalDateTime dateCreated) { | ||
public Builder withDateCreated(Instant dateCreated) { | ||
_agent.dateCreated = dateCreated; | ||
return this; | ||
} | ||
|
||
public Builder withDateModified(LocalDateTime dataModified) { | ||
public Builder withDateModified(Instant dataModified) { | ||
_agent.dateModified = dataModified; | ||
return this; | ||
} | ||
|
6 changes: 2 additions & 4 deletions
6
src/main/java/unicon/matthews/caliper/ClassEventStatistics.java
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
/** | ||
* | ||
*/ | ||
package unicon.matthews.caliper; | ||
|
||
import java.util.Map; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
|
||
/** | ||
* @author ggilbert | ||
* | ||
* @author xchopin <[email protected]> | ||
*/ | ||
public class ClassEventStatistics { | ||
private String classSourcedId; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
/** | ||
* | ||
*/ | ||
package unicon.matthews.caliper; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.time.Instant; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
|
@@ -19,9 +16,10 @@ | |
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
|
||
|
||
/** | ||
* @author ggilbert | ||
* | ||
* @author xchopin <[email protected]> | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown=true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
|
@@ -43,14 +41,14 @@ public class Entity implements Serializable { | |
private String name; | ||
private String description; | ||
private Map<String, String> extensions; | ||
private LocalDateTime dateCreated; | ||
private LocalDateTime dateModified; | ||
private Instant dateCreated; | ||
private Instant dateModified; | ||
|
||
private List<String> objectType; | ||
private List<LearningObject> alignedLearningObjective; | ||
private List<String> keywords; | ||
private Entity isPartOf; | ||
private LocalDateTime datePublished; | ||
private Instant datePublished; | ||
private String version; | ||
private String duration; | ||
private String currentTime; | ||
|
@@ -92,11 +90,11 @@ public Map<String, String> getExtensions() { | |
return extensions; | ||
} | ||
|
||
public LocalDateTime getDateCreated() { | ||
public Instant getDateCreated() { | ||
return dateCreated; | ||
} | ||
|
||
public LocalDateTime getDateModified() { | ||
public Instant getDateModified() { | ||
return dateModified; | ||
} | ||
|
||
|
@@ -116,7 +114,7 @@ public Entity getIsPartOf() { | |
return isPartOf; | ||
} | ||
|
||
public LocalDateTime getDatePublished() { | ||
public Instant getDatePublished() { | ||
return datePublished; | ||
} | ||
|
||
|
@@ -400,12 +398,12 @@ public Builder withExtensions(Map<String,String> extensions) { | |
return this; | ||
} | ||
|
||
public Builder withDateCreated(LocalDateTime dateCreated) { | ||
public Builder withDateCreated(Instant dateCreated) { | ||
_entity.dateCreated = dateCreated; | ||
return this; | ||
} | ||
|
||
public Builder withDateModified(LocalDateTime dataModified) { | ||
public Builder withDateModified(Instant dataModified) { | ||
_entity.dateModified = dataModified; | ||
return this; | ||
} | ||
|
@@ -430,7 +428,7 @@ public Builder withIsPartOf(Entity isPartOf) { | |
return this; | ||
} | ||
|
||
public Builder withDatePublished(LocalDateTime datePublished) { | ||
public Builder withDatePublished(Instant datePublished) { | ||
_entity.datePublished = datePublished; | ||
return this; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
/** | ||
* | ||
*/ | ||
package unicon.matthews.caliper; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.time.Instant; | ||
import java.util.List; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
@@ -17,9 +14,10 @@ | |
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
|
||
|
||
/** | ||
* @author ggilbert | ||
* | ||
* @author xchopin <[email protected]> | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown=true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
|
@@ -31,7 +29,7 @@ public class Envelope implements Serializable { | |
private String sensor; | ||
|
||
@NotNull | ||
private LocalDateTime sendTime; | ||
private Instant sendTime; | ||
|
||
@NotNull | ||
private List<Event> data; | ||
|
@@ -42,7 +40,7 @@ public String getSensor() { | |
return sensor; | ||
} | ||
|
||
public LocalDateTime getSendTime() { | ||
public Instant getSendTime() { | ||
return sendTime; | ||
} | ||
|
||
|
@@ -100,7 +98,7 @@ public Builder withSensor(String sensor) { | |
return this; | ||
} | ||
|
||
public Builder withSendTime(LocalDateTime sendTime) { | ||
public Builder withSendTime(Instant sendTime) { | ||
_envelope.sendTime = sendTime; | ||
return this; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
/** | ||
* | ||
*/ | ||
package unicon.matthews.caliper; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.time.Instant; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
|
@@ -19,7 +16,7 @@ | |
|
||
/** | ||
* @author ggilbert | ||
* | ||
* @author xchopin <[email protected]> | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown=true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
|
@@ -49,7 +46,7 @@ public class Event implements Serializable { | |
private Entity generated; | ||
private Group group; | ||
private Membership membership; | ||
private LocalDateTime eventTime; | ||
private Instant eventTime; | ||
private String federatedSession; | ||
|
||
private Event() {} | ||
|
@@ -102,7 +99,7 @@ public String getFederatedSession() { | |
return federatedSession; | ||
} | ||
|
||
public LocalDateTime getEventTime() { | ||
public Instant getEventTime() { | ||
return eventTime; | ||
} | ||
|
||
|
@@ -275,7 +272,7 @@ public Builder withMembership(Membership membership) { | |
return this; | ||
} | ||
|
||
public Builder withEventTime(LocalDateTime eventTime) { | ||
public Builder withEventTime(Instant eventTime) { | ||
_basicEvent.eventTime = eventTime; | ||
return this; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
/** | ||
* | ||
*/ | ||
package unicon.matthews.caliper; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.time.Instant; | ||
import java.util.Map; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
@@ -18,9 +15,10 @@ | |
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
|
||
|
||
/** | ||
* @author ggilbert | ||
* | ||
* @author xchopin <[email protected]> | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown=true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
|
@@ -43,8 +41,8 @@ public class Group implements Serializable { | |
private String name; | ||
private String description; | ||
private Map<String, String> extensions; | ||
private LocalDateTime dateCreated; | ||
private LocalDateTime dateModified; | ||
private Instant dateCreated; | ||
private Instant dateModified; | ||
|
||
private SubOrganizationOf subOrganizationOf; | ||
|
||
|
@@ -76,11 +74,11 @@ public Map<String, String> getExtensions() { | |
return extensions; | ||
} | ||
|
||
public LocalDateTime getDateCreated() { | ||
public Instant getDateCreated() { | ||
return dateCreated; | ||
} | ||
|
||
public LocalDateTime getDateModified() { | ||
public Instant getDateModified() { | ||
return dateModified; | ||
} | ||
|
||
|
@@ -224,12 +222,12 @@ public Builder withExtensions(Map<String,String> extensions) { | |
return this; | ||
} | ||
|
||
public Builder withDateCreated(LocalDateTime dateCreated) { | ||
public Builder withDateCreated(Instant dateCreated) { | ||
_group.dateCreated = dateCreated; | ||
return this; | ||
} | ||
|
||
public Builder withDateModified(LocalDateTime dataModified) { | ||
public Builder withDateModified(Instant dataModified) { | ||
_group.dateModified = dataModified; | ||
return this; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
/** | ||
* | ||
*/ | ||
package unicon.matthews.caliper; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.time.Instant; | ||
import java.util.Map; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
@@ -18,9 +15,9 @@ | |
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
|
||
/** | ||
/* | ||
* @author ggilbert | ||
* | ||
* @author xchopin <[email protected]> | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown=true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
|
@@ -43,8 +40,8 @@ public class LearningObject implements Serializable { | |
private String name; | ||
private String description; | ||
private Map<String, String> extensions; | ||
private LocalDateTime dateCreated; | ||
private LocalDateTime dateModified; | ||
private Instant dateCreated; | ||
private Instant dateModified; | ||
|
||
private LearningObject() {} | ||
|
||
|
@@ -72,11 +69,11 @@ public Map<String, String> getExtensions() { | |
return extensions; | ||
} | ||
|
||
public LocalDateTime getDateCreated() { | ||
public Instant getDateCreated() { | ||
return dateCreated; | ||
} | ||
|
||
public LocalDateTime getDateModified() { | ||
public Instant getDateModified() { | ||
return dateModified; | ||
} | ||
|
||
|
@@ -200,12 +197,12 @@ public Builder withExtensions(Map<String,String> extensions) { | |
return this; | ||
} | ||
|
||
public Builder withDateCreated(LocalDateTime dateCreated) { | ||
public Builder withDateCreated(Instant dateCreated) { | ||
_learningObject.dateCreated = dateCreated; | ||
return this; | ||
} | ||
|
||
public Builder withDateModified(LocalDateTime dataModified) { | ||
public Builder withDateModified(Instant dataModified) { | ||
_learningObject.dateModified = dataModified; | ||
return this; | ||
} | ||
|
Oops, something went wrong.