Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from imod/professional_educational_data
add support for professional_experience and educational_background
- Loading branch information
Showing
17 changed files
with
662 additions
and
32 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
spring-social-xing/src/main/java/org/springframework/social/xing/api/Award.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.springframework.social.xing.api; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Created by json2pojo | ||
*/ | ||
public class Award implements Serializable { | ||
|
||
private static final long serialVersionUID = -2650314056830306979L; | ||
private String name; | ||
private Long dateAwarded; | ||
private String url; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public Long getDateAwarded() { | ||
return dateAwarded; | ||
} | ||
|
||
public Object getUrl() { | ||
return url; | ||
} | ||
|
||
} |
64 changes: 64 additions & 0 deletions
64
spring-social-xing/src/main/java/org/springframework/social/xing/api/Company.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package org.springframework.social.xing.api; | ||
|
||
import java.io.Serializable; | ||
|
||
public class Company implements Serializable { | ||
|
||
private static final long serialVersionUID = 8680835034881540914L; | ||
private String id; | ||
private String industry; | ||
private String companySize; | ||
private XingDate endDate; | ||
private String tag; | ||
private String name; | ||
private String url; | ||
private String careerLevel; | ||
private String title; | ||
private XingDate beginDate; | ||
private String description; | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getIndustry() { | ||
return industry; | ||
} | ||
|
||
public String getCompanySize() { | ||
return companySize; | ||
} | ||
|
||
public XingDate getEndDate() { | ||
return endDate; | ||
} | ||
|
||
public String getTag() { | ||
return tag; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public String getCareerLevel() { | ||
return careerLevel; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public XingDate getBeginDate() { | ||
return beginDate; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...-social-xing/src/main/java/org/springframework/social/xing/api/EducationalBackground.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.springframework.social.xing.api; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by json2pojo | ||
*/ | ||
public class EducationalBackground implements Serializable { | ||
|
||
private static final long serialVersionUID = 7273795597965337052L; | ||
private School primarySchool; | ||
private List<String> qualifications; | ||
private List<School> schools; | ||
|
||
public List<String> getQualifications() { | ||
return qualifications; | ||
} | ||
|
||
public List<School> getSchools() { | ||
return schools; | ||
} | ||
|
||
public School getPrimarySchool() { | ||
return primarySchool; | ||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...social-xing/src/main/java/org/springframework/social/xing/api/ProfessionalExperience.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.springframework.social.xing.api; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by json2pojo | ||
*/ | ||
public class ProfessionalExperience implements Serializable { | ||
|
||
private static final long serialVersionUID = -2093383150432795268L; | ||
private List<Company> nonPrimaryCompanies; | ||
private Company primaryCompany; | ||
private List<Award> awards; | ||
|
||
public List<Company> getNonPrimaryCompanies() { | ||
return nonPrimaryCompanies; | ||
} | ||
|
||
public Company getPrimaryCompany() { | ||
return primaryCompany; | ||
} | ||
|
||
public List<Award> getAwards() { | ||
return awards; | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
spring-social-xing/src/main/java/org/springframework/social/xing/api/School.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.springframework.social.xing.api; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Created by json2pojo | ||
*/ | ||
public class School implements Serializable { | ||
|
||
private static final long serialVersionUID = -2390425436172680486L; | ||
private String id; | ||
private String subject; | ||
private XingDate endDate; | ||
private String degree; | ||
private String name; | ||
private XingDate beginDate; | ||
private String notes; | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getSubject() { | ||
return subject; | ||
} | ||
|
||
public XingDate getEndDate() { | ||
return endDate; | ||
} | ||
|
||
public String getDegree() { | ||
return degree; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public XingDate getBeginDate() { | ||
return beginDate; | ||
} | ||
|
||
public String getNotes() { | ||
return notes; | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
spring-social-xing/src/main/java/org/springframework/social/xing/api/XingDate.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.springframework.social.xing.api; | ||
|
||
import java.io.Serializable; | ||
import java.text.ParseException; | ||
import java.text.SimpleDateFormat; | ||
import java.util.Calendar; | ||
import java.util.Date; | ||
|
||
public class XingDate implements Serializable { | ||
|
||
private static final long serialVersionUID = 6747607636067970948L; | ||
private Integer year; | ||
private Integer month; | ||
|
||
public XingDate(String dateString) { | ||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM"); | ||
try { | ||
Calendar cal = Calendar.getInstance(); | ||
Date date = format.parse(dateString); | ||
cal.setTime(date); | ||
month = cal.get(Calendar.MONTH) + 1; // MONTH is zero based | ||
year = cal.get(Calendar.YEAR); | ||
} catch (ParseException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
public Integer getMonth() { | ||
return month; | ||
} | ||
|
||
public Integer getYear() { | ||
return year; | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
...g-social-xing/src/main/java/org/springframework/social/xing/api/impl/json/AwardMixin.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.springframework.social.xing.api.impl.json; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Created by json2pojo | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class AwardMixin { | ||
@JsonProperty("name") | ||
private String name; | ||
@JsonProperty("date_awarded") | ||
private Long dateAwarded; | ||
@JsonProperty("url") | ||
private Object url; | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...social-xing/src/main/java/org/springframework/social/xing/api/impl/json/CompanyMixin.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.springframework.social.xing.api.impl.json; | ||
|
||
import org.springframework.social.xing.api.XingDate; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
abstract class CompanyMixin { | ||
|
||
@JsonProperty("id") | ||
private String id; | ||
@JsonProperty("industry") | ||
private String industry; | ||
@JsonProperty("company_size") | ||
private String companySize; | ||
@JsonProperty("end_date") | ||
private XingDate endDate; | ||
@JsonProperty("tag") | ||
private String tag; | ||
@JsonProperty("name") | ||
private String name; | ||
@JsonProperty("url") | ||
private String url; | ||
@JsonProperty("career_level") | ||
private String careerLevel; | ||
@JsonProperty("title") | ||
private String title; | ||
@JsonProperty("begin_date") | ||
private XingDate beginDate; | ||
@JsonProperty("description") | ||
private String description; | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...c/main/java/org/springframework/social/xing/api/impl/json/EducationalBackgroundMixin.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.springframework.social.xing.api.impl.json; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.social.xing.api.School; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class EducationalBackgroundMixin { | ||
|
||
@JsonProperty("primary_school") | ||
private School primarySchool; | ||
@JsonProperty("qualifications") | ||
private List<String> qualifications; | ||
@JsonProperty("schools") | ||
private List<School> schools; | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
.../main/java/org/springframework/social/xing/api/impl/json/ProfessionalExperienceMixin.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.springframework.social.xing.api.impl.json; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.social.xing.api.Award; | ||
import org.springframework.social.xing.api.Company; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Created by json2pojo | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
abstract class ProfessionalExperienceMixin { | ||
|
||
@JsonProperty("non_primary_companies") | ||
private List<Company> nonPrimaryCompanies; | ||
@JsonProperty("awards") | ||
private List<Award> awards; | ||
@JsonProperty("primary_company") | ||
private Company primaryCompany; | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
...-social-xing/src/main/java/org/springframework/social/xing/api/impl/json/SchoolMixin.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.springframework.social.xing.api.impl.json; | ||
|
||
import org.springframework.social.xing.api.XingDate; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Created by json2pojo | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class SchoolMixin { | ||
|
||
@JsonProperty("id") | ||
private String id; | ||
@JsonProperty("subject") | ||
private String subject; | ||
@JsonProperty("end_date") | ||
private XingDate endDate; | ||
@JsonProperty("degree") | ||
private String degree; | ||
@JsonProperty("name") | ||
private String name; | ||
@JsonProperty("begin_date") | ||
private XingDate beginDate; | ||
@JsonProperty("notes") | ||
private String notes; | ||
|
||
} |
Oops, something went wrong.