commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adri...@apache.org
Subject svn commit: r922338 [2/2] - in /commons/sandbox/convert: branches/ tags/ trunk/ trunk/src/ trunk/src/META-INF/ trunk/src/META-INF/services/ trunk/src/java/ trunk/src/java/org/ trunk/src/java/org/apache/ trunk/src/java/org/apache/commons/ trunk/src/java...
Date Fri, 12 Mar 2010 16:58:09 GMT
Added: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/DateTimeConverters.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/DateTimeConverters.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/DateTimeConverters.java (added)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/DateTimeConverters.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,463 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Locale;
+import java.util.TimeZone;
+
+/** Date/time Converter classes. */
+public class DateTimeConverters implements ConverterLoader {
+    /**
+     * Returns an initialized DateFormat object.
+     *
+     * @param dateFormat
+     *            optional format string
+     * @param tz
+     * @param locale
+     *            can be null if dateFormat is not null
+     * @return DateFormat object
+     */
+    public static DateFormat toDateFormat(String dateFormat, TimeZone tz, Locale locale) {
+        DateFormat df = null;
+        if (Util.isEmpty(dateFormat)) {
+            df = DateFormat.getDateInstance(DateFormat.SHORT, locale);
+        } else {
+            df = new SimpleDateFormat(dateFormat);
+        }
+        df.setTimeZone(tz);
+        return df;
+    }
+
+    /**
+     * Returns an initialized DateFormat object.
+     * @param dateTimeFormat optional format string
+     * @param tz
+     * @param locale can be null if dateTimeFormat is not null
+     * @return DateFormat object
+     */
+    public static DateFormat toDateTimeFormat(String dateTimeFormat, TimeZone tz, Locale locale) {
+        DateFormat df = null;
+        if (Util.isEmpty(dateTimeFormat)) {
+            df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM, locale);
+        } else {
+            df = new SimpleDateFormat(dateTimeFormat);
+        }
+        df.setTimeZone(tz);
+        return df;
+    }
+
+    /**
+     * Returns an initialized DateFormat object.
+     * @param timeFormat optional format string
+     * @param tz
+     * @param locale can be null if timeFormat is not null
+     * @return DateFormat object
+     */
+    public static DateFormat toTimeFormat(String timeFormat, TimeZone tz, Locale locale) {
+        DateFormat df = null;
+        if (Util.isEmpty(timeFormat)) {
+            df = DateFormat.getTimeInstance(DateFormat.MEDIUM, locale);
+        } else {
+            df = new SimpleDateFormat(timeFormat);
+        }
+        df.setTimeZone(tz);
+        return df;
+    }
+
+    public void loadConverters() {
+        Converters.loadContainedConverters(DateTimeConverters.class);
+    }
+
+    public static class CalendarToLong extends AbstractConverter<Calendar, Long> {
+        public CalendarToLong() {
+            super(Calendar.class, Long.class);
+        }
+
+        public Long convert(Calendar obj) throws ConversionException {
+            return obj.getTimeInMillis();
+        }
+    }
+
+    public static class CalendarToString extends AbstractConverter<Calendar, String> {
+        public CalendarToString() {
+            super(Calendar.class, String.class);
+        }
+
+        public String convert(Calendar obj) throws ConversionException {
+            return obj.toString();
+        }
+    }
+
+    public static class DateToLong extends AbstractConverter<Date, Long> {
+        public DateToLong() {
+            super(Date.class, Long.class);
+        }
+
+        public Long convert(Date obj) throws ConversionException {
+             return obj.getTime();
+        }
+    }
+
+    public static class DateToSqlDate extends AbstractConverter<Date, java.sql.Date> {
+        public DateToSqlDate() {
+            super(Date.class, java.sql.Date.class);
+        }
+
+        public java.sql.Date convert(Date obj) throws ConversionException {
+            return new java.sql.Date(obj.getTime());
+        }
+    }
+
+    public static class DateToString extends GenericLocalizedConverter<Date, String> {
+        public DateToString() {
+            super(Date.class, String.class);
+        }
+
+        @Override
+        public String convert(Date obj) throws ConversionException {
+            return obj.toString();
+        }
+
+        public String convert(Date obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            DateFormat df = toDateTimeFormat(formatString, timeZone, locale);
+            return df.format(obj);
+        }
+    }
+
+    public static class DateToTimestamp extends AbstractConverter<Date, java.sql.Timestamp> {
+        public DateToTimestamp() {
+            super(Date.class, java.sql.Timestamp.class);
+        }
+
+        public java.sql.Timestamp convert(Date obj) throws ConversionException {
+            return new java.sql.Timestamp(obj.getTime());
+        }
+    }
+
+    public static abstract class GenericLocalizedConverter<S, T> extends AbstractLocalizedConverter<S, T> {
+        protected GenericLocalizedConverter(Class<S> sourceClass, Class<T> targetClass) {
+            super(sourceClass, targetClass);
+        }
+
+        public T convert(S obj) throws ConversionException {
+            return convert(obj, Locale.getDefault(), TimeZone.getDefault(), null);
+        }
+
+        public T convert(S obj, Locale locale, TimeZone timeZone) throws ConversionException {
+            return convert(obj, locale, timeZone, null);
+        }
+    }
+
+    public static class LongToCalendar extends AbstractLocalizedConverter<Long, Calendar> {
+        public LongToCalendar() {
+            super(Long.class, Calendar.class);
+        }
+
+        public Calendar convert(Long obj) throws ConversionException {
+            Calendar cal = Calendar.getInstance();
+            cal.setTimeInMillis(obj);
+            return cal;
+        }
+
+        public Calendar convert(Long obj, Locale locale, TimeZone timeZone) throws ConversionException {
+            Calendar cal = Calendar.getInstance(timeZone, locale);
+            cal.setTimeInMillis(obj);
+            return cal;
+        }
+
+        public Calendar convert(Long obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            return convert(obj, Locale.getDefault(), TimeZone.getDefault());
+        }
+    }
+
+    public static class NumberToDate extends AbstractConverter<Number, Date> {
+        public NumberToDate() {
+            super(Number.class, Date.class);
+        }
+
+        public Date convert(Number obj) throws ConversionException {
+             return new Date(obj.longValue());
+        }
+    }
+
+    public static class NumberToSqlDate extends AbstractConverter<Number, java.sql.Date> {
+        public NumberToSqlDate() {
+            super(Number.class, java.sql.Date.class);
+        }
+
+        public java.sql.Date convert(Number obj) throws ConversionException {
+             return new java.sql.Date(obj.longValue());
+        }
+    }
+
+    public static class NumberToSqlTime extends AbstractConverter<Number, java.sql.Time> {
+        public NumberToSqlTime() {
+            super(Number.class, java.sql.Time.class);
+        }
+
+        public java.sql.Time convert(Number obj) throws ConversionException {
+             return new java.sql.Time(obj.longValue());
+        }
+    }
+
+    public static class NumberToTimestamp extends AbstractConverter<Number, java.sql.Timestamp> {
+        public NumberToTimestamp() {
+            super(Number.class, java.sql.Timestamp.class);
+        }
+
+        public java.sql.Timestamp convert(Number obj) throws ConversionException {
+             return new java.sql.Timestamp(obj.longValue());
+        }
+    }
+
+    public static class SqlDateToDate extends AbstractConverter<java.sql.Date, Date> {
+        public SqlDateToDate() {
+            super(java.sql.Date.class, Date.class);
+        }
+
+        public Date convert(java.sql.Date obj) throws ConversionException {
+            return new Date(obj.getTime());
+        }
+    }
+
+    public static class SqlDateToList extends GenericSingletonToList<java.sql.Date> {
+        public SqlDateToList() {
+            super(java.sql.Date.class);
+        }
+    }
+
+    public static class SqlDateToSet extends GenericSingletonToSet<java.sql.Date> {
+        public SqlDateToSet() {
+            super(java.sql.Date.class);
+        }
+    }
+
+    public static class SqlDateToString extends GenericLocalizedConverter<java.sql.Date, String> {
+        public SqlDateToString() {
+            super(java.sql.Date.class, String.class);
+        }
+
+        @Override
+        public String convert(java.sql.Date obj) throws ConversionException {
+            return obj.toString();
+        }
+
+        public String convert(java.sql.Date obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            DateFormat df = toDateFormat(formatString, timeZone, locale);
+            return df.format(obj);
+        }
+    }
+
+    public static class SqlDateToTime extends AbstractConverter<java.sql.Date, java.sql.Time> {
+        public SqlDateToTime() {
+            super(java.sql.Date.class, java.sql.Time.class);
+        }
+
+        public java.sql.Time convert(java.sql.Date obj) throws ConversionException {
+            throw new ConversionException("Conversion from Date to Time not supported");
+       }
+    }
+
+    public static class SqlDateToTimestamp extends AbstractConverter<java.sql.Date, java.sql.Timestamp> {
+        public SqlDateToTimestamp() {
+            super(java.sql.Date.class, java.sql.Timestamp.class);
+        }
+
+        public java.sql.Timestamp convert(java.sql.Date obj) throws ConversionException {
+            return new java.sql.Timestamp(obj.getTime());
+       }
+    }
+
+    public static class SqlTimeToList extends GenericSingletonToList<java.sql.Time> {
+        public SqlTimeToList() {
+            super(java.sql.Time.class);
+        }
+    }
+
+    public static class SqlTimeToSet extends GenericSingletonToSet<java.sql.Time> {
+        public SqlTimeToSet() {
+            super(java.sql.Time.class);
+        }
+    }
+
+    public static class SqlTimeToSqlDate extends AbstractConverter<java.sql.Time, java.sql.Date> {
+        public SqlTimeToSqlDate() {
+            super(java.sql.Time.class, java.sql.Date.class);
+        }
+
+        public java.sql.Date convert(java.sql.Time obj) throws ConversionException {
+            throw new ConversionException("Conversion from Time to Date not supported");
+        }
+    }
+
+    public static class SqlTimeToString extends GenericLocalizedConverter<java.sql.Time, String> {
+        public SqlTimeToString() {
+            super(java.sql.Time.class, String.class);
+        }
+
+        public String convert(java.sql.Time obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            DateFormat df = toTimeFormat(formatString, timeZone, locale);
+            return df.format(obj);
+        }
+    }
+
+    public static class StringToCalendar extends AbstractLocalizedConverter<String, Calendar> {
+        public StringToCalendar() {
+            super(String.class, Calendar.class);
+        }
+
+        public Calendar convert(String obj) throws ConversionException {
+            return convert(obj, Locale.getDefault(), TimeZone.getDefault(), null);
+        }
+
+        public Calendar convert(String obj, Locale locale, TimeZone timeZone) throws ConversionException {
+            return convert(obj, Locale.getDefault(), TimeZone.getDefault(), null);
+        }
+
+        public Calendar convert(String obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            DateFormat df = toDateTimeFormat(formatString, timeZone, locale);
+            try {
+                Date date = df.parse(obj);
+                Calendar cal = Calendar.getInstance(timeZone, locale);
+                cal.setTimeInMillis(date.getTime());
+                return cal;
+            } catch (ParseException e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class StringToDate extends GenericLocalizedConverter<String, Date> {
+        public StringToDate() {
+            super(String.class, Date.class);
+        }
+
+        public Date convert(String obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            DateFormat df = toDateTimeFormat(formatString, timeZone, locale);
+            try {
+                return df.parse(obj);
+            } catch (ParseException e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class StringToSqlDate extends GenericLocalizedConverter<String, java.sql.Date> {
+        public StringToSqlDate() {
+            super(String.class, java.sql.Date.class);
+        }
+
+        public java.sql.Date convert(String obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            DateFormat df = toDateFormat(formatString, timeZone, locale);
+            try {
+                return new java.sql.Date(df.parse(obj).getTime());
+            } catch (ParseException e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class StringToSqlTime extends GenericLocalizedConverter<String, java.sql.Time> {
+        public StringToSqlTime() {
+            super(String.class, java.sql.Time.class);
+        }
+
+        public java.sql.Time convert(String obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            DateFormat df = toTimeFormat(formatString, timeZone, locale);
+            try {
+                return new java.sql.Time(df.parse(obj).getTime());
+            } catch (ParseException e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class StringToTimestamp extends GenericLocalizedConverter<String, java.sql.Timestamp> {
+        public StringToTimestamp() {
+            super(String.class, java.sql.Timestamp.class);
+        }
+
+        public java.sql.Timestamp convert(String obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            DateFormat df = toDateTimeFormat(formatString, timeZone, locale);
+            try {
+                return new java.sql.Timestamp(df.parse(obj).getTime());
+            } catch (ParseException e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class StringToTimeZone extends AbstractConverter<String, TimeZone> {
+        public StringToTimeZone() {
+            super(String.class, TimeZone.class);
+        }
+
+        public TimeZone convert(String obj) throws ConversionException {
+            return TimeZone.getTimeZone(obj);
+        }
+    }
+
+    public static class TimestampToDate extends AbstractConverter<java.sql.Timestamp, Date> {
+        public TimestampToDate() {
+            super(java.sql.Timestamp.class, Date.class);
+        }
+
+        public Date convert(java.sql.Timestamp obj) throws ConversionException {
+            return new Timestamp(obj.getTime());
+        }
+    }
+
+    public static class TimestampToList extends GenericSingletonToList<Timestamp> {
+        public TimestampToList() {
+            super(Timestamp.class);
+        }
+    }
+
+    public static class TimestampToSet extends GenericSingletonToSet<Timestamp> {
+        public TimestampToSet() {
+            super(Timestamp.class);
+        }
+    }
+
+    public static class TimestampToSqlDate extends AbstractConverter<Timestamp, java.sql.Date> {
+        public TimestampToSqlDate() {
+            super(Timestamp.class, java.sql.Date.class);
+        }
+
+        public java.sql.Date convert(Timestamp obj) throws ConversionException {
+            return new java.sql.Date(obj.getTime());
+        }
+    }
+
+    public static class TimeZoneToString extends AbstractConverter<TimeZone, String> {
+        public TimeZoneToString() {
+            super(TimeZone.class, String.class);
+        }
+
+        public String convert(TimeZone obj) throws ConversionException {
+            return obj.getID();
+        }
+    }
+}

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/DateTimeConverters.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/DateTimeConverters.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/DateTimeConverters.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToList.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToList.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToList.java (added)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToList.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GenericSingletonToList<T> extends AbstractConverter<T, List<T>> {
+    public GenericSingletonToList(Class<T> sourceClass) {
+        super(sourceClass, List.class);
+    }
+
+    public List<T> convert(T obj) throws ConversionException {
+        List<T> tempList = new ArrayList<T>();
+        tempList.add(obj);
+        return tempList;
+    }
+}

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToList.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToList.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToList.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToSet.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToSet.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToSet.java (added)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToSet.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class GenericSingletonToSet<T> extends AbstractConverter<T, Set<T>> {
+    public GenericSingletonToSet(Class<T> sourceClass) {
+        super(sourceClass, Set.class);
+    }
+
+    public Set<T> convert(T obj) throws ConversionException {
+        Set<T> tempSet = new HashSet<T>();
+        tempSet.add(obj);
+        return tempSet;
+    }
+}

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToSet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToSet.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/GenericSingletonToSet.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/LocalizedConverter.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/LocalizedConverter.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/LocalizedConverter.java (added)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/LocalizedConverter.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+import java.util.Locale;
+import java.util.TimeZone;
+
+/** Localized converter interface. Classes implement this interface
+ * to convert one object type to another. Methods are provided to
+ * localize the conversion.
+ */
+public interface LocalizedConverter<S, T> extends Converter<S, T> {
+    /** Converts <code>obj</code> to <code>T</code>.
+     *
+     * @param obj The source <code>Object</code> to convert
+     * @param locale The locale used for conversion - must not be <code>null</code>
+     * @param timeZone The time zone used for conversion - must not be <code>null</code>
+     * @return The converted <code>Object</code>
+     * @throws ConversionException
+     */
+    public T convert(S obj, Locale locale, TimeZone timeZone) throws ConversionException;
+
+    /** Converts <code>obj</code> to <code>T</code>.
+     *
+     * @param targetClass The <code>Class</code> to convert to
+     * @param obj The source <code>Object</code> to convert
+     * @param locale The locale used for conversion - must not be <code>null</code>
+     * @param timeZone The time zone used for conversion - must not be <code>null</code>
+     * @return The converted <code>Object</code>
+     * @throws ConversionException
+     */
+    public T convert(Class<? extends T> targetClass, S obj, Locale locale, TimeZone timeZone) throws ConversionException;
+
+    /** Converts <code>obj</code> to <code>T</code>.
+     *
+     * @param obj The source <code>Object</code> to convert
+     * @param locale The locale used for conversion - must not be <code>null</code>
+     * @param timeZone The time zone used for conversion - must not be <code>null</code>
+     * @param formatString Optional formatting string
+     * @return The converted <code>Object</code>
+     * @throws ConversionException
+     */
+    public T convert(S obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException;
+
+    /** Converts <code>obj</code> to <code>T</code>.
+     *
+     * @param targetClass The <code>Class</code> to convert to
+     * @param obj The source <code>Object</code> to convert
+     * @param locale The locale used for conversion - must not be <code>null</code>
+     * @param timeZone The time zone used for conversion - must not be <code>null</code>
+     * @param formatString Optional formatting string
+     * @return The converted <code>Object</code>
+     * @throws ConversionException
+     */
+    public T convert(Class<? extends T> targetClass, S obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException;
+}

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/LocalizedConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/LocalizedConverter.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/LocalizedConverter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/MiscConverters.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/MiscConverters.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/MiscConverters.java (added)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/MiscConverters.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,360 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.Locale;
+import java.util.UUID;
+import java.util.regex.Pattern;
+
+/** Miscellaneous Converter classes. */
+public class MiscConverters implements ConverterLoader {
+
+    public static class BlobToBlob extends AbstractConverter<Blob, Blob> {
+        public BlobToBlob() {
+            super(Blob.class, Blob.class);
+        }
+
+        public Blob convert(Blob obj) throws ConversionException {
+            try {
+                return new javax.sql.rowset.serial.SerialBlob(obj.getBytes(1, (int) obj.length()));
+            } catch (Exception e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class BlobToByteArray extends AbstractConverter<Blob, byte[]> {
+        public BlobToByteArray() {
+            super(Blob.class, byte[].class);
+        }
+
+        public byte[] convert(Blob obj) throws ConversionException {
+            InputStream inStream = null;
+            try {
+                inStream = obj.getBinaryStream();
+                int blobLength = (int) obj.length();
+                byte[] byteBuffer = new byte[blobLength];
+                int offset = 0;
+                int bytesRead = inStream.read(byteBuffer, offset, blobLength);
+                while (bytesRead > 0) {
+                    offset += bytesRead;
+                    bytesRead = inStream.read(byteBuffer, offset, blobLength);
+                }
+                return byteBuffer;
+            } catch (Exception e) {
+                throw new ConversionException(e);
+            }
+            finally {
+                if (inStream != null) {
+                    try {
+                        inStream.close();
+                    } catch (IOException e) {}
+                }
+            }
+        }
+    }
+
+    public static class ByteArrayToBlob extends AbstractConverter<byte[], Blob> {
+        public ByteArrayToBlob() {
+            super(byte[].class, Blob.class);
+        }
+
+        public Blob convert(byte[] obj) throws ConversionException {
+            try {
+                return new javax.sql.rowset.serial.SerialBlob(obj);
+            } catch (Exception e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class ByteBufferToByteArray extends AbstractConverter<ByteBuffer, byte[]> {
+        public ByteBufferToByteArray() {
+            super(ByteBuffer.class, byte[].class);
+        }
+
+        public byte[] convert(ByteBuffer obj) throws ConversionException {
+            try {
+                return obj.hasArray() ? obj.array() : null;
+            } catch (Exception e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class ByteArrayToByteBuffer extends AbstractConverter<byte[], ByteBuffer> {
+        public ByteArrayToByteBuffer() {
+            super(byte[].class, ByteBuffer.class);
+        }
+
+        public ByteBuffer convert(byte[] obj) throws ConversionException {
+            try {
+                return ByteBuffer.wrap(obj);
+            } catch (Exception e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class ClobToString extends AbstractConverter<Clob, String> {
+        public ClobToString() {
+            super(Clob.class, String.class);
+        }
+
+        public String convert(Clob obj) throws ConversionException {
+            Reader clobReader = null;
+            try {
+                clobReader = obj.getCharacterStream();
+                int clobLength = (int) obj.length();
+                char[] charBuffer = new char[clobLength];
+                int offset = 0;
+                int charsRead = clobReader.read(charBuffer, offset, clobLength);
+                while (charsRead > 0) {
+                    offset += charsRead;
+                    charsRead = clobReader.read(charBuffer, offset, clobLength);
+                }
+                return new String(charBuffer);
+            } catch (Exception e) {
+                throw new ConversionException(e);
+            }
+            finally {
+                if (clobReader != null) {
+                    try {
+                        clobReader.close();
+                    } catch (IOException e) {}
+                }
+            }
+        }
+    }
+
+    public static class EnumToString extends AbstractConverter<Enum, String> {
+        public EnumToString() {
+            super(Enum.class, String.class);
+        }
+
+        public boolean canConvert(Class<?> sourceClass, Class<?> targetClass) {
+            return Enum.class.isAssignableFrom(sourceClass) && String.class.isAssignableFrom(targetClass);
+        }
+
+        public String convert(Enum obj) throws ConversionException {
+            return obj.name();
+        }
+
+        public String convert(Class<? extends String> targetClass, Enum obj) throws ConversionException {
+            return convert(obj);
+        }
+
+        public Class<? super Enum> getSourceClass() {
+            return null;
+        }
+    }
+
+    public static class StringToEnumConverterCreator implements ConverterCreator, ConverterLoader {
+        public void loadConverters() {
+            Converters.registerCreator(this);
+        }
+
+        public <S, T> Converter<S, T> createConverter(Class<S> sourceClass, Class<T> targetClass) {
+            if (String.class == sourceClass && Enum.class.isAssignableFrom(targetClass)) {
+                return Util.cast(new StringToEnum());
+            } else {
+                return null;
+            }
+        }
+
+        private <E extends Enum<E>> StringToEnum<E> createConverter(Class<Enum<E>> targetClass) {
+            return new StringToEnum<E>();
+        }
+    }
+
+    private static class StringToEnum<E extends Enum<E>> extends AbstractConverter<String, E> {
+        public StringToEnum() {
+            super(String.class, Enum.class);
+        }
+
+        public boolean canConvert(Class<?> sourceClass, Class<?> targetClass) {
+            return String.class.isAssignableFrom(sourceClass) && Enum.class.isAssignableFrom(targetClass);
+        }
+
+        public E convert(String obj) throws ConversionException {
+            throw new UnsupportedOperationException();
+        }
+
+        public E convert(Class<? extends E> targetClass, String obj) throws ConversionException {
+            return Enum.valueOf(Util.<Class<E>>cast(targetClass), obj);
+        }
+
+        public Class<? super Enum> getTargetClass() {
+            return null;
+        }
+    }
+
+    public static class LocaleToString extends AbstractConverter<Locale, String> {
+        public LocaleToString() {
+            super(Locale.class, String.class);
+        }
+
+        public String convert(Locale obj) throws ConversionException {
+             return obj.toString();
+        }
+    }
+
+    public static class StringToClob extends AbstractConverter<String, Clob> {
+        public StringToClob() {
+            super(String.class, Clob.class);
+        }
+
+        public Clob convert(String obj) throws ConversionException {
+            try {
+                return new javax.sql.rowset.serial.SerialClob(obj.toCharArray());
+            } catch (Exception e) {
+                throw new ConversionException(e);
+            }
+        }
+    }
+
+    public static class StringToLocale extends AbstractConverter<String, Locale> {
+        public StringToLocale() {
+            super(String.class, Locale.class);
+        }
+
+        public Locale convert(String obj) throws ConversionException {
+            return new Locale(obj);
+        }
+    }
+
+    public static class DecimalFormatToString extends AbstractConverter<DecimalFormat, String> {
+        public DecimalFormatToString() {
+            super(DecimalFormat.class, String.class);
+        }
+
+        public String convert(DecimalFormat obj) throws ConversionException {
+            return obj.toPattern();
+        }
+    }
+
+    public static class StringToDecimalFormat extends AbstractConverter<String, DecimalFormat> {
+        public StringToDecimalFormat() {
+            super(String.class, DecimalFormat.class);
+        }
+
+        public DecimalFormat convert(String obj) throws ConversionException {
+            return new DecimalFormat(obj);
+        }
+    }
+
+    public static class SimpleDateFormatToString extends AbstractConverter<SimpleDateFormat, String> {
+        public SimpleDateFormatToString() {
+            super(SimpleDateFormat.class, String.class);
+        }
+
+        public String convert(SimpleDateFormat obj) throws ConversionException {
+            return obj.toPattern();
+        }
+    }
+
+    public static class StringToSimpleDateFormat extends AbstractConverter<String, SimpleDateFormat> {
+        public StringToSimpleDateFormat() {
+            super(String.class, SimpleDateFormat.class);
+        }
+
+        public SimpleDateFormat convert(String obj) throws ConversionException {
+            return new SimpleDateFormat(obj);
+        }
+    }
+
+    public static class CharsetToString extends AbstractConverter<Charset, String> {
+        public CharsetToString() {
+            super(Charset.class, String.class);
+        }
+
+        public String convert(Charset obj) throws ConversionException {
+            return obj.name();
+        }
+    }
+
+    public static class StringToCharset extends AbstractConverter<String, Charset> {
+        public StringToCharset() {
+            super(String.class, Charset.class);
+        }
+
+        public Charset convert(String obj) throws ConversionException {
+            return Charset.forName(obj);
+        }
+    }
+
+    public static class UUIDToString extends AbstractConverter<UUID, String> {
+        public UUIDToString() {
+            super(UUID.class, String.class);
+        }
+
+        public String convert(UUID obj) throws ConversionException {
+            return obj.toString();
+        }
+    }
+
+    public static class StringToUUID extends AbstractConverter<String, UUID> {
+        public StringToUUID() {
+            super(String.class, UUID.class);
+        }
+
+        public UUID convert(String obj) throws ConversionException {
+            return UUID.fromString(obj);
+        }
+    }
+
+    public static class RegexPatternToString extends AbstractConverter<Pattern, String> {
+        public RegexPatternToString() {
+            super(Pattern.class, String.class);
+        }
+
+        public String convert(Pattern obj) throws ConversionException {
+            return obj.toString();
+        }
+    }
+
+    public static class StringToRegexPattern extends AbstractConverter<String, Pattern> {
+        public StringToRegexPattern() {
+            super(String.class, Pattern.class);
+        }
+
+        public Pattern convert(String obj) throws ConversionException {
+            return Pattern.compile(obj);
+        }
+    }
+
+    public static class NotAConverter {
+        protected NotAConverter() {
+            throw new Error("Should not be loaded");
+        }
+    }
+
+    public void loadConverters() {
+        Converters.loadContainedConverters(MiscConverters.class);
+    }
+}

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/MiscConverters.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/MiscConverters.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/MiscConverters.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NetConverters.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NetConverters.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NetConverters.java (added)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NetConverters.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+/** Net Converter classes. */
+public class NetConverters implements ConverterLoader {
+    public static final String module = NetConverters.class.getName();
+
+    public static class StringToInetAddress extends AbstractConverter<String, InetAddress> {
+        public StringToInetAddress() {
+            super(String.class, InetAddress.class);
+        }
+
+        public InetAddress convert(String obj) throws ConversionException {
+            try {
+                return InetAddress.getByName(obj);
+            } catch (IOException e) {
+                throw (ConversionException) new ConversionException(e.getMessage()).initCause(e);
+            }
+        }
+    }
+
+    public static class InetAddressToString extends AbstractConverter<InetAddress, String> {
+        public InetAddressToString() {
+            super(InetAddress.class, String.class);
+        }
+
+        public String convert(InetAddress obj) throws ConversionException {
+            String hostName = obj.getHostName();
+            if (hostName != null) return hostName;
+            return obj.getHostAddress();
+        }
+    }
+
+    public static class StringToURI extends AbstractConverter<String, URI> {
+        public StringToURI() {
+            super(String.class, URI.class);
+        }
+
+        public URI convert(String obj) throws ConversionException {
+            try {
+                return new URI(obj);
+            } catch (URISyntaxException e) {
+                throw (ConversionException) new ConversionException(e.getMessage()).initCause(e);
+            }
+        }
+    }
+
+    public static class URIToString extends AbstractConverter<URI, String> {
+        public URIToString() {
+            super(URI.class, String.class);
+        }
+
+        public String convert(URI obj) throws ConversionException {
+            return obj.toString();
+        }
+    }
+
+    public static class StringToURL extends AbstractConverter<String, URL> {
+        public StringToURL() {
+            super(String.class, URL.class);
+        }
+
+        public URL convert(String obj) throws ConversionException {
+            try {
+                return new URL(obj);
+            } catch (MalformedURLException e) {
+                throw (ConversionException) new ConversionException(e.getMessage()).initCause(e);
+            }
+        }
+    }
+
+    public static class URLToString extends AbstractConverter<URL, String> {
+        public URLToString() {
+            super(URL.class, String.class);
+        }
+
+        public String convert(URL obj) throws ConversionException {
+            return obj.toString();
+        }
+    }
+
+    public static class URIToURL extends AbstractConverter<URI, URL> {
+        public URIToURL() {
+            super(URI.class, URL.class);
+        }
+
+        public URL convert(URI obj) throws ConversionException {
+            try {
+                return obj.toURL();
+            } catch (MalformedURLException e) {
+                throw (ConversionException) new ConversionException(e.getMessage()).initCause(e);
+            }
+        }
+    }
+
+    public static class URLToURI extends AbstractConverter<URL, URI> {
+        public URLToURI() {
+            super(URL.class, URI.class);
+        }
+
+        public URI convert(URL obj) throws ConversionException {
+            try {
+                return obj.toURI();
+            } catch (URISyntaxException e) {
+                throw (ConversionException) new ConversionException(e.getMessage()).initCause(e);
+            }
+        }
+    }
+
+    public void loadConverters() {
+        Converters.loadContainedConverters(NetConverters.class);
+    }
+}

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NetConverters.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NetConverters.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NetConverters.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NumberConverters.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NumberConverters.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NumberConverters.java (added)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NumberConverters.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,428 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.util.Locale;
+import java.util.TimeZone;
+
+/** Number Converter classes. */
+public class NumberConverters implements ConverterLoader {
+
+    protected static Number fromString(String str, Locale locale) throws ConversionException {
+        NumberFormat nf = NumberFormat.getNumberInstance(locale);
+        try {
+            return nf.parse(str);
+        } catch (ParseException e) {
+            throw new ConversionException(e);
+        }
+    }
+
+    public static abstract class AbstractStringToNumberConverter<N extends Number> extends AbstractNumberConverter<String, N> {
+        public AbstractStringToNumberConverter(Class<N> targetClass) {
+            super(String.class, targetClass);
+        }
+
+        public N convert(String obj, Locale locale, TimeZone timeZone) throws ConversionException {
+            return convert(fromString(obj, locale));
+        }
+
+        protected abstract N convert(Number number) throws ConversionException;
+    }
+
+    public static abstract class AbstractNumberConverter<S, T> extends AbstractLocalizedConverter<S, T> {
+        protected AbstractNumberConverter(Class<S> sourceClass, Class<T> targetClass) {
+            super(sourceClass, targetClass);
+        }
+
+        public T convert(S obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException {
+            return convert(obj, locale, null);
+        }
+    }
+
+    public static abstract class AbstractNumberToStringConverter<N extends Number> extends AbstractNumberConverter<N, String> {
+        public AbstractNumberToStringConverter(Class<N> sourceClass) {
+            super(sourceClass, String.class);
+        }
+
+        public String convert(N obj) throws ConversionException {
+            return obj.toString();
+        }
+
+        public String convert(N obj, Locale locale, TimeZone timeZone) throws ConversionException {
+            return format(obj, NumberFormat.getNumberInstance(locale));
+        }
+
+        protected abstract String format(N obj, NumberFormat nf) throws ConversionException;
+    }
+
+    public static class GenericNumberToDouble<N extends Number> extends AbstractConverter<N, Double> {
+        public GenericNumberToDouble(Class<N> sourceClass) {
+            super(sourceClass, Double.class);
+        }
+
+        public Double convert(N obj) throws ConversionException {
+            return obj.doubleValue();
+        }
+    }
+
+    public static class GenericNumberToFloat<N extends Number> extends AbstractConverter<N, Float> {
+        public GenericNumberToFloat(Class<N> sourceClass) {
+            super(sourceClass, Float.class);
+        }
+
+        public Float convert(N obj) throws ConversionException {
+            return obj.floatValue();
+        }
+    }
+
+    public static class GenericNumberToInteger<N extends Number> extends AbstractConverter<N, Integer> {
+        public GenericNumberToInteger(Class<N> sourceClass) {
+            super(sourceClass, Integer.class);
+        }
+
+        public Integer convert(N obj) throws ConversionException {
+            return obj.intValue();
+        }
+    }
+
+    public static class GenericNumberToLong<N extends Number> extends AbstractConverter<N, Long> {
+        public GenericNumberToLong(Class<N> sourceClass) {
+            super(sourceClass, Long.class);
+        }
+
+        public Long convert(N obj) throws ConversionException {
+            return obj.longValue();
+        }
+    }
+
+    public static class GenericNumberToShort<N extends Number> extends AbstractConverter<N, Short> {
+        public GenericNumberToShort(Class<N> sourceClass) {
+            super(sourceClass, Short.class);
+        }
+
+        public Short convert(N obj) throws ConversionException {
+            return obj.shortValue();
+        }
+    }
+
+    public static class BigDecimalToString extends AbstractNumberToStringConverter<BigDecimal> {
+        public BigDecimalToString() {
+            super(BigDecimal.class);
+        }
+
+        protected String format(BigDecimal obj, NumberFormat nf) throws ConversionException {
+            return nf.format(obj.doubleValue());
+        }
+    }
+
+    public static class DoubleToBigDecimal extends AbstractConverter<Double, BigDecimal> {
+        public DoubleToBigDecimal() {
+            super(Double.class, BigDecimal.class);
+        }
+
+        public BigDecimal convert(Double obj) throws ConversionException {
+            return BigDecimal.valueOf(obj.doubleValue());
+        }
+    }
+
+    public static class BigIntegerToString extends AbstractNumberToStringConverter<BigInteger> {
+        public BigIntegerToString() {
+            super(BigInteger.class);
+        }
+
+        protected String format(BigInteger obj, NumberFormat nf) throws ConversionException {
+            return nf.format(obj.doubleValue());
+        }
+    }
+
+    public static class ByteToString extends AbstractNumberToStringConverter<Byte> {
+        public ByteToString() {
+            super(Byte.class);
+        }
+
+        protected String format(Byte obj, NumberFormat nf) throws ConversionException {
+            return nf.format(obj.floatValue());
+        }
+    }
+
+    public static class StringToBigInteger extends AbstractStringToNumberConverter<BigInteger> {
+        public StringToBigInteger() {
+            super(BigInteger.class);
+        }
+
+        public BigInteger convert(String obj) throws ConversionException {
+            return new BigInteger(obj);
+        }
+
+        protected BigInteger convert(Number number) throws ConversionException {
+            return BigInteger.valueOf(number.longValue());
+        }
+    }
+
+    public static class DoubleToString extends AbstractNumberToStringConverter<Double> {
+        public DoubleToString() {
+            super(Double.class);
+        }
+
+        protected String format(Double obj, NumberFormat nf) throws ConversionException {
+            return nf.format(obj.doubleValue());
+        }
+    }
+
+    public static class FloatToBigDecimal extends AbstractConverter<Float, BigDecimal> {
+        public FloatToBigDecimal() {
+            super(Float.class, BigDecimal.class);
+        }
+
+        public BigDecimal convert(Float obj) throws ConversionException {
+            return BigDecimal.valueOf(obj.doubleValue());
+        }
+    }
+
+    public static class FloatToString extends AbstractNumberToStringConverter<Float> {
+        public FloatToString() {
+            super(Float.class);
+        }
+
+        protected String format(Float obj, NumberFormat nf) throws ConversionException {
+            return nf.format(obj.floatValue());
+        }
+    }
+
+    public static class IntegerToBigDecimal extends AbstractConverter<Integer, BigDecimal> {
+        public IntegerToBigDecimal() {
+            super(Integer.class, BigDecimal.class);
+        }
+
+        public BigDecimal convert(Integer obj) throws ConversionException {
+            return BigDecimal.valueOf(obj.intValue());
+        }
+    }
+
+    public static class IntegerToByte extends AbstractConverter<Integer, Byte> {
+        public IntegerToByte() {
+            super(Integer.class, Byte.class);
+        }
+
+        public Byte convert(Integer obj) throws ConversionException {
+            return obj.byteValue();
+        }
+    }
+
+    public static class IntegerToString extends AbstractNumberToStringConverter<Integer> {
+        public IntegerToString() {
+            super(Integer.class);
+        }
+
+        protected String format(Integer obj, NumberFormat nf) throws ConversionException {
+            return nf.format(obj.intValue());
+        }
+    }
+
+    public static class LongToBigDecimal extends AbstractConverter<Long, BigDecimal> {
+        public LongToBigDecimal() {
+            super(Long.class, BigDecimal.class);
+        }
+
+        public BigDecimal convert(Long obj) throws ConversionException {
+            return BigDecimal.valueOf(obj.longValue());
+        }
+    }
+
+    public static class LongToByte extends AbstractConverter<Long, Byte> {
+        public LongToByte() {
+            super(Long.class, Byte.class);
+        }
+
+        public Byte convert(Long obj) throws ConversionException {
+            return obj.byteValue();
+        }
+    }
+
+    public static class LongToString extends AbstractNumberToStringConverter<Long> {
+        public LongToString() {
+            super(Long.class);
+        }
+
+        protected String format(Long obj, NumberFormat nf) throws ConversionException {
+            return nf.format(obj.longValue());
+        }
+    }
+
+    public static class ShortToString extends AbstractNumberToStringConverter<Short> {
+        public ShortToString() {
+            super(Short.class);
+        }
+
+        protected String format(Short obj, NumberFormat nf) throws ConversionException {
+            return nf.format(obj.floatValue());
+        }
+    }
+
+    public static class StringToBigDecimal extends AbstractStringToNumberConverter<BigDecimal> {
+        public StringToBigDecimal() {
+            super(BigDecimal.class);
+        }
+
+        public BigDecimal convert(String obj) throws ConversionException {
+            return BigDecimal.valueOf(Double.valueOf(obj));
+        }
+
+        protected BigDecimal convert(Number number) throws ConversionException {
+            return BigDecimal.valueOf(number.doubleValue());
+        }
+    }
+
+    public static class StringToByte extends AbstractConverter<String, Byte> {
+        public StringToByte() {
+            super(String.class, Byte.class);
+        }
+
+        public Byte convert(String obj) throws ConversionException {
+            return Byte.valueOf(obj);
+        }
+    }
+
+    public static class StringToDouble extends AbstractStringToNumberConverter<Double> {
+        public StringToDouble() {
+            super(Double.class);
+        }
+
+        public Double convert(String obj) throws ConversionException {
+            return Double.valueOf(obj);
+        }
+
+        protected Double convert(Number number) throws ConversionException {
+            return number.doubleValue();
+        }
+    }
+
+    public static class StringToFloat extends AbstractStringToNumberConverter<Float> {
+        public StringToFloat() {
+            super(Float.class);
+        }
+
+        public Float convert(String obj) throws ConversionException {
+            return Float.valueOf(obj);
+        }
+
+        protected Float convert(Number number) throws ConversionException {
+            return number.floatValue();
+        }
+    }
+
+    public static class StringToInteger extends AbstractStringToNumberConverter<Integer> {
+        public StringToInteger() {
+            super(Integer.class);
+        }
+
+        public Integer convert(String obj) throws ConversionException {
+            return Integer.valueOf(obj);
+        }
+
+        protected Integer convert(Number number) throws ConversionException {
+            return number.intValue();
+        }
+    }
+
+    public static class StringToLong extends AbstractStringToNumberConverter<Long> {
+        public StringToLong() {
+            super(Long.class);
+        }
+
+        public Long convert(String obj) throws ConversionException {
+            return Long.valueOf(obj);
+        }
+
+        protected Long convert(Number number) throws ConversionException {
+            return number.longValue();
+        }
+    }
+
+    public static class StringToShort extends AbstractConverter<String, Short> {
+        public StringToShort() {
+            super(String.class, Short.class);
+        }
+
+        public Short convert(String obj) throws ConversionException {
+            return Short.valueOf(obj);
+        }
+    }
+
+    public void loadConverters() {
+        Converters.loadContainedConverters(NumberConverters.class);
+
+        Converters.registerConverter(new GenericNumberToDouble<BigDecimal>(BigDecimal.class));
+        Converters.registerConverter(new GenericNumberToDouble<BigInteger>(BigInteger.class));
+        Converters.registerConverter(new GenericNumberToDouble<Byte>(Byte.class));
+        Converters.registerConverter(new GenericNumberToDouble<Float>(Float.class));
+        Converters.registerConverter(new GenericNumberToDouble<Integer>(Integer.class));
+        Converters.registerConverter(new GenericNumberToDouble<Long>(Long.class));
+        Converters.registerConverter(new GenericNumberToDouble<Short>(Short.class));
+
+        Converters.registerConverter(new GenericNumberToFloat<BigDecimal>(BigDecimal.class));
+        Converters.registerConverter(new GenericNumberToFloat<BigInteger>(BigInteger.class));
+        Converters.registerConverter(new GenericNumberToFloat<Byte>(Byte.class));
+        Converters.registerConverter(new GenericNumberToFloat<Double>(Double.class));
+        Converters.registerConverter(new GenericNumberToFloat<Integer>(Integer.class));
+        Converters.registerConverter(new GenericNumberToFloat<Long>(Long.class));
+        Converters.registerConverter(new GenericNumberToFloat<Short>(Short.class));
+
+        Converters.registerConverter(new GenericNumberToInteger<BigDecimal>(BigDecimal.class));
+        Converters.registerConverter(new GenericNumberToInteger<BigInteger>(BigInteger.class));
+        Converters.registerConverter(new GenericNumberToInteger<Byte>(Byte.class));
+        Converters.registerConverter(new GenericNumberToInteger<Double>(Double.class));
+        Converters.registerConverter(new GenericNumberToInteger<Float>(Float.class));
+        Converters.registerConverter(new GenericNumberToInteger<Long>(Long.class));
+        Converters.registerConverter(new GenericNumberToInteger<Short>(Short.class));
+
+        Converters.registerConverter(new GenericSingletonToList<BigDecimal>(BigDecimal.class));
+        Converters.registerConverter(new GenericSingletonToList<BigInteger>(BigInteger.class));
+        Converters.registerConverter(new GenericSingletonToList<Byte>(Byte.class));
+        Converters.registerConverter(new GenericSingletonToList<Double>(Double.class));
+        Converters.registerConverter(new GenericSingletonToList<Float>(Float.class));
+        Converters.registerConverter(new GenericSingletonToList<Integer>(Integer.class));
+        Converters.registerConverter(new GenericSingletonToList<Long>(Long.class));
+        Converters.registerConverter(new GenericSingletonToList<Short>(Short.class));
+
+        Converters.registerConverter(new GenericNumberToLong<BigDecimal>(BigDecimal.class));
+        Converters.registerConverter(new GenericNumberToLong<BigInteger>(BigInteger.class));
+        Converters.registerConverter(new GenericNumberToLong<Byte>(Byte.class));
+        Converters.registerConverter(new GenericNumberToLong<Double>(Double.class));
+        Converters.registerConverter(new GenericNumberToLong<Float>(Float.class));
+        Converters.registerConverter(new GenericNumberToLong<Integer>(Integer.class));
+        Converters.registerConverter(new GenericNumberToLong<Short>(Short.class));
+
+        Converters.registerConverter(new GenericSingletonToSet<BigDecimal>(BigDecimal.class));
+        Converters.registerConverter(new GenericSingletonToSet<BigInteger>(BigInteger.class));
+        Converters.registerConverter(new GenericSingletonToSet<Byte>(Byte.class));
+        Converters.registerConverter(new GenericSingletonToSet<Double>(Double.class));
+        Converters.registerConverter(new GenericSingletonToSet<Float>(Float.class));
+        Converters.registerConverter(new GenericSingletonToSet<Integer>(Integer.class));
+        Converters.registerConverter(new GenericSingletonToSet<Long>(Long.class));
+        Converters.registerConverter(new GenericSingletonToSet<Short>(Short.class));
+
+        Converters.registerConverter(new GenericNumberToShort<Integer>(Integer.class));
+        Converters.registerConverter(new GenericNumberToShort<Long>(Long.class));
+    }
+}

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NumberConverters.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NumberConverters.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/NumberConverters.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Util.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Util.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Util.java (added)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Util.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+/** Utility methods. */
+public class Util {
+
+    @SuppressWarnings("unchecked")
+    public static <V> V cast(Object object) {
+        return (V) object;
+    }
+
+    /**
+     * Tests if a class is a class of a sub-class of or properly implements an interface.
+     * @param objectClass Class to test
+     * @param typeClass Class to test against
+     * @return true if objectClass is a class or sub-class of, or implements typeClass
+     */
+    public static boolean instanceOf(Class<?> objectClass, Class<?> typeClass) {
+        if (typeClass.isInterface() && !objectClass.isInterface()) {
+            while (objectClass != null) {
+                Class<?>[] ifaces = objectClass.getInterfaces();
+                for (Class<?> iface: ifaces) {
+                    if (iface == typeClass) {
+                        return true;
+                    }
+                }
+                objectClass = objectClass.getSuperclass();
+            }
+            return false;
+        } else {
+            while (objectClass != null) {
+                if (objectClass == typeClass) {
+                    return true;
+                }
+                objectClass = objectClass.getSuperclass();
+            }
+            return false;
+        }
+    }
+
+    public static boolean isEmpty(String str) {
+        return str == null || str.trim().length() == 0;
+    }
+
+    private Util() {}
+}

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Util.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Util.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Util.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/src/test/org/apache/commons/convert/TestDateTimeConverters.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/test/org/apache/commons/convert/TestDateTimeConverters.java?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/src/test/org/apache/commons/convert/TestDateTimeConverters.java (added)
+++ commons/sandbox/convert/trunk/src/test/org/apache/commons/convert/TestDateTimeConverters.java Fri Mar 12 16:58:07 2010
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.apache.commons.convert;
+
+import org.apache.commons.convert.Converter;
+import org.apache.commons.convert.DateTimeConverters;
+
+import junit.framework.TestCase;
+
+public class TestDateTimeConverters extends TestCase {
+
+    public TestDateTimeConverters(String name) {
+        super(name);
+    }
+
+    public static <S, T> void assertConversion(String label, Converter<S, T> converter, S source, T target) throws Exception {
+        assertTrue(label + " can convert", converter.canConvert(source.getClass(), target.getClass()));
+        assertEquals(label + " converted", target, converter.convert(source));
+    }
+
+    public void testDateTimeConverters() throws Exception {
+        // Source class = java.util.Date
+        long currentTime = System.currentTimeMillis();
+        java.util.Date utilDate = new java.util.Date(currentTime);
+        assertConversion("DateToLong", new DateTimeConverters.DateToLong(), utilDate, currentTime);
+        assertConversion("DateToSqlDate", new DateTimeConverters.DateToSqlDate(), utilDate, new java.sql.Date(currentTime));
+        assertConversion("DateToString", new DateTimeConverters.DateToString(), utilDate, utilDate.toString());
+        //assertConversion("StringToDate", new DateTimeConverters.StringToDate(), utilDate.toString(), utilDate);
+        assertConversion("DateToTimestamp", new DateTimeConverters.DateToTimestamp(), utilDate, new java.sql.Timestamp(currentTime));
+        // Source class = java.sql.Date
+        java.sql.Date sqlDate = new java.sql.Date(currentTime);
+        assertConversion("SqlDateToDate", new DateTimeConverters.SqlDateToDate(), sqlDate, utilDate);
+        assertConversion("SqlDateToString", new DateTimeConverters.SqlDateToString(), sqlDate, sqlDate.toString());
+        //assertConversion("StringToSqlDate", new DateTimeConverters.StringToSqlDate(), sqlDate.toString(), sqlDate);
+        java.sql.Timestamp timestamp = new java.sql.Timestamp(currentTime);
+        assertConversion("SqlDateToTimestamp", new DateTimeConverters.SqlDateToTimestamp(), sqlDate, timestamp);
+        assertConversion("StringToTimestamp", new DateTimeConverters.StringToTimestamp(), timestamp.toString(), timestamp);
+        assertConversion("TimestampToDate", new DateTimeConverters.TimestampToDate(), timestamp, utilDate);
+        assertConversion("TimestampToSqlDate", new DateTimeConverters.TimestampToSqlDate(), timestamp, sqlDate);
+        //assertConversion("TimestampToString", new DateTimeConverters.TimestampToString(), timestamp, timestamp.toString());
+    }
+}

Propchange: commons/sandbox/convert/trunk/src/test/org/apache/commons/convert/TestDateTimeConverters.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/src/test/org/apache/commons/convert/TestDateTimeConverters.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/src/test/org/apache/commons/convert/TestDateTimeConverters.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/convert/trunk/xdocs/class-diagram.png
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/xdocs/class-diagram.png?rev=922338&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/sandbox/convert/trunk/xdocs/class-diagram.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: commons/sandbox/convert/trunk/xdocs/images/convert-logo-white.png
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/xdocs/images/convert-logo-white.png?rev=922338&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/sandbox/convert/trunk/xdocs/images/convert-logo-white.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: commons/sandbox/convert/trunk/xdocs/images/convert-logo-white.xcf
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/xdocs/images/convert-logo-white.xcf?rev=922338&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/sandbox/convert/trunk/xdocs/images/convert-logo-white.xcf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: commons/sandbox/convert/trunk/xdocs/index.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/xdocs/index.xml?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/xdocs/index.xml (added)
+++ commons/sandbox/convert/trunk/xdocs/index.xml Fri Mar 12 16:58:07 2010
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+ <!--
+   Copyright 2003-2004 The Apache Software Foundation
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+
+<document>
+
+ <properties>
+  <title>Overview</title>
+  <author email="dev@commons.apache.org">Commons Documentation Team</author>
+ </properties>
+
+ <body>
+
+<section name="Commons Convert">
+
+<p>
+Commons-Convert aims to provide a single library dedicated to the task of converting
+an object of one type to another.
+</p>
+
+<subsection name="Goals">
+<p>
+ <ul>
+  <li>To provide a simple mechanism for converting one arbitrary Java object into another</li>
+  <li>Enable different sets of converters to be used under different circumstances</li>
+  <li>Provide a default library of converters</li>
+  <li>Allow for conversion of types that have not been specifically registered</li>
+  <li>Support locale-sensitive conversions for internationalization</li>
+  <li>Support conversion of collections and arrays</li>
+ </ul>
+</p>
+</subsection>
+
+<subsection name="Status">
+<p>
+ <ul>
+  <li>This code is in the commons <i>sandbox</i></li>
+  <li>The code is unreleased</li>
+  <li>Methods and classes can and will appear and disappear without warning</li>
+  <li>If you like the code and want to push it towards a release, join the mailing list!</li>
+ </ul>
+</p>
+</subsection>
+</section>
+
+
+<section name="Documentation">
+<p>
+ <ul>
+  <li>The <a href="apidocs/index.html">Javadoc</a> of the latest SVN</li>
+  <li>The <a href="http://svn.apache.org/viewvc/commons/sandbox/convert/">SVN repository</a> can be browsed.</li>
+ </ul>
+</p>
+</section>
+
+
+<section name="Releases">
+<p>
+None. This is a <i>sandbox</i> component.
+</p>
+</section>
+
+</body>
+</document>
+

Propchange: commons/sandbox/convert/trunk/xdocs/index.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/xdocs/index.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/xdocs/index.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: commons/sandbox/convert/trunk/xdocs/navigation.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/xdocs/navigation.xml?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/xdocs/navigation.xml (added)
+++ commons/sandbox/convert/trunk/xdocs/navigation.xml Fri Mar 12 16:58:07 2010
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+ <!--
+   Copyright 2003-2004 The Apache Software Foundation
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+
+<!DOCTYPE org.apache.commons.menus SYSTEM '../../commons-build/menus/menus.dtd'>
+<project name="Commons&#xA0;Convert">
+  <title>Commons&#xA0;Convert</title>
+  <body>
+    <menu name="Commons&#xA0;Commons Convert">
+      <item name="Overview" href="/index.html"/>
+      <item name="Javadoc" href="apidocs/index.html"/>
+      <item name="Mailing lists" href="/mail-lists.html"/>
+      <item name="Team" href="/team-list.html"/>
+      <item name="SVN" href="http://svn.apache.org/viewcvs/jakarta/commons/sandbox/convert/"/>
+    </menu>
+    &common-menus;
+  </body>
+</project>

Propchange: commons/sandbox/convert/trunk/xdocs/navigation.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/convert/trunk/xdocs/navigation.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: commons/sandbox/convert/trunk/xdocs/navigation.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: commons/sandbox/convert/trunk/xdocs/style/project.css
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/xdocs/style/project.css?rev=922338&view=auto
==============================================================================
--- commons/sandbox/convert/trunk/xdocs/style/project.css (added)
+++ commons/sandbox/convert/trunk/xdocs/style/project.css Fri Mar 12 16:58:07 2010
@@ -0,0 +1,10 @@
+#banner, #banner td { 
+ background: #fff;
+ color: #000;
+}
+
+#banner td { 
+ height: 100%;
+ vertical-align: middle;
+}
+



Mime
View raw message