Java 类com.fasterxml.jackson.annotation.JsonSetter 实例源码

项目:flink-charts    文件:TagEvent.java   
/**
 * Methods to deal with nested TagEvent JSON structure. Jackson black magic can deal with it using
 * annotations. So some attributes have to be deserialized in an alternative way.
 * @param geolocation
 */
@JsonSetter("geolocation")
public void setGeolocation(LinkedHashMap geolocation) {
    try {
        if (geolocation.containsKey("zone"))
            this.geoZone= geolocation.get("zone").toString();
        if (geolocation.containsKey("latitude"))
            this.latitude= Double.parseDouble(geolocation.get("latitude").toString());
        if (geolocation.containsKey("longitude"))
            this.longitude= Double.parseDouble(geolocation.get("longitude").toString());

        if (geolocation.containsKey("region") && geolocation.get("region") instanceof LinkedHashMap)  {
            LinkedHashMap<String, String> region= (LinkedHashMap) geolocation.get("region");
            if (region.containsKey("country"))
                this.geoRegionCountry= region.get("country").toString();
            if (region.containsKey("locality"))
                this.geoRegionLocality= region.get("locality").toString();
        }
    }   catch (Exception ex)    {
        log.error("Unable to parse the TagEvent(geolocation): " + geolocation + ", Exception: " + ex.getMessage());
    }

}
项目:stock-api-sdk    文件:LicensePurchaseDetails.java   
/**
 * Sets Date when the asset was purchased or licensed.
 * @param date Date when the asset was purchased or licensed.
 * @throws StockException if date format is not valid
 */
@JsonSetter("date")
public void setDate(final String date) throws StockException {
    String formatString = "yyyy-MM-dd hh:mm:ss";
    // date format with milliseconds
    SimpleDateFormat format = new SimpleDateFormat(
            formatString + ".SSS");
    // date format without milliseconds
    SimpleDateFormat formatWithoutMS = new SimpleDateFormat(
            formatString);
    try {
        if (date.length() <= formatString.length()) {
            this.mDate = formatWithoutMS.parse(date);
        } else {
            this.mDate = format.parse(date);
        }
    } catch (ParseException e) {
        throw new StockException("Could not parse the date string");
    }
}
项目:stock-api-sdk    文件:LicenseEntitlement.java   
/**
 * Sets Full quota of the user available entitlements.
 * @param node object containing full quota of user available entitlements.
 * @throws Exception if could not parse node object
 */
@JsonSetter("full_entitlement_quota")
public void setFullEntitlementQuota(
        final JsonNode node) throws Exception {
    if (node != null && node.isObject()) {
            ObjectMapper mapper = new ObjectMapper();
            this.mFullEntitlementQuota = mapper.readValue(
                    node.toString(), LicenseEntitlementQuota.class);
    }
}
项目:Planchester    文件:Instrumentation.java   
@JsonSetter("violincello")
public void setViolincello(int violincello) {
    _violincello = violincello;
}
项目:Planchester    文件:Account.java   
@JsonSetter("username")
public void setUsername(String username) {
    _username = username;
}
项目:Planchester    文件:Instrumentation.java   
@JsonSetter("violin2")
public void setViolin2(int violin2) {
    _violin2 = violin2;
}
项目:Planchester    文件:Instrumentation.java   
@JsonSetter("tube")
public void setTube(int tube) {
    _tube = tube;
}
项目:stock-api-sdk    文件:LicenseEntitlement.java   
/**
 * Sets quantity of remaining licenses available for the user.
 * @param quota license quantity
 */
@JsonSetter("quota")
public void setQuota(final Integer quota) {
    this.mQuota = quota;
}
项目:Planchester    文件:Instrumentation.java   
@JsonSetter("trombone")
public void setTrombone(int trombone) {
    _trombone = trombone;
}
项目:xm-uaa    文件:TenantProperties.java   
@JsonSetter("refresh-token-validity-seconds")
public void setRefreshTokenValiditySecondsAlias(Integer refreshTokenValiditySeconds) {
    this.refreshTokenValiditySeconds = refreshTokenValiditySeconds;
}
项目:Planchester    文件:Instrumentation.java   
@JsonSetter("viola")
public void setViola(int viola) {
    _viola = viola;
}
项目:stock-api-sdk    文件:LicensePurchaseDetails.java   
/**
 * Sets Asset licensing state.
 * @param licenseState Asset licensing state
 */
@JsonSetter("license")
public void setLicenseState(final AssetLicenseState licenseState) {
    this.mLicenseState = licenseState;
}
项目:Planchester    文件:Person.java   
@JsonSetter("phone_number")
public void setPhoneNumber(String phoneNumber) {
    _phoneNumber = phoneNumber;
}
项目:stock-api-sdk    文件:LicensePurchaseDetails.java   
/**
 * Sets Type of the licensed asset.
 * @param contentType Type of the licensed asset.
 */
@JsonSetter("content_type")
public void setContentType(final String contentType) {
    this.mContentType = contentType;
}
项目:messages-java-sdk    文件:SendMessagesResponse.java   
/** SETTER
 * TODO: Write general description for this method
 */
@JsonSetter("messages")
public void setMessages (List<Object> value) { 
    this.messages = value;
}
项目:messages-java-sdk    文件:CancelScheduledMessageRequest.java   
/** SETTER
 * TODO: Write general description for this method
 */
@JsonSetter("status")
public void setStatus (String value) { 
    this.status = value;
}
项目:stock-api-sdk    文件:LicenseEntitlementQuota.java   
/**
 * Sets Video quota for CCE 1st generation.
 * @param videoQuota video quota
 */
