2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.jetbrains
.idea
.svn
.dialogs
;
18 import org
.jetbrains
.idea
.svn
.WorkingCopyFormat
;
19 import org
.tmatesoft
.svn
.core
.SVNURL
;
20 import com
.intellij
.openapi
.vfs
.VirtualFile
;
22 public class WCInfo
implements WCPaths
{
23 private final String myPath
;
24 private final SVNURL myUrl
;
25 private final WorkingCopyFormat myFormat
;
26 private final String myRepositoryRoot
;
27 private final boolean myIsWcRoot
;
29 public WCInfo(final String path
, final SVNURL url
, final WorkingCopyFormat format
, final String repositoryRoot
, final boolean isWcRoot
) {
33 myRepositoryRoot
= repositoryRoot
;
34 myIsWcRoot
= isWcRoot
;
37 public String
getPath() {
41 public VirtualFile
getVcsRoot() {
45 public SVNURL
getUrl() {
49 public String
getRootUrl() {
50 return myUrl
.toString();
53 public String
getRepoUrl() {
54 return myRepositoryRoot
;
57 public WorkingCopyFormat
getFormat() {
61 public String
getRepositoryRoot() {
62 return myRepositoryRoot
;
65 public boolean isIsWcRoot() {
70 public boolean equals(final Object o
) {
71 if (this == o
) return true;
72 if (!(o
instanceof WCInfo
)) return false;
74 final WCInfo wcInfo
= (WCInfo
)o
;
76 if (myPath
!= null ?
!myPath
.equals(wcInfo
.myPath
) : wcInfo
.myPath
!= null) return false;
82 public int hashCode() {
83 return (myPath
!= null ? myPath
.hashCode() : 0);