org.netbeans.modules.queries/1 1.28

org.netbeans.api.queries
Class CollocationQuery

java.lang.Object
  extended by org.netbeans.api.queries.CollocationQuery

public final class CollocationQuery
extends Object

Find out whether some files logically belong in one directory tree, for example as part of a VCS checkout.

See Also:
CollocationQueryImplementation2

Method Summary
static boolean areCollocated(File file1, File file2)
          Deprecated. Use areCollocated(java.net.URI, java.net.URI) instead.
static boolean areCollocated(URI file1, URI file2)
          Check whether two files are logically part of one directory tree.
static File findRoot(File file)
          Deprecated. Use findRoot(java.net.URI) instead.
static URI findRoot(URI file)
          Find a root of a logical tree containing this file, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

areCollocated

@Deprecated
public static boolean areCollocated(File file1,
                                               File file2)
Deprecated. Use areCollocated(java.net.URI, java.net.URI) instead.

Check whether two files are logically part of one directory tree. For example, if both files are stored in CVS, with the same server (CVSROOT) they might be considered collocated. If nothing is known about them, return false.

Parameters:
file1 - one file
file2 - another file
Returns:
true if they are probably part of one logical tree

areCollocated

public static boolean areCollocated(URI file1,
                                    URI file2)
Check whether two files are logically part of one directory tree. For example, if both files are stored in CVS, with the same server (CVSROOT) they might be considered collocated. If nothing is known about them, return false.

Parameters:
file1 - one file
file2 - another file
Returns:
true if they are probably part of one logical tree
Since:
1.27

findRoot

@Deprecated
public static File findRoot(File file)
Deprecated. Use findRoot(java.net.URI) instead.

Find a root of a logical tree containing this file, if any.

Parameters:
file - a file on disk
Returns:
an ancestor directory which is the root of a logical tree, if any (else null)

findRoot

public static URI findRoot(URI file)
Find a root of a logical tree containing this file, if any.

Parameters:
file - a file on disk
Returns:
an ancestor directory which is the root of a logical tree, if any (else null)
Since:
1.27

org.netbeans.modules.queries/1 1.28

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.