Java Doc for AbstractDateTimeDV.java in  » XML » xerces-2_9_1 » org » apache » xerces » impl » dv » xs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xerces 2_9_1 » org.apache.xerces.impl.dv.xs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.impl.dv.xs.TypeValidator
      org.apache.xerces.impl.dv.xs.AbstractDateTimeDV

All known Subclasses:   org.apache.xerces.impl.dv.xs.DateTimeDV,  org.apache.xerces.impl.dv.xs.MonthDayDV,  org.apache.xerces.impl.dv.xs.DurationDV,  org.apache.xerces.impl.dv.xs.YearMonthDV,  org.apache.xerces.impl.dv.xs.TimeDV,  org.apache.xerces.impl.dv.xs.MonthDV,  org.apache.xerces.impl.dv.xs.DayDV,  org.apache.xerces.impl.dv.xs.YearDV,
AbstractDateTimeDV
abstract public class AbstractDateTimeDV extends TypeValidator (Code)
This is the base class of all date/time datatype validators. It implements common code for parsing, validating and comparing datatypes. Classes that extend this class, must implement parse() method. REVISIT: There are many instance variables, which would cause problems when we support grammar caching. A grammar is possibly used by two parser instances at the same time, then the same simple type decl object can be used to validate two strings at the same time. -SG
author:
   Elena Litani
author:
   Len Berman
author:
   Gopal Sharma, SUN Microsystems Inc.
version:
   $Id: AbstractDateTimeDV.java 572095 2007-09-02 18:32:43Z mrglavas $

Inner Class :final static class DateTimeData implements XSDateTime

Field Summary
final protected static  intDAY
    
final protected static  intMONTH
    
final protected static  intYEAR
    
final protected  DatatypeFactoryfactory
    


Method Summary
final protected  voidappend(StringBuffer message, int value, int nch)
    
final protected  voidappend(StringBuffer message, double value)
    
final protected  voidappend2(StringBuffer message, double value)
    
public  intcompare(Object value1, Object value2)
    
protected  shortcompareDates(DateTimeData date1, DateTimeData date2, boolean strict)
     Compare algorithm described in dateDime (3.2.7).
protected  shortcompareOrder(DateTimeData date1, DateTimeData date2)
     Given normalized values, determines order-relation between give date/time objects.
protected  StringdateToString(DateTimeData date)
    
protected  intfQuotient(int a, int b)
    
protected  intfQuotient(int temp, int low, int high)
    
protected  intfindUTCSign(String buffer, int start, int end)
    
public  shortgetAllowedFacets()
    
protected  intgetDate(String buffer, int start, int end, DateTimeData date)
    
protected  DurationgetDuration(DateTimeData data)
    
protected  voidgetTime(String buffer, int start, int end, DateTimeData data)
    
protected  voidgetTimeZone(String buffer, DateTimeData data, int sign, int end)
    
protected  XMLGregorianCalendargetXMLGregorianCalendar(DateTimeData data)
    
protected  intgetYearMonth(String buffer, int start, int end, DateTimeData date)
    
protected  intindexOf(String buffer, int start, int end, char ch)
    
public  booleanisIdentical(Object value1, Object value2)
    
final protected  booleanisNextCharUTCSign(String buffer, int start, int end)
     Returns true if the character at start is 'Z', '+' or '-'.
protected  intmaxDayInMonthFor(int year, int month)
    
protected  intmod(int a, int b, int quotient)
    
protected  intmodulo(int temp, int low, int high)
    
protected  voidnormalize(DateTimeData date)
    
protected  intparseInt(String buffer, int start, int end)
    
protected  intparseIntYear(String buffer, int end)
    
protected  doubleparseSecond(String buffer, int start, int end)
    
protected  voidparseTimeZone(String buffer, int start, int end, DateTimeData date)
     Shared code from Date and YearMonth datatypes.
protected  voidresetDateObj(DateTimeData data)
    
protected  voidsaveUnnormalized(DateTimeData date)
    
protected  voidvalidateDateTime(DateTimeData data)
    

Field Detail
DAY
final protected static int DAY(Code)



MONTH
final protected static int MONTH(Code)



YEAR
final protected static int YEAR(Code)



factory
final protected DatatypeFactory factory(Code)





Method Detail
append
final protected void append(StringBuffer message, int value, int nch)(Code)



append
final protected void append(StringBuffer message, double value)(Code)



append2
final protected void append2(StringBuffer message, double value)(Code)



compare
public int compare(Object value1, Object value2)(Code)



compareDates
protected short compareDates(DateTimeData date1, DateTimeData date2, boolean strict)(Code)
Compare algorithm described in dateDime (3.2.7). Duration datatype overwrites this method
Parameters:
  date1 - normalized date representation of the first value
Parameters:
  date2 - normalized date representation of the second value
Parameters:
  strict - less, greater, less_equal, greater_equal, equal



compareOrder
protected short compareOrder(DateTimeData date1, DateTimeData date2)(Code)
Given normalized values, determines order-relation between give date/time objects.
Parameters:
  date1 - date/time object
