ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1718139 - in /webservices/axiom/branches/datatypes: aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/intf/ datatypes/src/main/java/org/apache/axiom/datatype/ datatypes/src/main/java/org/apache/axiom/datatype/xsd/
Date Sun, 06 Dec 2015 01:00:02 GMT
Author: veithen
Date: Sun Dec  6 01:00:02 2015
New Revision: 1718139

URL: http://svn.apache.org/viewvc?rev=1718139&view=rev
Log:
Simplify class hierarchy.

Added:
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/InvariantType.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/AbstractInvariantType.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/Temporal.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanType.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDate.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTime.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeType.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateType.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameType.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringType.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTime.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeType.java
      - copied, changed from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeTypeImpl.java
Removed:
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/AbstractInvariantType.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringTypeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeImpl.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeTypeImpl.java
Modified:
    webservices/axiom/branches/datatypes/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/intf/SOAP11BooleanType.java
    webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalType.java

Modified: webservices/axiom/branches/datatypes/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/intf/SOAP11BooleanType.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/intf/SOAP11BooleanType.java?rev=1718139&r1=1718138&r2=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/intf/SOAP11BooleanType.java
(original)
+++ webservices/axiom/branches/datatypes/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/intf/SOAP11BooleanType.java
Sun Dec  6 01:00:02 2015
@@ -20,10 +20,10 @@ package org.apache.axiom.soap.impl.intf;
 
 import java.text.ParseException;
 
-import org.apache.axiom.datatype.AbstractInvariantType;
+import org.apache.axiom.datatype.InvariantType;
 import org.apache.axiom.datatype.TypeHelper;
 
