src/javax/xml/datatype/DatatypeFactory.java

Print this page




 102      */
 103     public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS =
 104         // We use new String() here to prevent javadoc from generating
 105         // a See Also: Constant Field Value link.
 106         new String("com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl");
 107 
 108     /**
 109      * http://www.w3.org/TR/xpath-datamodel/#xdtschema defines two regexps
 110      * to constrain the value space of dayTimeDuration ([^YM]*[DT].*)
 111      * and yearMonthDuration ([^DT]*). Note that these expressions rely on
 112      * the fact that the value must be an xs:Duration, they simply exclude
 113      * some Durations.
 114      */
 115     private static final Pattern XDTSCHEMA_YMD =
 116         Pattern.compile("[^DT]*");
 117 
 118     private static final Pattern XDTSCHEMA_DTD =
 119         Pattern.compile("[^YM]*[DT].*");
 120 
 121     /**
 122      * <p>Protected constructor to prevent instaniation outside of package.</p>
 123      *
 124      * <p>Use {@link #newInstance()} to create a <code>DatatypeFactory</code>.</p>
 125      */
 126     protected DatatypeFactory() {
 127     }
 128 
 129     /**
 130      * <p>Obtain a new instance of a <code>DatatypeFactory</code>.</p>
 131      *
 132      * <p>The implementation resolution mechanisms are <a href="#DatatypeFactory.newInstance">defined</a> in this
 133      * <code>Class</code>'s documentation.</p>
 134      *
 135      * @return New instance of a <code>DatatypeFactory</code>
 136      *
 137      * @throws DatatypeConfigurationException If the implementation is not
 138      *   available or cannot be instantiated.
 139      *
 140      * @see #newInstance(String factoryClassName, ClassLoader classLoader)
 141      */
 142     public static DatatypeFactory newInstance()




 102      */
 103     public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS =
 104         // We use new String() here to prevent javadoc from generating
 105         // a See Also: Constant Field Value link.
 106         new String("com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl");
 107 
 108     /**
 109      * http://www.w3.org/TR/xpath-datamodel/#xdtschema defines two regexps
 110      * to constrain the value space of dayTimeDuration ([^YM]*[DT].*)
 111      * and yearMonthDuration ([^DT]*). Note that these expressions rely on
 112      * the fact that the value must be an xs:Duration, they simply exclude
 113      * some Durations.
 114      */
 115     private static final Pattern XDTSCHEMA_YMD =
 116         Pattern.compile("[^DT]*");
 117 
 118     private static final Pattern XDTSCHEMA_DTD =
 119         Pattern.compile("[^YM]*[DT].*");
 120 
 121     /**
 122      * <p>Protected constructor to prevent instantiation outside of package.</p>
 123      *
 124      * <p>Use {@link #newInstance()} to create a <code>DatatypeFactory</code>.</p>
 125      */
 126     protected DatatypeFactory() {
 127     }
 128 
 129     /**
 130      * <p>Obtain a new instance of a <code>DatatypeFactory</code>.</p>
 131      *
 132      * <p>The implementation resolution mechanisms are <a href="#DatatypeFactory.newInstance">defined</a> in this
 133      * <code>Class</code>'s documentation.</p>
 134      *
 135      * @return New instance of a <code>DatatypeFactory</code>
 136      *
 137      * @throws DatatypeConfigurationException If the implementation is not
 138      *   available or cannot be instantiated.
 139      *
 140      * @see #newInstance(String factoryClassName, ClassLoader classLoader)
 141      */
 142     public static DatatypeFactory newInstance()