Source Code Cross Referenced for DAVRange.java in  » Content-Management-System » harmonise » org » openharmonise » dav » server » property » ranges » 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 » harmonise » org.openharmonise.dav.server.property.ranges 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the 
003:         * Mozilla Public License Version 1.1 (the "License"); 
004:         * you may not use this file except in compliance with the License. 
005:         * You may obtain a copy of the License at http://www.mozilla.org/MPL/
006:         *
007:         * Software distributed under the License is distributed on an "AS IS"
008:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. 
009:         * See the License for the specific language governing rights and 
010:         * limitations under the License.
011:         *
012:         * The Initial Developer of the Original Code is Simulacra Media Ltd.
013:         * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
014:         *
015:         * All Rights Reserved.
016:         *
017:         * Contributor(s):
018:         */
019:
020:        package org.openharmonise.dav.server.property.ranges;
021:
022:        import org.openharmonise.commons.dsi.*;
023:        import org.openharmonise.commons.xml.namespace.*;
024:        import org.openharmonise.rm.resources.metadata.properties.ranges.*;
025:        import org.w3c.dom.*;
026:
027:        import com.ibm.webdav.*;
028:
029:        /**
030:         * This class wraps up the functionality for publishing Harmonise ranges to DAV XML and
031:         * vice versa.
032:         * 
033:         * @author Michael Bell
034:         * @version $Revision: 1.1 $
035:         * @since November 19, 2003
036:         */
037:        abstract public class DAVRange {
038:
039:            public static final String TYPE_STRING = NamespaceType.XML_SCHEMA
040:                    .getPrefix()
041:                    + ":string";
042:            public static final String TYPE_DATE = NamespaceType.XML_SCHEMA
043:                    .getPrefix()
044:                    + ":date";
045:            public static final String TYPE_DATETIME = NamespaceType.XML_SCHEMA
046:                    .getPrefix()
047:                    + ":dateTime";
048:            public static final String TYPE_INTEGER = NamespaceType.XML_SCHEMA
049:                    .getPrefix()
050:                    + ":integer";
051:            public static final String TYPE_FLOAT = NamespaceType.XML_SCHEMA
052:                    .getPrefix()
053:                    + ":float";
054:            public static final String TYPE_BOOLEAN = NamespaceType.XML_SCHEMA
055:                    .getPrefix()
056:                    + ":boolean";
057:            public static final String TYPE_URI = NamespaceType.XML_SCHEMA
058:                    .getPrefix()
059:                    + ":anyURI";
060:
061:            protected AbstractDataStoreInterface m_dsi = null;
062:            public static final String TAG_RANGE = "range";
063:            public static final String TAG_VALUE = "value";
064:            public static final String TAG_MINLENGTH = "minLength";
065:            public static final String TAG_MAXLENGTH = "maxLength";
066:            public static final String TAG_MININCLUSIVE = "minInclusive";
067:            public static final String TAG_MAXINCLUSIVE = "maxInclusive";
068:            public static final String TAG_MINEXCLUSIVE = "minExclusive";
069:            public static final String TAG_MAXEXCLUSIVE = "maxExclusive";
070:            public static final String TAG_RESTRICTION = "restriction";
071:            public static final String TAG_LABELS = "labels";
072:            public static final String ATTRIB_PREFIXED_BASE = NamespaceType.XML_SCHEMA
073:                    .getPrefix()
074:                    + ":base";
075:
076:            protected Range m_range = null;
077:
078:            /**
079:             * Creates an object with an interface to the data store.
080:             */
081:            public DAVRange(AbstractDataStoreInterface dsi) {
082:                m_dsi = dsi;
083:            }
084:
085:            /**
086:             * Creates an object with an interface to the data store and a Harmonise range
087:             * to be published.
088:             */
089:            public DAVRange(AbstractDataStoreInterface dsi, Range range) {
090:                m_range = range;
091:                m_dsi = dsi;
092:            }
093:
094:            /**
095:             * @param dsi
096:             * @param range
097:             * @param davPropEl
098:             */
099:            public DAVRange(AbstractDataStoreInterface dsi, Range range,
100:                    Element davPropEl) throws WebDAVException {
101:
102:                m_range = range;
103:                m_dsi = dsi;
104:                populate(davPropEl);
105:            }
106:
107:            /**
108:             * Returns this range representation as DAV XML.
109:             * 
110:             * @param doc
111:             * @return
112:             * @throws WebDAVException
113:             */
114:            public Element asXML(Document doc) throws WebDAVException {
115:                Element rangeEl = doc.createElementNS(NamespaceType.DAV
116:                        .getURI(), TAG_RANGE);
117:                rangeEl.setPrefix(NamespaceType.DAV.getPrefix());
118:
119:                addRangeDetails(rangeEl, m_range, doc);
120:
121:                return rangeEl;
122:
123:            }
124:
125:            /**
126:             * Adds range details to the given range element.
127:             * 
128:             * <p>Note: should never get called as this method is overridden by methods
129:             * dealing with specific Harmonise ranges.</p>
130:             * 
131:             * @param rangeEl
132:             * @param range
133:             * @param doc
134:             * @throws WebDAVException
135:             */
136:            abstract protected void addRangeDetails(Element rangeEl,
137:                    Range range, Document doc) throws WebDAVException;
138:
139:            /**
140:             * Returns the Harmonise range for this DAV range.
141:             * 
142:             * @return
143:             */
144:            public Range getHarmoniseRange() {
145:                return m_range;
146:            }
147:
148:            /**
149:             * Populates this range object from the given XML element.
150:             * 
151:             * @param propEl
152:             * @throws WebDAVException
153:             */
154:            abstract public void populate(Element propEl)
155:                    throws WebDAVException;
156:
157:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.