Source Code Cross Referenced for httpdRobotsTxtConfig.java in  » Search-Engine » yacy » de » anomic » http » 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 » Search Engine » yacy » de.anomic.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // httpdRobotsTxtConfig.java 
002:        // ---------
003:        // part of YaCy
004:        // (C) by Michael Peter Christen; mc@anomic.de
005:        // first published on http://www.anomic.de
006:        // Frankfurt, Germany, 2007
007:        // Created 22.02.2007
008:        //
009:        // This file is contributed by Franz Brausze
010:        //
011:        // $LastChangedDate: $
012:        // $LastChangedRevision: $
013:        // $LastChangedBy: $
014:        //
015:        // This program is free software; you can redistribute it and/or modify
016:        // it under the terms of the GNU General Public License as published by
017:        // the Free Software Foundation; either version 2 of the License, or
018:        // (at your option) any later version.
019:        //
020:        // This program is distributed in the hope that it will be useful,
021:        // but WITHOUT ANY WARRANTY; without even the implied warranty of
022:        // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
023:        // GNU General Public License for more details.
024:        //
025:        // You should have received a copy of the GNU General Public License
026:        // along with this program; if not, write to the Free Software
027:        // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
028:        //
029:        // Using this software in any meaning (reading, learning, copying, compiling,
030:        // running) means that you agree that the Author(s) is (are) not responsible
031:        // for cost, loss of data or any harm that may be caused directly or indirectly
032:        // by usage of this softare or this documentation. The usage of this software
033:        // is on your own risk. The installation and usage (starting/running) of this
034:        // software may allow other people or application to access your computer and
035:        // any attached devices and is highly dependent on the configuration of the
036:        // software which must be done by the user of the software; the author(s) is
037:        // (are) also not responsible for proper configuration and usage of the
038:        // software, even if provoked by documentation provided together with
039:        // the software.
040:        //
041:        // Any changes to this file according to the GPL as documented in the file
042:        // gpl.txt aside this file in the shipment you received can be done to the
043:        // lines that follows this copyright notice here, but changes must not be
044:        // done inside the copyright notive above. A re-distribution must contain
045:        // the intact and unchanged copyright notice.
046:        // Contributions and changes to the program code must be marked as such.
047:
048:        package de.anomic.http;
049:
050:        import de.anomic.plasma.plasmaSwitchboard;
051:        import de.anomic.server.serverSwitch;
052:
053:        public final class httpdRobotsTxtConfig {
054:
055:            public static final String WIKI = "wiki";
056:            public static final String BLOG = "blog";
057:            public static final String BOOKMARKS = "bookmarks";
058:            public static final String HOMEPAGE = "homepage";
059:            public static final String FILESHARE = "fileshare";
060:            public static final String SURFTIPS = "surftips";
061:            public static final String NEWS = "news";
062:            public static final String STATUS = "status";
063:            public static final String LOCKED = "locked";
064:            public static final String DIRS = "dirs";
065:            public static final String NETWORK = "network";
066:            public static final String PROFILE = "profile";
067:            public static final String ALL = "all";
068:
069:            private boolean allDisallowed = false;
070:            private boolean lockedDisallowed = true;
071:            private boolean dirsDisallowed = true;
072:            private boolean wikiDisallowed = false;
073:            private boolean blogDisallowed = false;
074:            private boolean fileshareDisallowed = false;
075:            private boolean homepageDisallowed = false;
076:            private boolean newsDisallowed = false;
077:            private boolean statusDisallowed = false;
078:            private boolean networkDisallowed = false;
079:            private boolean surftipsDisallowed = false;
080:            private boolean bookmarksDisallowed = false;
081:            private boolean profileDisallowed = true;
082:
083:            public httpdRobotsTxtConfig() {
084:            }
085:
086:            public httpdRobotsTxtConfig(String[] active) {
087:                if (active == null)
088:                    return;
089:                for (int i = 0; i < active.length; i++) {
090:                    if (active[i] == null)
091:                        continue;
092:                    if (active[i].equals(BLOG)) {
093:                        this .blogDisallowed = true;
094:                        continue;
095:                    }
096:                    if (active[i].equals(WIKI)) {
097:                        this .wikiDisallowed = true;
098:                        continue;
099:                    }
100:                    if (active[i].equals(BOOKMARKS)) {
101:                        this .bookmarksDisallowed = true;
102:                        continue;
103:                    }
104:                    if (active[i].equals(HOMEPAGE)) {
105:                        this .homepageDisallowed = true;
106:                        continue;
107:                    }
108:                    if (active[i].equals(FILESHARE)) {
109:                        this .fileshareDisallowed = true;
110:                        continue;
111:                    }
112:                    if (active[i].equals(SURFTIPS)) {
113:                        this .surftipsDisallowed = true;
114:                        continue;
115:                    }
116:                    if (active[i].equals(NEWS)) {
117:                        this .newsDisallowed = true;
118:                        continue;
119:                    }
120:                    if (active[i].equals(STATUS)) {
121:                        this .statusDisallowed = true;
122:                        continue;
123:                    }
124:                    if (active[i].equals(NETWORK)) {
125:                        this .networkDisallowed = true;
126:                        continue;
127:                    }
128:                    if (active[i].equals(LOCKED)) {
129:                        this .lockedDisallowed = true;
130:                        continue;
131:                    }
132:                    if (active[i].equals(DIRS)) {
133:                        this .dirsDisallowed = true;
134:                        continue;
135:                    }
136:                    if (active[i].equals(PROFILE)) {
137:                        this .profileDisallowed = true;
138:                        continue;
139:                    }
140:                    if (active[i].equals(ALL)) {
141:                        this .allDisallowed = true;
142:                        continue;
143:                    }
144:                }
145:            }
146:
147:            public static httpdRobotsTxtConfig init(serverSwitch env) {
148:                String cfg = env.getConfig(plasmaSwitchboard.ROBOTS_TXT,
149:                        plasmaSwitchboard.ROBOTS_TXT_DEFAULT);
150:                if (cfg == null)
151:                    return new httpdRobotsTxtConfig();
152:                return new httpdRobotsTxtConfig(cfg.split(","));
153:            }
154:
155:            public String toString() {
156:                if (this .allDisallowed)
157:                    return ALL;
158:                StringBuffer sb = new StringBuffer();
159:                if (this .blogDisallowed)
160:                    sb.append(BLOG).append(",");
161:                if (this .bookmarksDisallowed)
162:                    sb.append(BOOKMARKS).append(",");
163:                if (this .dirsDisallowed)
164:                    sb.append(DIRS).append(",");
165:                if (this .fileshareDisallowed)
166:                    sb.append(FILESHARE).append(",");
167:                if (this .homepageDisallowed)
168:                    sb.append(HOMEPAGE).append(",");
169:                if (this .lockedDisallowed)
170:                    sb.append(LOCKED).append(",");
171:                if (this .networkDisallowed)
172:                    sb.append(NETWORK).append(",");
173:                if (this .newsDisallowed)
174:                    sb.append(NEWS).append(",");
175:                if (this .statusDisallowed)
176:                    sb.append(STATUS).append(",");
177:                if (this .surftipsDisallowed)
178:                    sb.append(SURFTIPS).append(",");
179:                if (this .wikiDisallowed)
180:                    sb.append(WIKI).append(",");
181:                if (this .profileDisallowed)
182:                    sb.append(PROFILE).append(",");
183:                return sb.toString();
184:            }
185:
186:            public boolean isAllDisallowed() {
187:                return allDisallowed;
188:            }
189:
190:            public void setAllDisallowed(boolean allDisallowed) {
191:                this .allDisallowed = allDisallowed;
192:            }
193:
194:            public boolean isLockedDisallowed() {
195:                return lockedDisallowed || this .allDisallowed;
196:            }
197:
198:            public void setLockedDisallowed(boolean lockedDisallowed) {
199:                this .lockedDisallowed = lockedDisallowed;
200:            }
201:
202:            public boolean isDirsDisallowed() {
203:                return dirsDisallowed || this .allDisallowed;
204:            }
205:
206:            public void setDirsDisallowed(boolean dirsDisallowed) {
207:                this .dirsDisallowed = dirsDisallowed;
208:            }
209:
210:            public boolean isBlogDisallowed() {
211:                return blogDisallowed || this .allDisallowed;
212:            }
213:
214:            public void setBlogDisallowed(boolean blogDisallowed) {
215:                this .blogDisallowed = blogDisallowed;
216:            }
217:
218:            public boolean isBookmarksDisallowed() {
219:                return bookmarksDisallowed || this .allDisallowed;
220:            }
221:
222:            public void setBookmarksDisallowed(boolean bookmarksDisallowed) {
223:                this .bookmarksDisallowed = bookmarksDisallowed;
224:            }
225:
226:            public boolean isFileshareDisallowed() {
227:                return fileshareDisallowed || this .allDisallowed;
228:            }
229:
230:            public void setFileshareDisallowed(boolean fileshareDisallowed) {
231:                this .fileshareDisallowed = fileshareDisallowed;
232:            }
233:
234:            public boolean isHomepageDisallowed() {
235:                return homepageDisallowed || this .allDisallowed;
236:            }
237:
238:            public void setHomepageDisallowed(boolean homepageDisallowed) {
239:                this .homepageDisallowed = homepageDisallowed;
240:            }
241:
242:            public boolean isNetworkDisallowed() {
243:                return networkDisallowed || this .allDisallowed;
244:            }
245:
246:            public void setNetworkDisallowed(boolean networkDisallowed) {
247:                this .networkDisallowed = networkDisallowed;
248:            }
249:
250:            public boolean isNewsDisallowed() {
251:                return newsDisallowed || this .allDisallowed;
252:            }
253:
254:            public void setNewsDisallowed(boolean newsDisallowed) {
255:                this .newsDisallowed = newsDisallowed;
256:            }
257:
258:            public boolean isStatusDisallowed() {
259:                return statusDisallowed || this .allDisallowed;
260:            }
261:
262:            public void setStatusDisallowed(boolean statusDisallowed) {
263:                this .statusDisallowed = statusDisallowed;
264:            }
265:
266:            public boolean isSurftipsDisallowed() {
267:                return surftipsDisallowed || this .allDisallowed;
268:            }
269:
270:            public void setSurftipsDisallowed(boolean surftipsDisallowed) {
271:                this .surftipsDisallowed = surftipsDisallowed;
272:            }
273:
274:            public boolean isWikiDisallowed() {
275:                return wikiDisallowed || this .allDisallowed;
276:            }
277:
278:            public void setWikiDisallowed(boolean wikiDisallowed) {
279:                this .wikiDisallowed = wikiDisallowed;
280:            }
281:
282:            public boolean isProfileDisallowed() {
283:                return profileDisallowed || this .allDisallowed;
284:            }
285:
286:            public void setProfileDisallowed(boolean profileDisallowed) {
287:                this.profileDisallowed = profileDisallowed;
288:            }
289:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.