001: /*
002: * Copyright 2005-2007 Noelios Consulting.
003: *
004: * The contents of this file are subject to the terms of the Common Development
005: * and Distribution License (the "License"). You may not use this file except in
006: * compliance with the License.
007: *
008: * You can obtain a copy of the license at
009: * http://www.opensource.org/licenses/cddl1.txt See the License for the specific
010: * language governing permissions and limitations under the License.
011: *
012: * When distributing Covered Code, include this CDDL HEADER in each file and
013: * include the License file at http://www.opensource.org/licenses/cddl1.txt If
014: * applicable, add the following below this CDDL HEADER, with the fields
015: * enclosed by brackets "[]" replaced with your own identifying information:
016: * Portions Copyright [yyyy] [name of copyright owner]
017: */
018:
019: package org.restlet.example.book.rest.ch7;
020:
021: import java.util.Date;
022:
023: /**
024: * URI saved and annotated by a user.
025: *
026: * @author Jerome Louvel (contact@noelios.com)
027: */
028: public class Bookmark {
029:
030: private User user;
031:
032: private String uri;
033:
034: private String shortDescription;
035:
036: private String longDescription;
037:
038: private Date dateTime;
039:
040: private boolean restrict;
041:
042: public Bookmark(User user, String uri) {
043: this .user = user;
044: this .uri = uri;
045: this .restrict = true;
046: this .dateTime = null;
047: this .shortDescription = null;
048: this .longDescription = null;
049: }
050:
051: /**
052: * @return the dateTime
053: */
054: public Date getDateTime() {
055: return this .dateTime;
056: }
057:
058: /**
059: * @param dateTime
060: * the dateTime to set
061: */
062: public void setDateTime(Date dateTime) {
063: this .dateTime = dateTime;
064: }
065:
066: /**
067: * @return the longDescription
068: */
069: public String getLongDescription() {
070: return this .longDescription;
071: }
072:
073: /**
074: * @param longDescription
075: * the longDescription to set
076: */
077: public void setLongDescription(String longDescription) {
078: this .longDescription = longDescription;
079: }
080:
081: /**
082: * @return the restrict
083: */
084: public boolean isRestrict() {
085: return this .restrict;
086: }
087:
088: /**
089: * @param restrict
090: * the restrict to set
091: */
092: public void setRestrict(boolean restrict) {
093: this .restrict = restrict;
094: }
095:
096: /**
097: * @return the shortDescription
098: */
099: public String getShortDescription() {
100: return this .shortDescription;
101: }
102:
103: /**
104: * @param shortDescription
105: * the shortDescription to set
106: */
107: public void setShortDescription(String shortDescription) {
108: this .shortDescription = shortDescription;
109: }
110:
111: /**
112: * @return the uri
113: */
114: public String getUri() {
115: return this .uri;
116: }
117:
118: /**
119: * @param uri
120: * the uri to set
121: */
122: public void setUri(String uri) {
123: this .uri = uri;
124: }
125:
126: /**
127: * @return the user
128: */
129: public User getUser() {
130: return this .user;
131: }
132:
133: /**
134: * @param user
135: * the user to set
136: */
137: public void setUser(User user) {
138: this.user = user;
139: }
140:
141: }
|