@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((locale == null) ? 0 : locale.hashCode()); return result; }
/** * Gets the value of the languageCode property. * * @return possible object is {@link Title } * */ public String getLanguageCode() { return languageCode == null ? null : languageCode.name(); }
@Override public WorkType unmarshal(String v) throws Exception { try { return WorkType.fromValue(v); } catch (IllegalArgumentException e) { throw new IllegalEnumValueException(WorkType.class, v); } }
@Override public ContributorRole unmarshal(String v) throws Exception { try { return ContributorRole.fromValue(v); } catch (IllegalArgumentException e) { throw new IllegalEnumValueException(ContributorRole.class, v); } }
@Override public Relationship unmarshal(String v) throws Exception { try { return Relationship.fromValue(v); } catch (IllegalArgumentException e) { throw new IllegalEnumValueException(Relationship.class, v); } }
@Override public LanguageCode unmarshal(String v) throws Exception { try { return LanguageCode.valueOf(v); } catch (IllegalArgumentException e) { throw new IllegalEnumValueException(LanguageCode.class, v); } }
@Override public Iso3166Country unmarshal(String v) throws Exception { try { return Iso3166Country.valueOf(v); } catch (IllegalArgumentException e) { throw new IllegalEnumValueException(Iso3166Country.class, v); } }
/** * Sets the value of the value property. * * @param value * allowed object is {@link String } * */ @JsonIgnore public void setValue(String value) { this.value = Iso3166Country.fromValue(value); }
/** * Sets the value of the languageCode property. * * @param value * allowed object is {@link String } * */ public void setLanguageCode(String languageCode) { this.languageCode = (languageCode == null) ? null : LanguageCode.valueOf(languageCode); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; }
@Override public int hashCode() { int result = 31 * (contributorRole != null ? contributorRole.hashCode() : 0); return result; } }
public static Iso3166Country fromValue(String v) { return valueOf(v); }
public static AvailableLocales fromValue(String v) { for (AvailableLocales c : AvailableLocales.values()) { if (v.startsWith(c.value)) { return c; } } // if we don't support the specified language return English return AvailableLocales.EN; }
public TranslatedTitle(String content, String languageCode) { this.content = content; this.languageCode = (languageCode == null) ? null : LanguageCode.valueOf(languageCode); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((locale == null) ? 0 : locale.hashCode()); return result; }
public String getLanguageCode() { return (languageCode == null) ? null : languageCode.name(); }
public void setLanguageCode(String languageCode) { this.languageCode = (languageCode == null) ? null : LanguageCode.valueOf(languageCode); }