View Javadoc
1   /*
2    * Copyright (C) 2003-2011 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   */
17  package org.exoplatform.services.seo;
18  
19  import java.io.Serializable;
20  
21  /**
22   * Created by The eXo Platform SAS
23   * Author : eXoPlatform
24   *          exo@exoplatform.com
25   * Jun 17, 2011  
26   */
27  public class PageMetadataModel implements Serializable {
28   
29    public static final PageMetadataModel NULL_PAGE_METADATA_MODEL = new PageMetadataModel();
30  
31    private static final long serialVersionUID = -2765258183491567699L;
32  
33    private String uri = null;
34    
35    //private String pageParent = null;
36   
37    private String rbcontent = null;
38   
39    private String keywords = null;
40   
41    private String description = null;
42    
43    private String title = null;
44   
45    private float priority = -1;
46   
47    private String frequency = null;
48   
49    private boolean sitemap = true;
50    
51    private String fullStatus = null;
52    
53    private String pageReference = null;
54   
55    public String getUri() { 
56      if(uri != null && uri.length() > 0)
57        return uri.trim();
58      return uri; 
59    }
60    public void setUri(String uri) { this.uri = uri; }
61    
62    /*public String getPageParent() { 
63      if(pageParent != null && pageParent.length() > 0)
64        return pageParent.trim();
65      return pageParent; 
66    }
67    public void setPageParent(String pageParent) { this.pageParent = pageParent; }*/
68   
69    public String getRobotsContent() { 
70      if(rbcontent != null && rbcontent.length() > 0)
71        return rbcontent.trim();
72      return rbcontent; 
73    }
74    public void setRobotsContent(String rbcontent) { this.rbcontent = rbcontent; }
75   
76    public String getDescription() { 
77      if(description != null && description.length() > 0)
78        return description.trim();
79      return description; 
80    }
81    public void setDescription(String description) { this.description = description; }
82   
83    public String getKeywords() { 
84      if(keywords != null && keywords.length() > 0)
85        return keywords.trim();
86      return keywords; 
87    }
88    public void setKeywords(String keywords) { this.keywords = keywords; }
89    
90    public String getTitle() { 
91      if(title != null && title.length() > 0)
92        return title.trim();
93      return title; 
94    }
95    public void setTitle(String title) { this.title = title; }
96   
97    public float getPriority() { return priority; }
98    public void setPriority(float priority) { this.priority= priority; }
99   
100   public String getFullStatus() { 
101     if(fullStatus != null && fullStatus.length() > 0)
102       return fullStatus.trim();
103     return fullStatus; 
104   }
105   public void setFullStatus(String fullStatus) { this.fullStatus= fullStatus; }
106  
107   public boolean getSitemap() { return sitemap; }
108   public void setSiteMap(boolean sitemap) { this.sitemap= sitemap; }
109   
110   public String getFrequency() { 
111     if(frequency != null && frequency.length() > 0)
112       return frequency.trim();
113     return frequency; 
114   }
115   public void setFrequency(String frequency) { this.frequency= frequency; }
116   
117   public String getPageReference () { 
118     if(pageReference != null && pageReference.length() > 0)
119       return pageReference.trim();
120     return pageReference; 
121   }
122   public void setPageReference(String pageReference) { this.pageReference = pageReference; }
123 }