001package org.apache.commons.digester3.annotations.atom;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import java.net.URL;
023import java.util.Date;
024
025import org.apache.commons.digester3.annotations.rules.BeanPropertySetter;
026import org.apache.commons.digester3.annotations.rules.ObjectCreate;
027import org.apache.commons.digester3.annotations.rules.SetProperty;
028
029@ObjectCreate( pattern = "feed/entry" )
030public final class Entry
031{
032
033    @BeanPropertySetter( pattern = "feed/entry/title" )
034    private String title;
035
036    @SetProperty( pattern = "feed/entry/link", attributeName = "href" )
037    private URL link;
038
039    @BeanPropertySetter( pattern = "feed/entry/updated" )
040    private Date updated;
041
042    @BeanPropertySetter( pattern = "feed/entry/id" )
043    private String id;
044
045    @BeanPropertySetter( pattern = "feed/entry/content" )
046    private String content;
047
048    public String getTitle()
049    {
050        return title;
051    }
052
053    public void setTitle( String title )
054    {
055        this.title = title;
056    }
057
058    public URL getLink()
059    {
060        return link;
061    }
062
063    public void setLink( URL link )
064    {
065        this.link = link;
066    }
067
068    public Date getUpdated()
069    {
070        return updated;
071    }
072
073    public void setUpdated( Date updated )
074    {
075        this.updated = updated;
076    }
077
078    public String getId()
079    {
080        return id;
081    }
082
083    public void setId( String id )
084    {
085        this.id = id;
086    }
087
088    public String getContent()
089    {
090        return content;
091    }
092
093    public void setContent( String content )
094    {
095        this.content = content;
096    }
097
098    @Override
099    public String toString()
100    {
101        return "\n    Entry [title=" + title + ", link=" + link + ", updated=" + updated + ", id=" + id + ", content="
102            + content + "]\n";
103    }
104
105}