@JsonSetter("video_quota")
public void setVideoQuota(final Integer videoQuota) {
    this.mVideoQuota = videoQuota;
}
项目:messages-java-sdk    文件:CheckDeliveryReportsResponse.java   
/** SETTER
 * TODO: Write general description for this method
 */
@JsonSetter("delivery_reports")
public void setDeliveryReports (List<Object> value) { 
    this.deliveryReports = value;
}
项目:stock-api-sdk    文件:LicenseEntitlementQuota.java   
/**
 * Sets Standard credits quota for CCE 3rd generation.
 * @param standardCreditsQuota standard credits quota
 */
@JsonSetter("standard_credits_quota")
public void setStandardCreditsQuota(final Integer standardCreditsQuota) {
    this.mStandardCreditsQuota = standardCreditsQuota;
}
项目:stock-api-sdk    文件:LicenseEntitlementQuota.java   
/**
 * Sets Premium credits quota for CCE 3rd generation.
 * @param premiumCreditsQuota premium credits quota
 */
@JsonSetter("premium_credits_quota")
public void setPremiumCreditsQuota(final Integer premiumCreditsQuota) {
    this.mPremiumCreditsQuota = premiumCreditsQuota;
}
项目:messages-java-sdk    文件:ConfirmDeliveryReportsAsReceivedRequest11.java   
/** SETTER
 * TODO: Write general description for this method
 */
@JsonSetter("delivery_report_ids")
public void setDeliveryReportIds (List<UUID> value) { 
    this.deliveryReportIds = value;
}
项目:Planchester    文件:Person.java   
@JsonSetter("initials")
public void setInitials(String initials) {
    _initials = initials;
}
项目:stock-api-sdk    文件:LicenseThumbnail.java   
/**
 * Sets URL from which the thumbnail can be downloaded.
 * @param url URL from which the thumbnail can be downloaded.
 */
@JsonSetter("url")
public void setUrl(final String url) {
    this.mUrl = url;
}
项目:Planchester    文件:Instrumentation.java   
@JsonSetter("oboe")
public void setOboe(int oboe) {
    _oboe = oboe;
}
项目:stock-api-sdk    文件:LicenseThumbnail.java   
/**
 * Sets Width of asset thumbnail in pixels.
 * @param width Width of asset thumbnail in pixels.
 */
@JsonSetter("width")
public void setWidth(final Integer width) {
    this.mWidth = width;
}
项目:stock-api-sdk    文件:LicenseThumbnail.java   
/**
 * Sets Height of asset thumbnail in pixels.
 * @param height Height of asset thumbnail in pixels.
 */
@JsonSetter("height")
public void setHeight(final Integer height) {
    this.mHeight = height;
}
项目:stock-api-sdk    文件:LicenseComp.java   
/**
 * Sets Type of the complementary asset.
 * @param contentType Type of the complementary asset.
 */
@JsonSetter("content_type")
public void setContentType(final String contentType) {
    this.mContentType = contentType;
}
项目:stock-api-sdk    文件:LicenseComp.java   
/**
 * Sets Width of complementary asset in pixels.
 * @param width Width of complementary asset in pixels.
 */
@JsonSetter("width")
public void setWidth(final Integer width) {
    this.mWidth = width;
}
项目:stock-api-sdk    文件:LicenseComp.java   
/**
 * Set Height of complementary asset in pixels.
 * @param height Height of complementary asset in pixels.
 */
@JsonSetter("height")
public void setHeight(final Integer height) {
    this.mHeight = height;
}
项目:Planchester    文件:Person.java   
@JsonSetter("gender")
public void setGender(Gender gender) {
    _gender = gender;
}
项目:stock-api-sdk    文件:StockLicenseHistoryFile.java   
/**
 * @param licenseDate License Date
 */
@JsonSetter("license_date")
public void setLicenseDate(final String licenseDate) {
    this.mLicenseDate = licenseDate;
}
项目:stock-api-sdk    文件:StockLicenseHistoryFile.java   
/**
 * @param downloadUrl Download url of asset
 */
@JsonSetter("download_url")
public void setDownloadUrl(final String downloadUrl) {
    this.mDownloadUrl = downloadUrl;
}
项目:Planchester    文件:SpecialInstrumentation.java   
@JsonSetter("special_instrumentation_count")
public void setSpecialInstrumentationCount(int specialInstrumentCount) {
    _specialInstrumentationCount = specialInstrumentCount;
}
项目:azure-spring-boot    文件:TodoItem.java   
@JsonSetter("Owner")
public void setOwner(String owner) {
    this.owner = owner;
}
项目:Planchester    文件:MusicalWork.java   
@JsonSetter("composer")
public void setComposer(String composer) {
    _composer = composer;
}
项目:Planchester    文件:Person.java   
@JsonSetter("account")
public void setAccount(Account account) {
    _account = account;
}
项目:Planchester    文件:Error.java   
@JsonSetter("key")
public void setKey(String key) {
    _key = key;
}
项目:messages-java-sdk    文件:ConfirmDeliveryReportsAsReceivedRequest.java   
/** SETTER
 * TODO: Write general description for this method
 */
@JsonSetter("delivery_report_ids")
public void setDeliveryReportIds (List<String> value) { 
    this.deliveryReportIds = value;
}
项目:azure-maven-plugins    文件:FunctionTemplate.java   
@JsonSetter
public void setFiles(Map<String, String> files) {
    this.files = files;
}
项目:Planchester    文件:Person.java   
@JsonSetter("email")
public void setEmail(String email) {
    _email = email;
}