Re: Getting the folders List from WebDav url

2005-01-18 Thread Julian Reschke
IndianAtTech wrote:
FYI,
Here is my query
   String searchQuery = ?xml version=\1.0\?;
  searchQuery = searchQuery + D:searchrequest xmlns:D = \DAV:\;
  searchQuery = searchQuery + D:sql;
  searchQuery = searchQuery + SELECT \DAV:displayname\ ;
  searchQuery = searchQuery + FROM scope('deep traversal of \/users/ +
  userDetails + \') ;
  searchQuery = searchQuery + WHERE \DAV:ishidden\ = false ;
  searchQuery = searchQuery + AND \DAV:isfolder\ = true ;
  searchQuery = searchQuery + /D:sql;
  searchQuery = searchQuery + /D:searchrequest;
That's not DASL, that is something non-standard that Microsoft has 
invented. I would be surprised if it works with non-Microsoft-servers.

Best regards, Julian
--
green/bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Getting the folders List from WebDav url

2005-01-18 Thread IndianAtTech
Oh, I See.

Actually I am working on Microsoft server related project only. BTW,
what is the standard DASL query, if I need to get the results??

Thanks
Sudhakar


On Tue, 18 Jan 2005 09:26:55 +0100, Julian Reschke
[EMAIL PROTECTED] wrote:
 IndianAtTech wrote:
  FYI,
  Here is my query
 
 String searchQuery = ?xml version=\1.0\?;
searchQuery = searchQuery + D:searchrequest xmlns:D = \DAV:\;
searchQuery = searchQuery + D:sql;
searchQuery = searchQuery + SELECT \DAV:displayname\ ;
searchQuery = searchQuery + FROM scope('deep traversal of \/users/ 
  +
userDetails + \') ;
searchQuery = searchQuery + WHERE \DAV:ishidden\ = false ;
searchQuery = searchQuery + AND \DAV:isfolder\ = true ;
searchQuery = searchQuery + /D:sql;
searchQuery = searchQuery + /D:searchrequest;
 
 That's not DASL, that is something non-standard that Microsoft has
 invented. I would be surprised if it works with non-Microsoft-servers.
 
 Best regards, Julian
 
 --
 green/bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting the folders List from WebDav url

2005-01-18 Thread Julian Reschke
IndianAtTech wrote:
Oh, I See.
Actually I am working on Microsoft server related project only. BTW,
what is the standard DASL query, if I need to get the results??
Thanks
Sudhakar
Should be something like:
d:searchrequest xmlns:d=DAV:
  d:basicsearch
d:select
  d:propd:displayname//d:prop
/d:select
d:from
  d:scope
d:href/users//d:href
d:depthinfinity/d:depth
  /d:scope
/d:from
d:where
  d:is-collection/
/d:where
  /d:basicsearch
/d:searchrequest
Note that the check for DAV:ishidden=false in general will not do what 
you want, because it's a MS-proprietary property (which shouldn't use 
the DAV: namespace...) and thus won't exist on most other servers.

Best regards, Julian
--
green/bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Getting the folders List from WebDav url

2005-01-17 Thread IndianAtTech
BTW,

what is the performance of this procedure??


  FileFilter filter=new FileFilter(){
/**
 * accept
 *
 * @param pathname File
 * @return boolean
 */
public boolean accept(File file) {
  return file.isDirectory();
}
  };

  java.io.File folders[] = webFile.listFiles(filter);

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting the folders List from WebDav url

2005-01-17 Thread James Mason
You might be able to do this with a DASL search, but I don't know of any
way to limit a PROPFIND like that.

-James

On Mon, 2005-01-17 at 14:56 +0530, IndianAtTech wrote:
 Hello Friends,
 
 In oder to get the folders list, I am working something like below
 
   java.io.File folders[] = webFile.listFiles();
 
   for (int i = 0; i  folders.length; i++) {
 // process all objects present in this folder
 System.err.println(Sub URL:+folders[i]);
 
   }
 
 
 
 But the problem is I am getting all files and folders list from the
 web resouce. So I need to check the resource using
 folders[i].isDirectory() in order to get the folders list , hence my
 application gives poor performance (each folder contains  5000 -
 50,000 files -approx)
 
 So could any body tell me, if there is a method where I can get the
 folders list directly
 
 In otherwords, I am looking at methods as listed below 
 
 webFile.listAll() - if user wants all files and directories
 webFile.listFiles() - get only files
 webFile.listDirectories() - Get only directories.
 
 Is it possible with current slide API??
 
 
 Thanks
 Sudhakar.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting the folders List from WebDav url

2005-01-17 Thread IndianAtTech
Thanks James,

I got the results through DASL search query. thanks for your idea


Regards
Sudhakar


On Mon, 17 Jan 2005 20:34:42 -0800, James Mason [EMAIL PROTECTED] wrote:
 You might be able to do this with a DASL search, but I don't know of any
 way to limit a PROPFIND like that.
 
 -James
 
 On Mon, 2005-01-17 at 14:56 +0530, IndianAtTech wrote:
  Hello Friends,
 
  In oder to get the folders list, I am working something like below
 
java.io.File folders[] = webFile.listFiles();
 
for (int i = 0; i  folders.length; i++) {
  // process all objects present in this folder
  System.err.println(Sub URL:+folders[i]);
 
}
 
 
 
  But the problem is I am getting all files and folders list from the
  web resouce. So I need to check the resource using
  folders[i].isDirectory() in order to get the folders list , hence my
  application gives poor performance (each folder contains  5000 -
  50,000 files -approx)
 
  So could any body tell me, if there is a method where I can get the
  folders list directly
 
  In otherwords, I am looking at methods as listed below
 
  webFile.listAll() - if user wants all files and directories
  webFile.listFiles() - get only files
  webFile.listDirectories() - Get only directories.
 
  Is it possible with current slide API??
 
 
  Thanks
  Sudhakar.
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting the folders List from WebDav url

2005-01-17 Thread IndianAtTech
FYI,
Here is my query

   String searchQuery = ?xml version=\1.0\?;
  searchQuery = searchQuery + D:searchrequest xmlns:D = \DAV:\;
  searchQuery = searchQuery + D:sql;
  searchQuery = searchQuery + SELECT \DAV:displayname\ ;
  searchQuery = searchQuery + FROM scope('deep traversal of \/users/ +
  userDetails + \') ;
  searchQuery = searchQuery + WHERE \DAV:ishidden\ = false ;
  searchQuery = searchQuery + AND \DAV:isfolder\ = true ;
  searchQuery = searchQuery + /D:sql;
  searchQuery = searchQuery + /D:searchrequest;


On Tue, 18 Jan 2005 10:15:37 +0530, IndianAtTech [EMAIL PROTECTED] wrote:
 Thanks James,
 
 I got the results through DASL search query. thanks for your idea
 
 Regards
 Sudhakar
 
 
 On Mon, 17 Jan 2005 20:34:42 -0800, James Mason [EMAIL PROTECTED] wrote:
  You might be able to do this with a DASL search, but I don't know of any
  way to limit a PROPFIND like that.
 
  -James
 
  On Mon, 2005-01-17 at 14:56 +0530, IndianAtTech wrote:
   Hello Friends,
  
   In oder to get the folders list, I am working something like below
  
 java.io.File folders[] = webFile.listFiles();
  
 for (int i = 0; i  folders.length; i++) {
   // process all objects present in this folder
   System.err.println(Sub URL:+folders[i]);
  
 }
  
  
  
   But the problem is I am getting all files and folders list from the
   web resouce. So I need to check the resource using
   folders[i].isDirectory() in order to get the folders list , hence my
   application gives poor performance (each folder contains  5000 -
   50,000 files -approx)
  
   So could any body tell me, if there is a method where I can get the
   folders list directly
  
   In otherwords, I am looking at methods as listed below
  
   webFile.listAll() - if user wants all files and directories
   webFile.listFiles() - get only files
   webFile.listDirectories() - Get only directories.
  
   Is it possible with current slide API??
  
  
   Thanks
   Sudhakar.
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]