diff --git a/.classpath b/.classpath
deleted file mode 100644
index 1e5b5a0..0000000
--- a/.classpath
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.gitignore.orig b/.gitignore.orig
deleted file mode 100644
index 994dd85..0000000
--- a/.gitignore.orig
+++ /dev/null
@@ -1,17 +0,0 @@
-<<<<<<< HEAD
-*.jar
-*.class
-=======
-*.class
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.ear
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
->>>>>>> fe889fd8ee8c289b25acbcd55ed15139f0210d9a
diff --git a/.project b/.project
deleted file mode 100644
index 28872a2..0000000
--- a/.project
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
- xapi
- NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
- org.eclipse.jdt.core.javanature
-
-
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 6c21b2e..cbe7e64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,24 +4,89 @@
gov.adlnet.xapi
xapi
- 1.0-SNAPSHOT
+ 0.1.0
jar
- xapi
- http://maven.apache.org
-
-
- Apache License, Version 2.0
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
-
-
-
- https://github.com/adlnet/jxapi
-
+ xAPI
+
+ Java xAPI client
+
+ https://github.com/adlnet/jxapi
+
+
+ Apache License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+ repo
+
+
+
+ scm:git:git://github.com/adlnet/jxapi.git
+ scm:git:git@github.com:adlnet/jxapi.git
+ https://github.com/adlnet/jxapi
+ HEAD
+
+
+ GitHub
+ https://github.com/adlnet/jxapi/issues
+
+
+
+ sonatype-nexus-snapshots
+ Sonatype Nexus Snapshots
+ http://oss.sonatype.org/content/repositories/snapshots
+
+ false
+
+
+ true
+
+
+
+
+
+
+ sonatype-nexus-snapshots
+ Sonatype Nexus Snapshots
+ http://oss.sonatype.org/content/repositories/snapshots
+
+
+ sonatype-nexus-staging
+ Nexus Release Repository
+ http://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
+
+ release-sign-artifacts
+
+
+ performRelease
+ true
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.4
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
- org.apache.maven.plugins
+ org.apache.maven.plugins
maven-compiler-plugin
3.1
diff --git a/src/main/java/gov/adlnet/xapi/model/Definition.java b/src/main/java/gov/adlnet/xapi/model/Definition.java
index 29f4ff4..5a3f459 100644
--- a/src/main/java/gov/adlnet/xapi/model/Definition.java
+++ b/src/main/java/gov/adlnet/xapi/model/Definition.java
@@ -1,22 +1,19 @@
package gov.adlnet.xapi.model;
-import java.util.HashMap;
-import java.util.Map.Entry;
import com.google.gson.*;
public class Definition {
- private HashMap extensions;
+ private JsonObject extensions;
public JsonElement serialize(){
- JsonObject extensionsObj = new JsonObject();
- for (Entry item : extensions.entrySet()){
- extensionsObj.addProperty(item.getKey(), item.getValue());
- }
- return extensionsObj;
+
+ JsonObject self = new JsonObject();
+ self.add("extensions", extensions);
+ return self;
}
- public HashMap getExtensions() {
+ public JsonObject getExtensions() {
return extensions;
}
- public void setExtensions(HashMap extensions) {
+ public void setExtensions(JsonObject extensions) {
this.extensions = extensions;
}
}
diff --git a/src/main/java/gov/adlnet/xapi/model/Result.java b/src/main/java/gov/adlnet/xapi/model/Result.java
index 1b9454d..d62bf13 100644
--- a/src/main/java/gov/adlnet/xapi/model/Result.java
+++ b/src/main/java/gov/adlnet/xapi/model/Result.java
@@ -47,11 +47,11 @@ public void setDuration(String duration) {
this.duration = duration;
}
- public HashMap getExtensions() {
+ public JsonObject getExtensions() {
return extensions;
}
- public void setExtensions(HashMap extensions) {
+ public void setExtensions(JsonObject extensions) {
this.extensions = extensions;
}
@@ -70,11 +70,7 @@ public JsonElement serialize() {
obj.addProperty("duration", this.duration);
}
if (this.extensions != null) {
- JsonObject extensionsObj = new JsonObject();
- obj.add("extensions", extensionsObj);
- for (Entry item : extensions.entrySet()) {
- extensionsObj.addProperty(item.getKey(), item.getValue());
- }
+ obj.add("extensions", extensions);
}
if (this.score != null) {
obj.add("score", this.score.serialize());
@@ -87,5 +83,5 @@ public JsonElement serialize() {
private Boolean completion;
private String response;
private String duration;
- private HashMap extensions;
+ private JsonObject extensions;
}