Additional FileUtils Methods for Commons-io

2007-03-07 Thread ole ersoy

Hi,

I created a few methods that I think might fit well with FileUtils.

   public static ListFile create(ArrayListString paths)
   {
   IteratorString pathIterator = paths.iterator();
   ListFile files  = new ArrayListFile();
   while(pathIterator.hasNext())
   {
   files.add(new File(pathIterator.next()));
   }
   return files;
   }

   public static void create(ListFile directories)
   {
   IteratorFile directoryIterator = directories.iterator();

   while(directoryIterator.hasNext())
   {
   File directory = directoryIterator.next();
   directory.mkdirs();
   }
   }

   public static void delete(ListFile directories) throws IOException
   {
   IteratorFile directoriesIterator = directories.iterator();

   while(directoriesIterator.hasNext())
   {
   File file = directoriesIterator.next();
   FileUtils.deleteDirectory( file );
   }
   }

Thoughts?

Cheers,
- Ole


Re: svn commit: r507611 - in /jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript: validateRequired.js validateUtilities.js

2007-02-14 Thread Ole Ersoy
Hi,

The below looks interesting.  Does Common's have
javascript stuff?

Incidentally I donated a Javascript Framework written
on top of dojo to myfaces a while back, in case anyone
is interested.  It has the ability to hook javascript
validators to components.

http://people.apache.org/~matzew/dojo.presentation.zip

http://www.mail-archive.com/dev@myfaces.apache.org/msg18916.html

I tried to follow the JSF JSR, but code it in
javascript so that it runs on the client.

Cheers,
- Ole




--- [EMAIL PROTECTED] wrote:

 Author: niallp
 Date: Wed Feb 14 08:40:49 2007
 New Revision: 507611
 
 URL:
 http://svn.apache.org/viewvc?view=revrev=507611
 Log:
 VALIDATOR-223 - Move the trim() function to
 validateUtilities.js - thanks to Hasan Turksoy
 
 Modified:


jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js


jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
 
 Modified:

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
 URL:

http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js?view=diffrev=507611r1=507610r2=507611

==
 ---

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
 (original)
 +++

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
 Wed Feb 14 08:40:49 2007
 @@ -110,8 +110,3 @@
  }
  return isValid;
  }
 -
 -// Trim whitespace from left and right sides of
 s.
 -function trim(s) {
 -return s.replace( /^\s*/,  ).replace(
 /\s*$/,  );
 -}
 
 Modified:

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
 URL:

http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js?view=diffrev=507611r1=507610r2=507611

==
 ---

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
 (original)
 +++

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
 Wed Feb 14 08:40:49 2007
 @@ -154,3 +154,8 @@
}
return true;
}
 +
 +// Trim whitespace from left and right sides of
 s.
 +function trim(s) {
 +return s.replace( /^\s*/,  ).replace(
 /\s*$/,  );
 +}
 
 
 

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



 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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



Re: svn commit: r507611 - in /jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript: validateRequired.js validateUtilities.js

2007-02-14 Thread Ole Ersoy
Cool - I'll look at the JIRAs in more detail.  It
would be great to have some developer use cases for
how to leverage common's validator with the
frameworks.

Cheers,
- Ole






--- Niall Pemberton [EMAIL PROTECTED] wrote:

 On 2/14/07, Ole Ersoy [EMAIL PROTECTED] wrote:
  Hi,
 
  The below looks interesting.  Does Common's have
  javascript stuff?
 
 It does - but its been implemented upside down
 which causes all
 sorts of issues - also The static javascript
 functions are in
 Commons Validator but rendering the dynamic part
 that uses those
 functions is in the frameworks that use it (e.g.
 Struts, Shale). I
 started work to resolve both the architecture and
 provide the dynamic
 rendering in Commons Validator a long time ago - but
 then never went
 back and finished/implemented it:
 
 http://issues.apache.org/jira/browse/VALIDATOR-106

