Source Code Cross Referenced for FSPathChange.java in  » Source-Control » tmatesoft-SVN » org » tmatesoft » svn » core » internal » io » fs » 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.core.internal.io.fs 
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:        package org.tmatesoft.svn.core.internal.io.fs;
013:
014:        import org.tmatesoft.svn.core.SVNErrorCode;
015:        import org.tmatesoft.svn.core.SVNErrorMessage;
016:        import org.tmatesoft.svn.core.SVNException;
017:        import org.tmatesoft.svn.core.SVNLogEntryPath;
018:        import org.tmatesoft.svn.core.internal.wc.SVNErrorManager;
019:
020:        /**
021:         * @version 1.1.1
022:         * @author  TMate Software Ltd.
023:         */
024:        public class FSPathChange extends SVNLogEntryPath {
025:            private static final String FLAG_TRUE = "true";
026:            private static final String FLAG_FALSE = "false";
027:
028:            private String myPath;
029:            private FSID myRevNodeId;
030:            private FSPathChangeKind myChangeKind;
031:            boolean isTextModified;
032:            boolean arePropertiesModified;
033:
034:            public FSPathChange(String path, FSID id, FSPathChangeKind kind,
035:                    boolean textModified, boolean propsModified,
036:                    String copyfromPath, long copyfromRevision) {
037:                super (path, FSPathChangeKind.getType(kind), copyfromPath,
038:                        copyfromRevision);
039:                myPath = path;
040:                myRevNodeId = id;
041:                myChangeKind = kind;
042:                isTextModified = textModified;
043:                arePropertiesModified = propsModified;
044:            }
045:
046:            public String getPath() {
047:                return myPath;
048:            }
049:
050:            public boolean arePropertiesModified() {
051:                return arePropertiesModified;
052:            }
053:
054:            public void setPropertiesModified(boolean propertiesModified) {
055:                arePropertiesModified = propertiesModified;
056:            }
057:
058:            public boolean isTextModified() {
059:                return isTextModified;
060:            }
061:
062:            public void setTextModified(boolean textModified) {
063:                isTextModified = textModified;
064:            }
065:
066:            public FSPathChangeKind getChangeKind() {
067:                return myChangeKind;
068:            }
069:
070:            public void setChangeKind(FSPathChangeKind changeKind) {
071:                myChangeKind = changeKind;
072:                super .setChangeType(FSPathChangeKind.getType(changeKind));
073:            }
074:
075:            public FSID getRevNodeId() {
076:                return myRevNodeId;
077:            }
078:
079:            public void setRevNodeId(FSID revNodeId) {
080:                myRevNodeId = revNodeId;
081:            }
082:
083:            public void setCopyRevision(long revision) {
084:                super .setCopyRevision(revision);
085:            }
086:
087:            public void setCopyPath(String path) {
088:                super .setCopyPath(path);
089:            }
090:
091:            public static FSPathChange fromString(String changeLine,
092:                    String copyfromLine) throws SVNException {
093:                int delimiterInd = changeLine.indexOf(' ');
094:
095:                //String[] piecesOfChangeLine = changeLine.split(" ", 5);
096:                if (delimiterInd == -1) {
097:                    SVNErrorMessage err = SVNErrorMessage.create(
098:                            SVNErrorCode.FS_CORRUPT,
099:                            "Invalid changes line in rev-file");
100:                    SVNErrorManager.error(err);
101:                }
102:
103:                String id = changeLine.substring(0, delimiterInd);
104:                FSID nodeRevID = FSID.fromString(id);
105:
106:                changeLine = changeLine.substring(delimiterInd + 1);
107:                delimiterInd = changeLine.indexOf(' ');
108:                if (delimiterInd == -1) {
109:                    SVNErrorMessage err = SVNErrorMessage.create(
110:                            SVNErrorCode.FS_CORRUPT,
111:                            "Invalid changes line in rev-file");
112:                    SVNErrorManager.error(err);
113:                }
114:                String changesKindStr = changeLine.substring(0, delimiterInd);
115:
116:                FSPathChangeKind changesKind = FSPathChangeKind
117:                        .fromString(changesKindStr);
118:                if (changesKind == null) {
119:                    SVNErrorMessage err = SVNErrorMessage.create(
120:                            SVNErrorCode.FS_CORRUPT,
121:                            "Invalid change kind in rev file");
122:                    SVNErrorManager.error(err);
123:                }
124:
125:                changeLine = changeLine.substring(delimiterInd + 1);
126:                delimiterInd = changeLine.indexOf(' ');
127:                if (delimiterInd == -1) {
128:                    SVNErrorMessage err = SVNErrorMessage.create(
129:                            SVNErrorCode.FS_CORRUPT,
130:                            "Invalid changes line in rev-file");
131:                    SVNErrorManager.error(err);
132:                }
133:                String textModeStr = changeLine.substring(0, delimiterInd);
134:
135:                boolean textModeBool = false;
136:                if (FSPathChange.FLAG_TRUE.equals(textModeStr)) {
137:                    textModeBool = true;
138:                } else if (FSPathChange.FLAG_FALSE.equals(textModeStr)) {
139:                    textModeBool = false;
140:                } else {
141:                    SVNErrorMessage err = SVNErrorMessage.create(
142:                            SVNErrorCode.FS_CORRUPT,
143:                            "Invalid text-mod flag in rev-file");
144:                    SVNErrorManager.error(err);
145:                }
146:
147:                changeLine = changeLine.substring(delimiterInd + 1);
148:                delimiterInd = changeLine.indexOf(' ');
149:                if (delimiterInd == -1) {
150:                    SVNErrorMessage err = SVNErrorMessage.create(
151:                            SVNErrorCode.FS_CORRUPT,
152:                            "Invalid changes line in rev-file");
153:                    SVNErrorManager.error(err);
154:                }
155:                String propModeStr = changeLine.substring(0, delimiterInd);
156:
157:                boolean propModeBool = false;
158:                if (FSPathChange.FLAG_TRUE.equals(propModeStr)) {
159:                    propModeBool = true;
160:                } else if (FSPathChange.FLAG_FALSE.equals(propModeStr)) {
161:                    propModeBool = false;
162:                } else {
163:                    SVNErrorMessage err = SVNErrorMessage.create(
164:                            SVNErrorCode.FS_CORRUPT,
165:                            "Invalid prop-mod flag in rev-file");
166:                    SVNErrorManager.error(err);
167:                }
168:
169:                String pathStr = changeLine.substring(delimiterInd + 1);
170:
171:                String copyfromPath = null;
172:                long copyfromRevision = FSRepository.SVN_INVALID_REVNUM;
173:
174:                if (copyfromLine != null && copyfromLine.length() != 0) {
175:                    delimiterInd = copyfromLine.indexOf(' ');
176:
177:                    if (delimiterInd == -1) {
178:                        SVNErrorMessage err = SVNErrorMessage.create(
179:                                SVNErrorCode.FS_CORRUPT,
180:                                "Invalid changes line in rev-file");
181:                        SVNErrorManager.error(err);
182:                    }
183:
184:                    copyfromRevision = Long.parseLong(copyfromLine.substring(0,
185:                            delimiterInd));
186:                    copyfromPath = copyfromLine.substring(delimiterInd + 1);
187:                }
188:
189:                return new FSPathChange(pathStr, nodeRevID, changesKind,
190:                        textModeBool, propModeBool, copyfromPath,
191:                        copyfromRevision);
192:            }
193:
194:        }
w__w__w.__j___a_v___a___2_s__.com_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.