This repository has been archived by the owner on Jan 14, 2021. It is now read-only.
-
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.
Added Jackson parser to remove hand-made JSON errors and bugs
- Loading branch information
1 parent
9c53f87
commit cfe1b65
Showing
7 changed files
with
180 additions
and
91 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
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.odict.java.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class Entry { | ||
private List<Etymology> etymologies; | ||
|
||
public List<Etymology> getEtymologies() { | ||
return etymologies; | ||
} | ||
|
||
public void setEtymologies(List<Etymology> etymologies) { | ||
this.etymologies = etymologies; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.odict.java.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class Etymology { | ||
private List<Usage> usages; | ||
private String description; | ||
|
||
public List<Usage> getUsages() { | ||
return usages; | ||
} | ||
|
||
public void setUsages(List<Usage> usages) { | ||
this.usages = usages; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.odict.java.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class Group { | ||
private String id; | ||
private String description; | ||
private List<String> definitions; | ||
|
||
public String getID() { | ||
return id; | ||
} | ||
|
||
public void setID(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public List<String> getDefinitions() { | ||
return definitions; | ||
} | ||
|
||
public void setDefinitions(List<String> definitions) { | ||
this.definitions = definitions; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.odict.java.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class Usage { | ||
private String pos; | ||
private List<Group> groups; | ||
private List<String> definitions; | ||
|
||
public String getPOS() { | ||
return pos; | ||
} | ||
|
||
public void setPOS(String pos) { | ||
this.pos = pos; | ||
} | ||
|
||
public List<Group> getGroups() { | ||
return groups; | ||
} | ||
|
||
public void setGroups(List<Group> groups) { | ||
this.groups = groups; | ||
} | ||
|
||
public List<String> getDefinitions() { | ||
return definitions; | ||
} | ||
|
||
public void setDefinitions(List<String> definitions) { | ||
this.definitions = definitions; | ||
} | ||
} |
150 changes: 60 additions & 90 deletions
150
src/main/java/org/odict/java/util/EntryJSONConverter.java
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