http://www.niallp.pwp.blueyonder.co.uk/validatorjs.html
 
  Incidentally I donated a Javascript Framework
 written
  on top of dojo to myfaces a while back, in case
 anyone
  is interested.  It has the ability to hook
 javascript
  validators to components.
 
 

http://people.apache.org/~matzew/dojo.presentation.zip
 
 

http://www.mail-archive.com/dev@myfaces.apache.org/msg18916.html
 
  I tried to follow the JSF JSR, but code it in
  javascript so that it runs on the client.
 
 Cool - I'll try to take a look at some point (don't
 have much time at
 the moment). If you have stuff you think that would
 be good in Commons
 Validator - patches/code to Jira are most welcome
 :-)
 

http://jakarta.apache.org/commons/validator/issue-tracking.html
 
 Niall
 
 
  Cheers,
  - Ole
 
 
 
 
  --- [EMAIL PROTECTED] wrote:
 
   Author: niallp
   Date: Wed Feb 14 08:40:49 2007
   New Revision: 507611
  
   URL:
   http://svn.apache.org/viewvc?view=revrev=507611
   Log:
   VALIDATOR-223 - Move the trim() function to
   validateUtilities.js - thanks to Hasan Turksoy
  
   Modified:
  
  
 

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
  
  
 

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
  
   Modified:
  
 

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
   URL:
  
 

http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js?view=diffrev=507611r1=507610r2=507611
  
 

==
   ---
  
 

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
   (original)
   +++
  
 

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
   Wed Feb 14 08:40:49 2007
   @@ -110,8 +110,3 @@
}
return isValid;
}
   -
   -// Trim whitespace from left and right
 sides of
   s.
   -function trim(s) {
   -return s.replace( /^\s*/,  ).replace(
   /\s*$/,  );
   -}
  
   Modified:
  
 

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
   URL:
  
 

http://svn.apache.org/viewvc/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js?view=diffrev=507611r1=507610r2=507611
  
 

==
   ---
  
 

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
   (original)
   +++
  
 

jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
   Wed Feb 14 08:40:49 2007
   @@ -154,3 +154,8 @@
  }
  return true;
  }
   +
   +// Trim whitespace from left and right
 sides of
   s.
   +function trim(s) {
   +return s.replace( /^\s*/,  ).replace(
   /\s*$/,  );
   +}
  
 

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



 

Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.

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



Re: VFS and EMF Awareness

2007-01-02 Thread Ole Ersoy
OH - Sure - You just need to sign up for an Eclipse
Newsgroup Account.

http://www.eclipse.org/newsgroups/register.php

Cheers,
- Ole


