Source Code Cross Referenced for SVNArgument.java in  » Source-Control » tmatesoft-SVN » org » tmatesoft » svn » cli » 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 » Source Control » tmatesoft SVN » org.tmatesoft.svn.cli 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ====================================================================
003:         * Copyright (c) 2004-2008 TMate Software Ltd.  All rights reserved.
004:         *
005:         * This software is licensed as described in the file COPYING, which
006:         * you should have received as part of this distribution.  The terms
007:         * are also available at http://svnkit.com/license.html
008:         * If newer versions of this license are posted there, you may use a
009:         * newer version instead, at your option.
010:         * ====================================================================
011:         */
012:
013:        package org.tmatesoft.svn.cli;
014:
015:        import java.util.ArrayList;
016:        import java.util.Iterator;
017:        import java.util.Set;
018:
019:        import org.tmatesoft.svn.core.SVNException;
020:
021:        /**
022:         * @version 1.1.1
023:         * @author  TMate Software Ltd.
024:         */
025:        public abstract class SVNArgument {
026:
027:            public static final SVNArgument PASSWORD = createStringArgument(new String[] { "--password" });
028:            public static final SVNArgument USERNAME = createStringArgument(new String[] { "--username" });
029:            public static final SVNArgument CONFIG_DIR = createStringArgument(new String[] { "--config-dir" });
030:
031:            public static final SVNArgument NON_RECURSIVE = createUnaryArgument(new String[] {
032:                    "--non-recursive", "-N" });
033:            public static final SVNArgument NO_AUTO_PROPS = createUnaryArgument(new String[] { "--no-auto-props" });
034:            public static final SVNArgument AUTO_PROPS = createUnaryArgument(new String[] { "--auto-props" });
035:            public static final SVNArgument IGNORE_ANCESTRY = createUnaryArgument(new String[] { "--ignore-ancestry" });
036:            public static final SVNArgument REV_PROP = createUnaryArgument(new String[] { "--revprop" });
037:            public static final SVNArgument RECURSIVE = createUnaryArgument(new String[] {
038:                    "--recursive", "-R" });
039:            public static final SVNArgument VERBOSE = createUnaryArgument(new String[] {
040:                    "--verbose", "-v" });
041:            public static final SVNArgument NO_DIFF_DELETED = createUnaryArgument(new String[] { "--no-diff-deleted" });
042:            public static final SVNArgument NO_DIFF_ADDED = createUnaryArgument(new String[] { "--no-diff-added" });
043:            public static final SVNArgument DIFF_COPY_FROM = createUnaryArgument(new String[] { "--diff-copy-from" });
044:            public static final SVNArgument USE_ANCESTRY = createUnaryArgument(new String[] { "--notice-ancestry" });
045:            public static final SVNArgument QUIET = createUnaryArgument(new String[] {
046:                    "--quiet", "-q" });
047:            public static final SVNArgument SHOW_UPDATES = createUnaryArgument(new String[] {
048:                    "--show-updates", "-u" });
049:            public static final SVNArgument NO_IGNORE = createUnaryArgument(new String[] { "--no-ignore" });
050:            public static final SVNArgument MESSAGE = createStringArgument(new String[] {
051:                    "--message", "-m" });
052:            public static final SVNArgument REVISION = createStringArgument(new String[] {
053:                    "--revision", "-r" });
054:            public static final SVNArgument OLD = createStringArgument(new String[] { "--old" });
055:            public static final SVNArgument NEW = createStringArgument(new String[] { "--new" });
056:            public static final SVNArgument NO_AUTH_CACHE = createUnaryArgument(new String[] { "--no-auth-cache" });
057:            public static final SVNArgument FORCE = createUnaryArgument(new String[] { "--force" });
058:            public static final SVNArgument FORCE_LOG = createUnaryArgument(new String[] { "--force-log" });
059:            public static final SVNArgument FILE = createStringArgument(new String[] { "-F" });
060:            public static final SVNArgument EDITOR_CMD = createStringArgument(new String[] { "--editor-cmd" });
061:            public static final SVNArgument STRICT = createUnaryArgument(new String[] { "--strict" });
062:            public static final SVNArgument STOP_ON_COPY = createUnaryArgument(new String[] { "--stop-on-copy" });
063:            public static final SVNArgument NO_UNLOCK = createUnaryArgument(new String[] { "--no-unlock" });
064:            public static final SVNArgument RELOCATE = createUnaryArgument(new String[] { "--relocate" });
065:            public static final SVNArgument EOL_STYLE = createStringArgument(new String[] { "--native-eol" });
066:            public static final SVNArgument DRY_RUN = createUnaryArgument(new String[] { "--dry-run" });
067:            public static final SVNArgument INCREMENTAL = createUnaryArgument(new String[] { "--incremental" });
068:            public static final SVNArgument XML = createUnaryArgument(new String[] { "--xml" });
069:            public static final SVNArgument LIMIT = createStringArgument(new String[] { "--limit" });
070:            public static final SVNArgument NON_INTERACTIVE = createUnaryArgument(new String[] { "--non-interactive" });
071:            public static final SVNArgument CHANGE = createStringArgument(new String[] {
072:                    "--change", "-c" });
073:            public static final SVNArgument SUMMARIZE = createUnaryArgument(new String[] { "--summarize" });
074:
075:            public static final SVNArgument EXTENSIONS = createUnaryArgument(new String[] {
076:                    "-x", "--extensions" });
077:            public static final SVNArgument IGNORE_WS_CHANGE = createUnaryArgument(new String[] {
078:                    "-b", "--ignore-space-change" });
079:            public static final SVNArgument IGNORE_ALL_WS = createUnaryArgument(new String[] {
080:                    "-w", "--ignore-all-space" });
081:            public static final SVNArgument IGNORE_EOL_STYLE = createUnaryArgument(new String[] { "--ignore-eol-style" });
082:
083:            public static final SVNArgument FS_TYPE = createStringArgument(new String[] { "--fs-type" });
084:            public static final SVNArgument PRE_14_COMPATIBLE = createUnaryArgument(new String[] { "--pre-1.4-compatible" });
085:            public static final SVNArgument BDB_TXN_NOSYNC = createUnaryArgument(new String[] { "--bdb-txn-nosync" });
086:            public static final SVNArgument BDB_LOG_KEEP = createUnaryArgument(new String[] { "--bdb-log-keep" });
087:            public static final SVNArgument DELTAS = createUnaryArgument(new String[] { "--deltas" });
088:            public static final SVNArgument IGNORE_UUID = createUnaryArgument(new String[] { "--ignore-uuid" });
089:            public static final SVNArgument FORCE_UUID = createUnaryArgument(new String[] { "--force-uuid" });
090:            public static final SVNArgument USE_PRECOMMIT_HOOK = createUnaryArgument(new String[] { "--use-pre-commit-hook" });
091:            public static final SVNArgument USE_POSTCOMMIT_HOOK = createUnaryArgument(new String[] { "--use-post-commit-hook" });
092:            public static final SVNArgument PARENT_DIR = createStringArgument(new String[] { "--parent-dir" });
093:
094:            public static final SVNArgument TRANSACTION = createStringArgument(new String[] {
095:                    "--transaction", "-t" });
096:            public static final SVNArgument COPY_INFO = createUnaryArgument(new String[] { "--copy-info" });
097:            public static final SVNArgument SHOW_IDS = createUnaryArgument(new String[] { "--show-ids" });
098:            public static final SVNArgument FULL_PATHS = createUnaryArgument(new String[] { "--full-paths" });
099:
100:            public static SVNArgument findArgument(String name,
101:                    Set validArguments) {
102:                for (Iterator arguments = validArguments.iterator(); arguments
103:                        .hasNext();) {
104:                    SVNArgument argument = (SVNArgument) arguments.next();
105:                    for (Iterator names = argument.names(); names.hasNext();) {
106:                        String argumentName = (String) names.next();
107:                        if (argumentName.equals(name)) {
108:                            return argument;
109:                        }
110:                    }
111:                }
112:                return null;
113:            }
114:
115:            private static SVNArgument createStringArgument(String[] names) {
116:                return new SVNStringArgument(names);
117:            }
118:
119:            static SVNArgument createUnaryArgument(String[] names) {
120:                return new SVNUnaryArgument(names);
121:            }
122:
123:            private ArrayList myNames;
124:
125:            private SVNArgument(String[] names) {
126:                myNames = new ArrayList();
127:                for (int i = 0; i < names.length; i++) {
128:                    myNames.add(names[i]);
129:                }
130:            }
131:
132:            public Iterator names() {
133:                return myNames.iterator();
134:            }
135:
136:            public abstract boolean hasValue();
137:
138:            public abstract Object parseValue(String value) throws SVNException;
139:
140:            private static class SVNUnaryArgument extends SVNArgument {
141:                protected SVNUnaryArgument(String[] names) {
142:                    super (names);
143:                }
144:
145:                public boolean hasValue() {
146:                    return false;
147:                }
148:
149:                public Object parseValue(String value) throws SVNException {
150:                    return null;
151:                }
152:            }
153:
154:            private static class SVNStringArgument extends SVNArgument {
155:                protected SVNStringArgument(String[] names) {
156:                    super (names);
157:                }
158:
159:                public boolean hasValue() {
160:                    return true;
161:                }
162:
163:                public Object parseValue(String value) throws SVNException {
164:                    return value;
165:                }
166:            }
167:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.