Parameters:
  date2 - date/time object 0 if date1 and date2 are equal, a value less than 0 if date1 is less than date2, a value greater than 0 if date1 is greater than date2



dateToString
protected String dateToString(DateTimeData date)(Code)



fQuotient
protected int fQuotient(int a, int b)(Code)



fQuotient
protected int fQuotient(int temp, int low, int high)(Code)



findUTCSign
protected int findUTCSign(String buffer, int start, int end)(Code)
Return index of UTC char: 'Z', '+', '-'
Parameters:
  start -
Parameters:
  end - index of the UTC character that was found



getAllowedFacets
public short getAllowedFacets()(Code)



getDate
protected int getDate(String buffer, int start, int end, DateTimeData date) throws RuntimeException(Code)
Parses date CCYY-MM-DD
Parameters:
  buffer -
Parameters:
  start - start position
Parameters:
  end - end position
Parameters:
  date -
exception:
  RuntimeException -



getDuration
protected Duration getDuration(DateTimeData data)(Code)



getTime
protected void getTime(String buffer, int start, int end, DateTimeData data) throws RuntimeException(Code)
Parses time hh:mm:ss.sss and time zone if any
Parameters:
  start -
Parameters:
  end -
Parameters:
  data -
exception:
  RuntimeException -



getTimeZone
protected void getTimeZone(String buffer, DateTimeData data, int sign, int end) throws RuntimeException(Code)
Parses time zone: 'Z' or {+,-} followed by hh:mm
Parameters:
  data -
Parameters:
  sign -
exception:
  RuntimeException -



getXMLGregorianCalendar
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData data)(Code)



getYearMonth
protected int getYearMonth(String buffer, int start, int end, DateTimeData date) throws RuntimeException(Code)
Parses date CCYY-MM
Parameters:
  buffer -
Parameters:
  start - start position
Parameters:
  end - end position
Parameters:
  date -
exception:
  RuntimeException -



indexOf
protected int indexOf(String buffer, int start, int end, char ch)(Code)
Computes index of given char within StringBuffer
Parameters:
  start -
Parameters:
  end -
Parameters:
  ch - character to look for in StringBuffer index of ch within StringBuffer



isIdentical
public boolean isIdentical(Object value1, Object value2)(Code)



isNextCharUTCSign
final protected boolean isNextCharUTCSign(String buffer, int start, int end)(Code)
Returns true if the character at start is 'Z', '+' or '-'.



maxDayInMonthFor
protected int maxDayInMonthFor(int year, int month)(Code)
Given {year,month} computes maximum number of days for given month
Parameters:
  year -
Parameters:
  month - integer containg the number of days in a given month



mod
protected int mod(int a, int b, int quotient)(Code)



modulo
protected int modulo(int temp, int low, int high)(Code)



normalize
protected void normalize(DateTimeData date)(Code)
If timezone present - normalize dateTime [E Adding durations to dateTimes]
Parameters:
  date - CCYY-MM-DDThh:mm:ss+03



parseInt
protected int parseInt(String buffer, int start, int end) throws NumberFormatException(Code)
Given start and end position, parses string value
Parameters:
  buffer - string to parse
Parameters:
  start - start position
Parameters:
  end - end position return integer representation of characters



parseIntYear
protected int parseIntYear(String buffer, int end)(Code)



parseSecond
protected double parseSecond(String buffer, int start, int end) throws NumberFormatException(Code)



parseTimeZone
protected void parseTimeZone(String buffer, int start, int end, DateTimeData date) throws RuntimeException(Code)
Shared code from Date and YearMonth datatypes. Finds if time zone sign is present
Parameters:
  end -
Parameters:
  date -
exception:
  RuntimeException -



resetDateObj
protected void resetDateObj(DateTimeData data)(Code)
Resets object representation of date/time
Parameters:
  data - date/time object



saveUnnormalized
protected void saveUnnormalized(DateTimeData date)(Code)

Parameters:
  date -



validateDateTime
protected void validateDateTime(DateTimeData data)(Code)
Validates given date/time object accoring to W3C PR Schema [D.1 ISO 8601 Conventions]
Parameters:
  data -



Fields inherited from org.apache.xerces.impl.dv.xs.TypeValidator
final public static short EQUAL(Code)(Java Doc)
final public static short GREATER_THAN(Code)(Java Doc)
final public static short INDETERMINATE(Code)(Java Doc)
final public static short LESS_THAN(Code)(Java Doc)

Methods inherited from org.apache.xerces.impl.dv.xs.TypeValidator
public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException(Code)(Java Doc)
public int compare(Object value1, Object value2)(Code)(Java Doc)
abstract public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException(Code)(Java Doc)
abstract public short getAllowedFacets()(Code)(Java Doc)
public int getDataLength(Object value)(Code)(Java Doc)
final public static int getDigit(char ch)(Code)(Java Doc)
public int getFractionDigits(Object value)(Code)(Java Doc)
public int getTotalDigits(Object value)(Code)(Java Doc)
final public static boolean isDigit(char ch)(Code)(Java Doc)
public boolean isIdentical(Object value1, Object value2)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.