// Path: src/main/java/org/springframework/social/bitbucket/api/impl/UTCDateDeserializer.java
// public class UTCDateDeserializer extends JsonDeserializer<Date> {
// 
//     @Override
//     public Date deserialize(JsonParser jp, DeserializationContext ctxt)
//             throws IOException, JsonProcessingException {
//         try {
//             SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT,
//                     Locale.ENGLISH);
//             dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
//             return dateFormat.parse(jp.getText());
//         } catch (ParseException e) {
//             throw new JsonParseException("Can't parse date : " + jp.getText(),
//                     jp.getCurrentLocation());
//         }
//     }
// 
//     /**
//      * JDK can't parse a TZ with a colon. Assume it will be +00:00.
//      */
//     private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
// 
// }


import java.util.Date;
import org.springframework.social.bitbucket.api.impl.UTCDateDeserializer;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
/**
 * Copyright 2012 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.social.bitbucket.api;




/**
 * Metadata about a file in a repository.
 * 
 * @author Eric Bottard
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class BitBucketFileMetadata {

    @JsonProperty
    private String path;

    @JsonProperty
    private String revision;

    @JsonProperty("utctimestamp")
// Path: src/main/java/org/springframework/social/bitbucket/api/impl/UTCDateDeserializer.java
// public class UTCDateDeserializer extends JsonDeserializer<Date> {
// 
//     @Override
//     public Date deserialize(JsonParser jp, DeserializationContext ctxt)
//             throws IOException, JsonProcessingException {
//         try {
//             SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT,
//                     Locale.ENGLISH);
//             dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
//             return dateFormat.parse(jp.getText());
//         } catch (ParseException e) {
//             throw new JsonParseException("Can't parse date : " + jp.getText(),
//                     jp.getCurrentLocation());
//         }
//     }
// 
//     /**
//      * JDK can't parse a TZ with a colon. Assume it will be +00:00.
//      */
//     private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
// 
// }


// Path: src/main/java/org/springframework/social/bitbucket/api/BitBucketFileMetadata.java
import java.util.Date;
import org.springframework.social.bitbucket.api.impl.UTCDateDeserializer;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

/**
 * Copyright 2012 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.social.bitbucket.api;




/**
 * Metadata about a file in a repository.
 * 
 * @author Eric Bottard
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class BitBucketFileMetadata {

    @JsonProperty
    private String path;

    @JsonProperty
    private String revision;

    @JsonProperty("utctimestamp")
    @JsonDeserialize(using = UTCDateDeserializer.class)