Source Code Cross Referenced for EntrySet.java in  » Blogger-System » apache-roller-3.1 » org » apache » roller » webservices » adminapi » sdk » 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 » Blogger System » apache roller 3.1 » org.apache.roller.webservices.adminapi.sdk 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  The ASF licenses this file to You
004:         * under the Apache License, Version 2.0 (the "License"); you may not
005:         * 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.  For additional information regarding
015:         * copyright in this work, please see the NOTICE file in the top level
016:         * directory of this distribution.
017:         */
018:        package org.apache.roller.webservices.adminapi.sdk;
019:
020:        import java.util.Arrays;
021:        import java.util.List;
022:        import org.jdom.Document;
023:        import org.jdom.Element;
024:
025:        /**
026:         * This class is the abstract notion of a set of entries.
027:         * Weblog resources are represented by sets of entries. 
028:         *
029:         * @author jtb
030:         */
031:        public abstract class EntrySet extends Entry {
032:            /** Entry set types. */
033:            public static interface Types {
034:                /*
035:                 * Set of user entries. 
036:                 * A user entry describes a user of the weblog server.
037:                 */
038:                public static final String USERS = "users";
039:                /** 
040:                 * Set of weblog entries. 
041:                 * Note that this is not a set of entries in a weblog, but rather,
042:                 * a set of entries that describe the weblog itself.
043:                 */
044:                public static final String WEBLOGS = "weblogs";
045:                /** 
046:                 * Set of member entries.
047:                 * A member entry describes a user's membership to and 
048:                 * permission with a particular weblog.
049:                 */
050:                public static final String MEMBERS = "members";
051:                /**
052:                 * Set of workspace entries.
053:                 * This type, along with WORKSPACE and COLLECTION, define
054:                 * the element that describe the introspection document
055:                 * for the AAPP service.
056:                 * <p>
057:                 * A service is a set of workspaces, and a workspace is a set of 
058:                 * collections.
059:                 */
060:                public static final String SERVICE = "service";
061:                /** Set of collection entries. */
062:                public static final String WORKSPACE = "workspace";
063:            }
064:
065:            private List entries = null;
066:
067:            /** Get the type of this object. */
068:            public abstract String getType();
069:
070:            /** Get the entries in this object. */
071:            public Entry[] getEntries() {
072:                return (Entry[]) entries.toArray(new Entry[0]);
073:            }
074:
075:            /** Set the entries of this object. */
076:            public void setEntries(Entry[] entryArray) {
077:                entries = Arrays.asList(entryArray);
078:            }
079:
080:            /** Is this entry set empty? */
081:            public boolean isEmpty() {
082:                return entries == null || entries.size() == 0;
083:            }
084:
085:            /** This object as a JDOM Document */
086:            public Document toDocument() {
087:                Element e = new Element(getType(), NAMESPACE);
088:                Document doc = new Document(e);
089:
090:                // href
091:                e.setAttribute(Attributes.HREF, getHref());
092:
093:                // entries
094:                for (int i = 0; i < getEntries().length; i++) {
095:                    e.addContent(getEntries()[i].toDocument()
096:                            .detachRootElement());
097:                }
098:
099:                return doc;
100:            }
101:
102:            public boolean equals(Object o) {
103:                if (o == null || o.getClass() != this .getClass()) {
104:                    return false;
105:                }
106:
107:                EntrySet other = (EntrySet) o;
108:
109:                if (!areEqual(getHref(), other.getHref())) {
110:                    return false;
111:                }
112:                if (!areEqual(getType(), other.getType())) {
113:                    return false;
114:                }
115:                if (!areEqual(getEntries(), other.getEntries())) {
116:                    return false;
117:                }
118:
119:                return true;
120:            }
121:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.