commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bur...@apache.org
Subject cvs commit: jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/tools RFC3066LocaleParser.java
Date Mon, 18 Oct 2004 01:26:37 GMT
burton      2004/10/17 18:26:37

  Modified:    feedparser/src/java/org/apache/commons/feedparser
                        FeedParserState.java
               feedparser/src/java/org/apache/commons/feedparser/tools
                        RFC3066LocaleParser.java
  Log:
  New version of FeedParser that supports locale parsing... new version of FeedTask that supports
full virtual feed support.  Changes to the ArticleRecordSearchProvider to support virtual
feeds...
  
  Revision  Changes    Path
  1.5       +13 -1     jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/FeedParserState.java
  
  Index: FeedParserState.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/FeedParserState.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FeedParserState.java	17 Oct 2004 23:43:24 -0000	1.4
  +++ FeedParserState.java	18 Oct 2004 01:26:37 -0000	1.5
  @@ -16,6 +16,8 @@
   
   package org.apache.commons.feedparser;
   
  +import java.util.*;
  +
   import org.jdom.*;
   
   /**
  @@ -54,5 +56,15 @@
   
       }
   
  +    /**
  +     * Based on the current locale event model we return the current language.
  +     * By default EN is returned.
  +     *
  +     * @author <a href="mailto:burton@peerfear.org">Kevin A. Burton</a>
  +     */
  +    public Locale getCurrentLocale() {
  +        return null;
  +    }
  +    
   }
   
  
  
  
  1.2       +5 -1      jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/tools/RFC3066LocaleParser.java
  
  Index: RFC3066LocaleParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/tools/RFC3066LocaleParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RFC3066LocaleParser.java	17 Oct 2004 23:05:15 -0000	1.1
  +++ RFC3066LocaleParser.java	18 Oct 2004 01:26:37 -0000	1.2
  @@ -32,7 +32,7 @@
               current = current.toLowerCase();
   
               if ( current.length() == 2 ) {
  -                return (Locale)locales.get( current );
  +                return getLocale( current );
               }
               
           }
  @@ -41,6 +41,10 @@
   
       }
   
  +    public static Locale getLocale( String language ) {
  +        return (Locale)locales.get( language );
  +    }
  +    
       private static void initLocale( String name ) {
           locales.put( name, new Locale( name ) );
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message