--- Martin Cooper [EMAIL PROTECTED] wrote:

 On 1/1/07, Ole Ersoy [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I just got the VFS 1.0 announcement a little while
  back and did a cross post on the EMF mailing list,
  since EMF has similar capabilities.
 
  This was mainly for awareness and possible future
  collaboration opportunities.
 
  Here's the reply from Marcelo on the EMF team
  (Including a test link showing how some of the EMF
  stuff works):
 
 
 That link requires a login (and therefore
 registration). Could you provide
 more information here, please?
 
 --
 Martin Cooper
 
 

http://www.eclipse.org/newsportal/article.php?id=21615group=eclipse.tools.emf#21615
 
  Cheers,
  - Ole
 
 
 
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
 
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: VFS and EMF Awareness

2007-01-02 Thread Ole Ersoy
Ah - I get you.

I'm planning on doing that in more detail as well when
I get some time to play with VFS.

Here's the Javadoc page for EMF's URI object:

http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.emf.doc/references/javadoc/org/eclipse/emf/common/util/class-use/URI.html

It has a long description.

That would be on collaboration opportunity right
there...documentation.

I'll post back more once I have had a chance to
compare the two in more detail.

Cheers,
- Ole




--- Martin Cooper [EMAIL PROTECTED] wrote:

 On 1/2/07, Ole Ersoy [EMAIL PROTECTED] wrote:
 
  OH - Sure - You just need to sign up for an
 Eclipse
  Newsgroup Account.
 
 
 No, I mean please post information about the
 possible overlap between EMF
 and VFS. You can't expect everyone here to go
 register for an Eclipse
 account just for that.
 
 --
 Martin Cooper
 
 
 http://www.eclipse.org/newsgroups/register.php
 
  Cheers,
  - Ole
 
 
  --- Martin Cooper [EMAIL PROTECTED] wrote:
 
   On 1/1/07, Ole Ersoy [EMAIL PROTECTED]
 wrote:
   
Hi,
   
I just got the VFS 1.0 announcement a little
 while
back and did a cross post on the EMF mailing
 list,
since EMF has similar capabilities.
   
This was mainly for awareness and possible
 future
collaboration opportunities.
   
Here's the reply from Marcelo on the EMF team
(Including a test link showing how some of the
 EMF
stuff works):
  
  
   That link requires a login (and therefore
   registration). Could you provide
   more information here, please?
  
   --
   Martin Cooper
  
  
  
 
 

http://www.eclipse.org/newsportal/article.php?id=21615group=eclipse.tools.emf#21615
   
Cheers,
- Ole
   
   
   
   
   
   
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
   protection around
http://mail.yahoo.com
   
   
  
 

-
To unsubscribe, e-mail:
   [EMAIL PROTECTED]
For additional commands, e-mail:
   [EMAIL PROTECTED]
   
   
  
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
 
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: VFS and EMF Awareness

2007-01-02 Thread Ole Ersoy
Hey Mario,

Eclipse might be one area, but EMF is part of the
Eclipse Modeling Toolset, so it's a completely
separate API from what Eclipse Core uses (Although a
lot of other projects, like BIRT, use it).

EMF loads Model files used in code generation, etc. so
I'm guessing that was their initial goal for the API.

So if for instance VFS had a URI Facade like EMF does,
perhaps EMF could just switch to VFS, and VFS would
get documentation taken care of there (If it's not
already, I need to play with it more) while EMF gets a
richer URI API...

Just hypothesizing...

The guys on the EMF tools mailling list are super
friendly and helpful, and someone usually responds
within five minutes, so I'm sure they would be hear
from the VFS team.

If you did want to look at the source, here are the
CVS parameters:

Connection Type: pserver
host: dev.eclipse.org
Repository Path: /cvsroot/tools
User: anonymous

Then just scroll down to 

org.eclipse.emf

Cheers,
- Ole


--- Mario Ivankovits [EMAIL PROTECTED] wrote:

 Hi!
 

http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.emf.doc/references/javadoc/org/eclipse/emf/common/util/class-use/URI.html

 Hmmm ... for what I can see you can directly
 reference a file (even
 within an archive) but then there are some basic
 things missing:
 
 * list of children
 * rename/move operations
 * meta data handling
 etc
 
 Without looking at the source, maybe it could be
 possible to create a
 VFS backed URI implementation, though, from some
 previous discussions
 about using VFS in eclipse it turned out that they
 implemented a high
 performance native code local filesystem
 implementation. It might be a
 performance loss for eclipse if they use VFS without
 porting this native
 implementation to VFS first.
 
 Ciao,
 Mario
 
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



VFS and EMF Awareness

2007-01-01 Thread Ole Ersoy
Hi,

I just got the VFS 1.0 announcement a little while
back and did a cross post on the EMF mailing list,
since EMF has similar capabilities.

This was mainly for awareness and possible future
collaboration opportunities.

Here's the reply from Marcelo on the EMF team
(Including a test link showing how some of the EMF
stuff works):

http://www.eclipse.org/newsportal/article.php?id=21615group=eclipse.tools.emf#21615

Cheers,
- Ole





__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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