-final class SOAP11BooleanType extends AbstractInvariantType<Boolean> {
+final class SOAP11BooleanType extends InvariantType<Boolean> {
     static final SOAP11BooleanType INSTANCE = new SOAP11BooleanType();
     
     private SOAP11BooleanType() {}

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/InvariantType.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/AbstractInvariantType.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/InvariantType.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/InvariantType.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/AbstractInvariantType.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/AbstractInvariantType.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/InvariantType.java
Sun Dec  6 01:00:02 2015
@@ -20,7 +20,7 @@ package org.apache.axiom.datatype;
 
 import java.text.ParseException;
 
-public abstract class AbstractInvariantType<T> implements InvariantType<T> {
+public abstract class InvariantType<T> implements Type<T> {
     public final <S,O> T parse(String literal, ContextAccessor<S,O> contextAccessor,
S contextObject, O options) throws ParseException {
         return parse(literal);
     }
@@ -28,4 +28,7 @@ public abstract class AbstractInvariantT
     public final <S,O> String format(T value, ContextAccessor<S,O> contextAccessor,
S contextObject, O options) {
         return format(value);
     }
+
+    public abstract T parse(String literal) throws ParseException;
+    public abstract String format(T value);
 }

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/Temporal.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/Temporal.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/Temporal.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/Temporal.java
Sun Dec  6 01:00:02 2015
@@ -21,7 +21,11 @@ package org.apache.axiom.datatype.xsd;
 import java.util.GregorianCalendar;
 import java.util.TimeZone;
 
-abstract class TemporalImpl implements Temporal {
+/**
+ * A temporal value. This is the base class for {@link XSDate}, {@link XSTime} and
+ * {@link XSDateTime}.
+ */
+public abstract class Temporal {
     abstract boolean hasDatePart();
     abstract boolean hasTimePart();
     abstract boolean isBC();
@@ -36,6 +40,18 @@ abstract class TemporalImpl implements T
     abstract SimpleTimeZone getTimeZone();
     abstract String getNanoSecondFraction();
     
+    /**
+     * Convert this value to a calendar. For {@link XSDate} and {@link XSTime}, only the
+     * corresponding fields are filled in and all other fields are left unspecified.
+     * 
+     * @param defaultTimeZone
+     *            the time zone to use if this temporal object has no time zone; may be
+     *            <code>null</code>
+     * @return the calendar
+     * @throws NoTimeZoneException
+     *             if this temporal object doesn't have a time zone and no default time zone
was
+     *             specified
+     */
     public final GregorianCalendar getCalendar(TimeZone defaultTimeZone) {
         // TODO: check aeon
         TimeZone timeZone = getTimeZone();
@@ -62,7 +78,12 @@ abstract class TemporalImpl implements T
         return calendar;
     }
     
-    public boolean hasTimeZone() {
+    /**
+     * Determine if this temporal value has a time zone.
+     * 
+     * @return <code>true</code> if the object has a time zone, <code>false</code>
otherwise
+     */
+    public final boolean hasTimeZone() {
         return getTimeZone() != null;
     }
 }

Modified: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalType.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalType.java?rev=1718139&r1=1718138&r2=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalType.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/TemporalType.java
Sun Dec  6 01:00:02 2015
@@ -20,12 +20,12 @@ package org.apache.axiom.datatype.xsd;
 
 import java.text.ParseException;
 
-import org.apache.axiom.datatype.AbstractInvariantType;
+import org.apache.axiom.datatype.InvariantType;
 import org.apache.axiom.datatype.TypeHelper;
 import org.apache.axiom.datatype.UnexpectedCharacterException;
 import org.apache.axiom.datatype.UnexpectedEndOfStringException;
 
-abstract class TemporalType<T> extends AbstractInvariantType<T> {
+public abstract class TemporalType<T> extends InvariantType<T> {
     abstract boolean hasDatePart();
     abstract boolean hasTimePart();
     abstract T createInstance(boolean bc, String aeon, int year, int month, int day, int
hour,

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanType.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanTypeImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanType.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanType.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanTypeImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanTypeImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSBooleanType.java
Sun Dec  6 01:00:02 2015
@@ -20,10 +20,14 @@ package org.apache.axiom.datatype.xsd;
 
 import java.text.ParseException;
 
-import org.apache.axiom.datatype.AbstractInvariantType;
+import org.apache.axiom.datatype.InvariantType;
 import org.apache.axiom.datatype.TypeHelper;
 
-final class XSBooleanTypeImpl extends AbstractInvariantType<Boolean> implements XSBooleanType
{
+public final class XSBooleanType extends InvariantType<Boolean> {
+    public static final XSBooleanType INSTANCE = new XSBooleanType();
+
+    private XSBooleanType() {}
+    
     private static boolean equals(String s1, int start, String s2) {
         for (int i=0, len=s2.length(); i<len; i++) {
             if (s1.charAt(start+i) != s2.charAt(i)) {

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDate.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDate.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDate.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDate.java
Sun Dec  6 01:00:02 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.datatype.xsd;
 
-final class XSDateImpl extends TemporalImpl implements XSDate {
+public final class XSDate extends Temporal {
     private final boolean bc;
     private final String aeon;
     private final int year;
@@ -26,7 +26,7 @@ final class XSDateImpl extends TemporalI
     private final int day;
     private final SimpleTimeZone timeZone;
     
-    XSDateImpl(boolean bc, String aeon, int year, int month, int day, SimpleTimeZone timeZone)
{
+    XSDate(boolean bc, String aeon, int year, int month, int day, SimpleTimeZone timeZone)
{
         this.bc = bc;
         this.aeon = aeon;
         this.year = year;
@@ -101,6 +101,6 @@ final class XSDateImpl extends TemporalI
     }
 
     public XSDateTime getDayStart() {
-        return new XSDateTimeImpl(bc, aeon, year, month, day, 0, 0, 0, 0, null, timeZone);
+        return new XSDateTime(bc, aeon, year, month, day, 0, 0, 0, 0, null, timeZone);
     }
 }

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTime.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTime.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTime.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTime.java
Sun Dec  6 01:00:02 2015
@@ -21,7 +21,7 @@ package org.apache.axiom.datatype.xsd;
 import java.util.Date;
 import java.util.TimeZone;
 
-final class XSDateTimeImpl extends TemporalImpl implements XSDateTime {
+public final class XSDateTime extends Temporal {
     private final boolean bc;
     private final String aeon;
     private final int year;
@@ -34,7 +34,7 @@ final class XSDateTimeImpl extends Tempo
     private final String nanoSecondFraction;
     private final SimpleTimeZone timeZone;
     
-    XSDateTimeImpl(boolean bc, String aeon, int year, int month, int day, int hour, int minute,
+    XSDateTime(boolean bc, String aeon, int year, int month, int day, int hour, int minute,
             int second, int nanoSecond, String nanoSecondFraction, SimpleTimeZone timeZone)
{
         this.bc = bc;
         this.aeon = aeon;
@@ -115,13 +115,22 @@ final class XSDateTimeImpl extends Tempo
     }
 
     public XSDate getDate() {
-        return new XSDateImpl(bc, aeon, year, month, day, timeZone);
+        return new XSDate(bc, aeon, year, month, day, timeZone);
     }
 
     public XSTime getTime() {
-        return new XSTimeImpl(hour, minute, second, nanoSecond, nanoSecondFraction, timeZone);
+        return new XSTime(hour, minute, second, nanoSecond, nanoSecondFraction, timeZone);
     }
 
+    /**
+     * Convert this date/time to a {@link Date} object.
+     * 
+     * @param defaultTimeZone
+     *            the time zone to use if this date/time has no time zone; may be <code>null</code>
+     * @return the {@link Date} object
+     * @throws NoTimeZoneException
+     *             if this date/time doesn't have a time zone and no default time zone was
specified
+     */
     public Date getDate(TimeZone defaultTimeZone) {
         // TODO: fast path for dates in the 20th and 21st century
         return getCalendar(defaultTimeZone).getTime();

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeType.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeTypeImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeType.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeType.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeTypeImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeTypeImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTimeType.java
Sun Dec  6 01:00:02 2015
@@ -18,7 +18,11 @@
  */
 package org.apache.axiom.datatype.xsd;
 
-final class XSDateTimeTypeImpl extends TemporalType<XSDateTime> implements XSDateTimeType
{
+public final class XSDateTimeType extends TemporalType<XSDateTime> {
+    public static final XSDateTimeType INSTANCE = new XSDateTimeType();
+
+    private XSDateTimeType() {}
+    
     @Override
     boolean hasDatePart() {
         return true;
@@ -33,7 +37,7 @@ final class XSDateTimeTypeImpl extends T
     XSDateTime createInstance(boolean bc, String aeon, int year, int month, int day, int
hour,
             int minute, int second, int nanoSecond, String nanoSecondFraction,
             SimpleTimeZone timeZone) {
-        return new XSDateTimeImpl(bc, aeon, year, month, day, hour, minute, second, nanoSecond,
+        return new XSDateTime(bc, aeon, year, month, day, hour, minute, second, nanoSecond,
                 nanoSecondFraction, timeZone);
     }
 }

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateType.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTypeImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateType.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateType.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTypeImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateTypeImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSDateType.java
Sun Dec  6 01:00:02 2015
@@ -18,7 +18,11 @@
  */
 package org.apache.axiom.datatype.xsd;
 
-final class XSDateTypeImpl extends TemporalType<XSDate> implements XSDateType {
+public final class XSDateType extends TemporalType<XSDate> {
+    public static final XSDateType INSTANCE = new XSDateType();
+    
+    private XSDateType() {}
+    
     @Override
     boolean hasDatePart() {
         return true;
@@ -33,6 +37,6 @@ final class XSDateTypeImpl extends Tempo
     XSDate createInstance(boolean bc, String aeon, int year, int month, int day, int hour,
             int minute, int second, int nanoSecond, String nanoSecondFraction,
             SimpleTimeZone timeZone) {
-        return new XSDateImpl(bc, aeon, year, month, day, timeZone);
+        return new XSDate(bc, aeon, year, month, day, timeZone);
     }
 }

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameType.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameTypeImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameType.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameType.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameTypeImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameTypeImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSQNameType.java
Sun Dec  6 01:00:02 2015
@@ -24,11 +24,16 @@ import javax.xml.XMLConstants;
 import javax.xml.namespace.QName;
 
 import org.apache.axiom.datatype.ContextAccessor;
+import org.apache.axiom.datatype.Type;
 import org.apache.axiom.datatype.TypeHelper;
 import org.apache.axiom.datatype.UnexpectedCharacterException;
 import org.apache.axiom.util.xml.NSUtils;
 
-final class XSQNameTypeImpl implements XSQNameType {
+public final class XSQNameType implements Type<QName> {
+    public static final XSQNameType INSTANCE = new XSQNameType();
+
+    private XSQNameType() {}
+
     public <S,O> QName parse(String literal, ContextAccessor<S,O> contextAccessor,
S contextObject, O options)
             throws ParseException {
         final int start = TypeHelper.getStartIndex(literal);

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringType.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringTypeImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringType.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringType.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringTypeImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringTypeImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSStringType.java
Sun Dec  6 01:00:02 2015
@@ -20,9 +20,13 @@ package org.apache.axiom.datatype.xsd;
 
 import java.text.ParseException;
 
-import org.apache.axiom.datatype.AbstractInvariantType;
+import org.apache.axiom.datatype.InvariantType;
 
-final class XSStringTypeImpl extends AbstractInvariantType<String> implements XSStringType
{
+public final class XSStringType extends InvariantType<String> {
+    public static final XSStringType INSTANCE = new XSStringType();
+
+    private XSStringType() {}
+    
     public String parse(String literal) throws ParseException {
         return literal;
     }

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTime.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTime.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTime.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTime.java
Sun Dec  6 01:00:02 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.datatype.xsd;
 
-final class XSTimeImpl extends TemporalImpl implements XSTime {
+public final class XSTime extends Temporal {
     private final int hour;
     private final int minute;
     private final int second;
@@ -26,7 +26,7 @@ final class XSTimeImpl extends TemporalI
     private final String nanoSecondFraction;
     private final SimpleTimeZone timeZone;
     
-    XSTimeImpl(int hour, int minute, int second, int nanoSecond, String nanoSecondFraction,
+    XSTime(int hour, int minute, int second, int nanoSecond, String nanoSecondFraction,
             SimpleTimeZone timeZone) {
         this.hour = hour;
         this.minute = minute;

Copied: webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeType.java
(from r1718137, webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeTypeImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeType.java?p2=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeType.java&p1=webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeTypeImpl.java&r1=1718137&r2=1718139&rev=1718139&view=diff
==============================================================================
--- webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeTypeImpl.java
(original)
+++ webservices/axiom/branches/datatypes/datatypes/src/main/java/org/apache/axiom/datatype/xsd/XSTimeType.java
Sun Dec  6 01:00:02 2015
@@ -18,7 +18,11 @@
  */
 package org.apache.axiom.datatype.xsd;
 
-final class XSTimeTypeImpl extends TemporalType<XSTime> implements XSTimeType {
+public final class XSTimeType extends TemporalType<XSTime> {
+    public static final XSTimeType INSTANCE = new XSTimeType();
+    
+    private XSTimeType() {}
+    
     @Override
     boolean hasDatePart() {
         return false;
@@ -33,6 +37,6 @@ final class XSTimeTypeImpl extends Tempo
     XSTime createInstance(boolean bc, String aeon, int year, int month, int day, int hour,
             int minute, int second, int nanoSecond, String nanoSecondFraction,
             SimpleTimeZone timeZone) {
-        return new XSTimeImpl(hour, minute, second, nanoSecond, nanoSecondFraction, timeZone);
+        return new XSTime(hour, minute, second, nanoSecond, nanoSecondFraction, timeZone);
     }
 }



Mime
View raw message