Source Code Cross Referenced for SVNFileRevision.java in  » Source-Control » tmatesoft-SVN » org » tmatesoft » svn » core » io » 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.io 
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.core.io;
014:
015:        import java.util.Map;
016:
017:        /**
018:         * The <b>SVNFileRevision</b> class represents information on what path a file 
019:         * is located at (in a repository) in a particular revision, contains file properties 
020:         * and revision properties for that revision.
021:         * 
022:         * <p>
023:         * When getting a range of file revisions (in particular, annotating), 
024:         * calling an <b>SVNRepository</b>'s 
025:         * {@link SVNRepository#getFileRevisions(String, long, long, ISVNFileRevisionHandler) getFileRevision()}
026:         * <b>SVNFileRevision</b> objects are passed to an <b>ISVNFileRevisionHandler</b>'s {@link ISVNFileRevisionHandler#openRevision(SVNFileRevision) openRevision()}
027:         * method.  
028:         * 
029:         * @version 1.1.1
030:         * @author  TMate Software Ltd.
031:         * @see     SVNRepository
032:         * @see		ISVNFileRevisionHandler
033:         */
034:        public class SVNFileRevision implements  Comparable {
035:
036:            private String myPath;
037:            private long myRevision;
038:
039:            /**
040:             * Constructs an instance of <b>SVNFileRevision</b>.
041:             *  
042:             * @param path				a file path relative to a repository location
043:             * 							(a URL used to create an 
044:             * 							<b>SVNRepository</b> to access a repository)
045:             * @param revision			a revision of the file
046:             * @param properties		revision properties
047:             * @param propertiesDelta	file properties for the <code>revision</code>
048:             */
049:            public SVNFileRevision(String path, long revision, Map properties,
050:                    Map propertiesDelta) {
051:                myPath = path;
052:                myRevision = revision;
053:                myProperties = properties;
054:                myPropertiesDelta = propertiesDelta;
055:            }
056:
057:            /**
058:             * Gets the file path (relative to a repository root URL).
059:             *  
060:             * @return	the path of the file
061:             * @see     SVNRepository
062:             */
063:            public String getPath() {
064:                return myPath;
065:            }
066:
067:            /**
068:             * Returns revision properties. Use {@link org.tmatesoft.svn.core.SVNRevisionProperty}
069:             * constants (they are revision property names) to retrieve values of the
070:             * corresponding properties.
071:             * 
072:             * @deprecated use {@link #getRevisionProperties() } instead 
073:             * @return	a map which keys are revision property names and values
074:             * 			are their values (both are strings)
075:             */
076:            public Map getProperties() {
077:                return myProperties;
078:            }
079:
080:            /**
081:             * Returns revision properties. Use {@link org.tmatesoft.svn.core.SVNRevisionProperty}
082:             * constants (they are revision property names) to retrieve values of the
083:             * corresponding properties.
084:             * 
085:             * @return  a map which keys are revision property names and values
086:             *          are their values (both are strings)
087:             */
088:            public Map getRevisionProperties() {
089:                return myProperties;
090:            }
091:
092:            /**
093:             * Returns file properties for this file (for this revision).
094:             * Properties delta for a revision is the same as full properties for
095:             * that revision. 
096:             * 
097:             * @return a map where keys are file property names and values are the
098:             *         property values 
099:             */
100:            public Map getPropertiesDelta() {
101:                return myPropertiesDelta;
102:            }
103:
104:            /**
105:             * Gets the revision of the file.
106:             *  
107:             * @return	the revision number of the file
108:             */
109:            public long getRevision() {
110:                return myRevision;
111:            }
112:
113:            /**
114:             * Compares this object with another one. 
115:             * 
116:             * @param  o  an object to compare with
117:             * @return    <ul>
118:             *            <li>1 - if <code>o</code> is either <span class="javakeyword">null</span>,
119:             *            or is not an instance of <b>SVNFileRevision</b>, or the revision value of
120:             *            this object is bigger than the one of <code>o</code>;
121:             *            </li>
122:             *            <li>-1 -  if the revision value of this object is smaller than the one of 
123:             *            <code>o</code>;
124:             *            </li>
125:             *            <li>0 - if and only if the revision values of this object and <code>o</code> 
126:             *            are the same (equal)
127:             *            </li>
128:             *            </ul>
129:             */
130:            public int compareTo(Object o) {
131:                if (o == null || o.getClass() != SVNFileRevision.class) {
132:                    return 1;
133:                }
134:                SVNFileRevision rev = (SVNFileRevision) o;
135:                long number = rev.getRevision();
136:                return myRevision == number ? 0 : myRevision > number ? 1 : -1;
137:            }
138:
139:            private Map myProperties;
140:            private Map myPropertiesDelta;
141:
142:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.