001/* 002 * (C) Copyright 2018 Nuxeo (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Funsho David 018 * 019 */ 020 021package org.nuxeo.ecm.annotation; 022 023import java.util.Calendar; 024 025/** 026 * Annotation interface 027 * 028 * @since 10.1 029 */ 030public interface Annotation { 031 032 /** 033 * Gets annotation id. 034 * 035 * @return the id 036 */ 037 String getId(); 038 039 /** 040 * Sets annotation id. 041 * 042 * @param id the id 043 */ 044 void setId(String id); 045 046 /** 047 * Gets annotation type. Possible types are text, square, circle or polygon. 048 * 049 * @return the type 050 */ 051 String getType(); 052 053 /** 054 * Sets annotation type. 055 * 056 * @param type the type 057 */ 058 void setType(String type); 059 060 /** 061 * Gets the annotated document id. 062 * 063 * @return the annotated document id 064 */ 065 String getDocumentId(); 066 067 /** 068 * Sets the annotated document id. 069 * 070 * @param documentId the annotated document id 071 */ 072 void setDocumentId(String documentId); 073 074 /** 075 * Gets the xpath of annotated blob in the document. 076 * 077 * @return the xpath 078 */ 079 String getXpath(); 080 081 /** 082 * Sets the xpath of annotated blob in the document. 083 * 084 * @param xpath the xpath 085 */ 086 void setXpath(String xpath); 087 088 /** 089 * Gets annotation color. 090 * 091 * @return the color, expressed in hexadecimal 092 */ 093 String getColor(); 094 095 /** 096 * Sets annotation color. 097 * 098 * @param color the color, expressed in hexadecimal 099 */ 100 void setColor(String color); 101 102 /** 103 * Gets annotation interior color. 104 * 105 * @return the color, expressed in hexadecimal 106 */ 107 String getInteriorColor(); 108 109 /** 110 * Sets annotation interior color. 111 * 112 * @param color the color, expressed in hexadecimal 113 */ 114 void setInteriorColor(String color); 115 116 /** 117 * Gets annotation modification date. 118 * 119 * @return the modification date 120 */ 121 Calendar getDate(); 122 123 /** 124 * Sets annotation modification date. 125 * 126 * @param date the modification date 127 */ 128 void setDate(Calendar date); 129 130 /** 131 * Gets annotation list of flags, separated by commas. Possible values are: 132 * invisible|hidden|print|nozoom|norotate|noview|readonly|locked|togglenoview 133 * 134 * @return the flags 135 */ 136 String getFlags(); 137 138 /** 139 * Sets annotation list of flags. 140 * 141 * @param flags the flags, separated by commas 142 */ 143 void setFlags(String flags); 144 145 /** 146 * Gets annotation last modifier. 147 * 148 * @return the last modifier 149 */ 150 String getLastModifier(); 151 152 /** 153 * Sets annotation last modifier. 154 * 155 * @param lastModifier the last modifier 156 */ 157 void setLastModifier(String lastModifier); 158 159 /** 160 * Gets annotation page. 161 * 162 * @return the page 163 */ 164 long getPage(); 165 166 /** 167 * Sets annotation page. 168 * 169 * @param page the page 170 */ 171 void setPage(long page); 172 173 /** 174 * Gets annotation position. It is composed with four real numbers (positive or negative) separated by commas. 175 * 176 * @return the position 177 */ 178 String getPosition(); 179 180 /** 181 * Sets annotation position. 182 * 183 * @param position the position 184 */ 185 void setPosition(String position); 186 187 /** 188 * Gets annotation creation date. 189 * 190 * @return the creation date 191 */ 192 Calendar getCreationDate(); 193 194 /** 195 * Sets annotation creation date. 196 * 197 * @param creationDate the creation date 198 */ 199 void setCreationDate(Calendar creationDate); 200 201 /** 202 * Gets annotation opacity. 203 * 204 * @return the opacity 205 */ 206 double getOpacity(); 207 208 /** 209 * Sets annotation opacity. 210 * 211 * @param opacity the opacity 212 */ 213 void setOpacity(double opacity); 214 215 /** 216 * Gets annotation subject. 217 * 218 * @return the subject 219 */ 220 String getSubject(); 221 222 /** 223 * Sets annotation subject. 224 * 225 * @param subject the subject 226 */ 227 void setSubject(String subject); 228 229 /** 230 * Gets annotation security. 231 * 232 * @return the security 233 */ 234 String getSecurity(); 235 236 /** 237 * Sets annotation security. 238 * 239 * @param security the security 240 */ 241 void setSecurity(String security); 242 243 /** 244 * Gets annotation content in text format. 245 * 246 * @return the content 247 */ 248 String getContent(); 249 250 /** 251 * Sets annotation content. 252 * 253 * @param content the content in text format 254 */ 255 void setContent(String content); 256 257 /** 258 * Gets annotation parent id. This is the id of the annotation of which the current one is a reply. 259 * 260 * @return the parent id 261 */ 262 String getParentId(); 263 264 /** 265 * Sets annotation parent id. 266 * 267 * @param parentId the parent id 268 */ 269 void setParentId(String parentId); 270 271}