Source Code Cross Referenced for Document.java in  » Content-Management-System » contineo » org » contineo » core » document » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » contineo » org.contineo.core.document 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.contineo.core.document;
002:
003:        import java.util.HashSet;
004:        import java.util.Iterator;
005:        import java.util.Set;
006:
007:        import org.contineo.core.security.Menu;
008:
009:        /**
010:         * This class represents documents.
011:         * 
012:         * @author Michael Scholz
013:         * @author Marco Meschieri
014:         * @version 1.0
015:         */
016:        public class Document {
017:            public static final int DOC_CHECKED_IN = 0;
018:
019:            public static final int DOC_CHECKED_OUT = 1;
020:
021:            private int docId = 0;
022:
023:            private String docName = "";
024:
025:            private String docVersion = "";
026:
027:            private String docDate = "";
028:
029:            private String docPublisher = "";
030:
031:            /**
032:             * Whether document is checked in or out;
033:             * 
034:             * @see Document#DOC_CHECKED_IN
035:             * @see Document#DOC_CHECKED_OUT
036:             * @uml.property name="docStatus"
037:             */
038:            private int docStatus = DOC_CHECKED_IN;
039:
040:            private String docType = "";
041:
042:            private String checkoutUser = "";
043:
044:            private String source = "";
045:
046:            private String sourceAuthor = "";
047:
048:            private String sourceDate = "";
049:
050:            private String sourceType = "";
051:
052:            private String coverage = "";
053:
054:            private String language = "";
055:
056:            private Set<String> keywords = new HashSet<String>();
057:
058:            private Set<Version> versions = new HashSet<Version>();
059:
060:            private Menu menu;
061:
062:            public Document() {
063:            }
064:
065:            public int getDocId() {
066:                return docId;
067:            }
068:
069:            public String getDocName() {
070:                return docName;
071:            }
072:
073:            public String getDocVersion() {
074:                return docVersion;
075:            }
076:
077:            public String getDocDate() {
078:                return docDate;
079:            }
080:
081:            public String getDocPublisher() {
082:                return docPublisher;
083:            }
084:
085:            public int getDocStatus() {
086:                return docStatus;
087:            }
088:
089:            public int getMenuId() {
090:                return getMenu().getMenuId();
091:            }
092:
093:            public String getDocType() {
094:                return docType;
095:            }
096:
097:            public String getCheckoutUser() {
098:                return checkoutUser;
099:            }
100:
101:            public String getSource() {
102:                return source;
103:            }
104:
105:            public String getSourceAuthor() {
106:                return sourceAuthor;
107:            }
108:
109:            public String getSourceDate() {
110:                return sourceDate;
111:            }
112:
113:            public String getSourceType() {
114:                return sourceType;
115:            }
116:
117:            public String getCoverage() {
118:                return coverage;
119:            }
120:
121:            public String getLanguage() {
122:                return language;
123:            }
124:
125:            public Set<String> getKeywords() {
126:                return keywords;
127:            }
128:
129:            public String getKeywordsString() {
130:                StringBuffer sb = new StringBuffer();
131:                Iterator iter = keywords.iterator();
132:                boolean start = true;
133:
134:                while (iter.hasNext()) {
135:                    String words = (String) iter.next();
136:
137:                    if (!start) {
138:                        sb.append(", ");
139:                    } else {
140:                        start = false;
141:                    }
142:
143:                    sb.append(words);
144:                }
145:
146:                return sb.toString();
147:            }
148:
149:            public Set<Version> getVersions() {
150:                return versions;
151:            }
152:
153:            public Menu getMenu() {
154:                return menu;
155:            }
156:
157:            public void setDocId(int id) {
158:                docId = id;
159:            }
160:
161:            public void setDocName(String name) {
162:                docName = name;
163:            }
164:
165:            public void setDocVersion(String version) {
166:                docVersion = version;
167:            }
168:
169:            public void setDocDate(String date) {
170:                docDate = date;
171:            }
172:
173:            public void setDocPublisher(String publisher) {
174:                docPublisher = publisher;
175:            }
176:
177:            public void setDocStatus(int status) {
178:                docStatus = status;
179:            }
180:
181:            public void setDocType(String type) {
182:                docType = type;
183:            }
184:
185:            public void setCheckoutUser(String user) {
186:                checkoutUser = user;
187:            }
188:
189:            public void setSource(String src) {
190:                source = src;
191:            }
192:
193:            public void setSourceAuthor(String author) {
194:                sourceAuthor = author;
195:            }
196:
197:            public void setSourceDate(String date) {
198:                sourceDate = date;
199:            }
200:
201:            public void setSourceType(String type) {
202:                sourceType = type;
203:            }
204:
205:            public void setCoverage(String cover) {
206:                coverage = cover;
207:            }
208:
209:            public void setLanguage(String lang) {
210:                language = lang;
211:            }
212:
213:            public void clearKeywords() {
214:                keywords.clear();
215:            }
216:
217:            public void setKeywords(Set<String> words) {
218:                keywords = words;
219:            }
220:
221:            public void setVersions(Set<Version> vers) {
222:                versions = vers;
223:            }
224:
225:            public void setMenu(Menu m) {
226:                menu = m;
227:            }
228:
229:            public void addKeyword(String word) {
230:                keywords.add(word);
231:            }
232:
233:            public void addVersion(Version vers) {
234:                versions.add(vers);
235:            }
236:
237:            /**
238:             * Iterates over the versions searchinf for the specified id
239:             * 
240:             * @param id The version id
241:             * @return The found version
242:             */
243:            public Version getVersion(String id) {
244:                for (Version version : versions) {
245:                    if (version.getVersion().equals(id))
246:                        return version;
247:                }
248:                return null;
249:            }
250:
251:            @Override
252:            public boolean equals(Object obj) {
253:                if (!(obj instanceof  Document))
254:                    return false;
255:
256:                Document other = (Document) obj;
257:                return other.getDocId() == this .getDocId();
258:            }
259:
260:            @Override
261:            public int hashCode() {
262:                return new Integer(docId).hashCode();
263:            }
264:
265:            @Override
266:            public String toString() {
267:                return Integer.toString(docId);
268:            }
269:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.