Examples of XMLCalendar


Examples of org.apache.xmlbeans.XmlCalendar

                // verify that going through gcal gives us the same thing
                GregorianCalendar gcal = gdate.getCalendar();
                Assert.assertEquals(date, gcal.getTime());
               
                // double-check XmlCalendar constructor
                gcal = new XmlCalendar(date);
                Assert.assertEquals("Doing " + gdate, date, gcal.getTime());
            }
            else if (gdate.hasDate() && (gdate.getFraction() == null || gdate.getFraction().scale() <= 3))
            {
                // must be able to get a date if time+timezone is unset (midnight, ltz are assumed)
View Full Code Here

Examples of org.apache.xmlbeans.XmlCalendar

        writer.println("  w.focus();");
        writer.println("}");
        writer.println("</script>");

        writer.println("<h1>XML Schema Test Collection Results</h1>");
        writer.println("<p>Run on " + (new XmlCalendar(new Date())) + "</p>");
        writer.println("<p>Values in schema or instance valid columns are results from compiling or validating respectively.");
        writer.println("Red or orange background mean the test failed.</p>");
        writer.println("<table style='border: 1px solid black' cellpadding=0 cellspacing=0>");
        writer.println("<tr><td witdh=10%>id</td><td width=70%>Description</td><td width=10%>sch v</td><td width=10%>ins v</td></tr>");
        int failures = 0;
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar

    if (name == "java.lang.Object")
    {
      String typeName = getDateTypeName((EDataType)eType);
      if ("Date".equals(typeName))
      {
        return new XMLCalendar(value, XMLCalendar.DATE);
      }
      if ("DateTime".equals(typeName))
      {
        return new XMLCalendar(value, XMLCalendar.DATETIME);
      }
      // Instead of throwing an IllegalArgumentException we will pass the value to the property
      return value;
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public Date createDateFromString(EDataType eDataType, String initialValue)
  {
    XMLCalendar cal = (XMLCalendar) XMLTypeFactory.eINSTANCE.createDate(initialValue);
    return (cal != null) ? cal.getDate() : null;
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public XMLGregorianCalendar createDate(String literal)
  {
    return literal == null null : new XMLCalendar(collapseWhiteSpace(literal), XMLCalendar.DATE);
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar

    }
    if (instanceValue instanceof Date)
    {
      // Bug 124306: we should rely on XMLCalendar to normalize Dave value, to ensure that all Date value
      // fields are taken into account.
      XMLGregorianCalendar value = new XMLCalendar((Date)instanceValue, XMLCalendar.DATE).normalize();
      value.setHour(DatatypeConstants.FIELD_UNDEFINED);
      value.setMinute(DatatypeConstants.FIELD_UNDEFINED);
      value.setSecond(DatatypeConstants.FIELD_UNDEFINED);
      value.setMillisecond(DatatypeConstants.FIELD_UNDEFINED);
      return value.toString();
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public XMLGregorianCalendar createDateTime(String literal)
  {
    return literal == null null : new XMLCalendar(collapseWhiteSpace(literal), XMLCalendar.DATETIME);
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public XMLGregorianCalendar createGDay(String literal)
  {
    return literal == null null : new XMLCalendar(collapseWhiteSpace(literal), XMLCalendar.GDAY);
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public XMLGregorianCalendar createGMonth(String literal)
  {
    return literal == null null : new XMLCalendar(collapseWhiteSpace(literal), XMLCalendar.GMONTH);
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public XMLGregorianCalendar createGMonthDay(String literal)
  {
    return literal == null null : new XMLCalendar(collapseWhiteSpace(literal), XMLCalendar.GMONTHDAY);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.