Source Code Cross Referenced for DAVProperty.java in  » Net » SkunkDAV » org » skunk » dav » client » 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 » Net » SkunkDAV » org.skunk.dav.client 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  $Id: DAVProperty.java,v 1.12 2001/06/05 16:30:20 smulloni Exp $
003:         *  Time-stamp: <01/06/05 12:25:39 smulloni>
004:         *
005:         *  Copyright (c) 2000-2001, Jacob Smullyan.
006:         *
007:         *  This is part of SkunkDAV, a WebDAV client.  See http://skunkdav.sourceforge.net/ 
008:         *  for the latest version.
009:         * 
010:         *  SkunkDAV is free software; you can redistribute it and/or
011:         *  modify it under the terms of the GNU General Public License as published
012:         *  by the Free Software Foundation; either version 2, or (at your option)
013:         *  any later version.
014:         * 
015:         *  SkunkDAV  is distributed in the hope that it will be useful,
016:         *  but WITHOUT ANY WARRANTY; without even the implied warranty of
017:         *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
018:         *  General Public License for more details.
019:         * 
020:         *  You should have received a copy of the GNU General Public License
021:         *  along with SkunkDAV; see the file COPYING.  If not, write to the Free
022:         *  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
023:         *  02111-1307, USA.
024:         */
025:
026:        package org.skunk.dav.client;
027:
028:        import org.skunk.minixml.XMLElement;
029:        import org.skunk.trace.Debug;
030:
031:        /**
032:         * DAVProperty.java
033:         * convenience for adding named properties to a propfind
034:         *
035:         * Created: Mon Sep 18 13:51:18 2000
036:         *
037:         * @author <a href="mailto:jacob.smullyan@smullyan.org"</a>
038:         * @version $Revision: 1.12 $
039:         */
040:
041:        public class DAVProperty extends XMLElement {
042:            public static final DAVProperty LOCKDISCOVERY = getCanonicalProperty(DAVConstants.LOCKDISCOVERY_PROP);
043:            public static final DAVProperty CREATIONDATE = getCanonicalProperty(DAVConstants.CREATIONDATE_PROP);
044:            public static final DAVProperty DISPLAYNAME = getCanonicalProperty(DAVConstants.DISPLAYNAME_PROP);
045:            public static final DAVProperty GETCONTENTLANGUAGE = getCanonicalProperty(DAVConstants.GETCONTENTLANGUAGE_PROP);
046:            public static final DAVProperty GETCONTENTLENGTH = getCanonicalProperty(DAVConstants.GETCONTENTLENGTH_PROP);
047:            public static final DAVProperty GETCONTENTTYPE = getCanonicalProperty(DAVConstants.GETCONTENTTYPE_PROP);
048:            public static final DAVProperty GETETAG = getCanonicalProperty(DAVConstants.GETETAG_PROP);
049:            public static final DAVProperty GETLASTMODIFIED = getCanonicalProperty(DAVConstants.GETLASTMODIFIED_PROP);
050:            public static final DAVProperty RESOURCETYPE = getCanonicalProperty(DAVConstants.RESOURCETYPE_PROP);
051:            public static final DAVProperty SOURCE = getCanonicalProperty(DAVConstants.SOURCE_PROP);
052:            public static final DAVProperty SUPPORTEDLOCK = getCanonicalProperty(DAVConstants.SUPPORTEDLOCK_PROP);
053:            public static final DAVProperty EXECUTABLE = new DAVProperty(
054:                    DAVConstants.EXECUTABLE_PROP, "apache",
055:                    DAVConstants.APACHE_DAV_NAMESPACE);
056:
057:            public static final DAVProperty[] BASIC_PROPERTIES = {
058:                    LOCKDISCOVERY, CREATIONDATE, DISPLAYNAME,
059:                    //GETCONTENTLANGUAGE,
060:                    GETCONTENTLENGTH, GETCONTENTTYPE,
061:                    //GETETAG,
062:                    GETLASTMODIFIED, RESOURCETYPE,
063:            //SOURCE,
064:            //SUPPORTEDLOCK
065:            };
066:
067:            public DAVProperty(String propertyName) {
068:                super (propertyName);
069:            }
070:
071:            public DAVProperty(String propertyName, String namespaceCode,
072:                    String namespace) {
073:                super (propertyName, namespaceCode, namespace);
074:            }
075:
076:            /**
077:             * 
078:             */
079:            public DAVProperty(XMLElement elem) {
080:                super (elem.getElementName(), elem.getElementNamespaceCode(),
081:                        elem.getNamespace(elem.getElementNamespaceCode()));
082:            }
083:
084:            public static DAVProperty getCanonicalProperty(String canonicalName) {
085:                return new DAVProperty(canonicalName, "skunk",
086:                        DAVConstants.DAV_NAMESPACE);
087:            }
088:
089:            public boolean equals(Object otherObject) {
090:                Debug.trace(this , Debug.DP6, "comparing {0} and {1}",
091:                        new Object[] { this , otherObject });
092:
093:                if (otherObject instanceof  DAVProperty) {
094:                    DAVProperty otherProperty = (DAVProperty) otherObject;
095:                    String namespace = getNamespace();
096:                    String otherNamespace = otherProperty.getNamespace();
097:                    String elementName = getElementName();
098:                    String otherElementName = otherProperty.getElementName();
099:
100:                    // fix for possible NullPointerException if namespace is null, pointed out
101:                    // by Mustafa Cakar (Mustafa.Cakar@germany.sun.com), from whose patch
102:                    // this code is derived.  This differs from his patch in that I don't currently 
103:                    // prevent a NullPointerException if the element name is null.
104:
105:                    if (elementName.equals(otherElementName)) {
106:                        if (namespace == null && otherNamespace == null) {
107:                            return true;
108:                        } else if (namespace != null) {
109:                            return namespace.equals(otherNamespace);
110:                        }
111:                    }
112:                }
113:                return false;
114:            }
115:
116:            public int hashCode() {
117:                return (getElementName() + getNamespace()).hashCode();
118:            }
119:
120:        }
121:
122:        /* $Log: DAVProperty.java,v $
123:         /* Revision 1.12  2001/06/05 16:30:20  smulloni
124:         /* incorporated fix from Mustafa Cakar for NullPointerException in
125:         /* DAVProperty.equals().
126:         /*
127:         /* Revision 1.11  2001/01/05 08:01:12  smulloni
128:         /* changes to the connection gui for the Explorer; added depth configurability to
129:         /* propfind in the jpython test script; added an experimental "allprop" system
130:         /* property which affects the propfind query type
131:         /*
132:         /* Revision 1.10  2000/12/19 22:06:15  smulloni
133:         /* adding documentation.
134:         /*
135:         /* Revision 1.9  2000/12/03 23:53:25  smulloni
136:         /* added license and copyright preamble to java files.
137:         /*
138:         /* Revision 1.8  2000/11/14 23:18:31  smullyan
139:         /* fix for responsedescription property in multistatus
140:         /*
141:         /* Revision 1.7  2000/11/13 23:28:29  smullyan
142:         /* first pass at a gui for proppatch, added to the propertiese dialog.  Highly
143:         /* problematic still, needs substantial work.
144:         /*
145:         /* Revision 1.6  2000/11/09 23:34:51  smullyan
146:         /* log added to every Java file, with the help of python.  Lock stealing
147:         /* implemented, and treatment of locks made more robust.
148:         /* */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.