org.opensaml.xml.schema.impl
Class XSDateTimeImpl

java.lang.Object
  extended by org.opensaml.xml.AbstractXMLObject
      extended by org.opensaml.xml.validation.AbstractValidatingXMLObject
          extended by org.opensaml.xml.schema.impl.XSDateTimeImpl
All Implemented Interfaces:
XSDateTime, ValidatingXMLObject, XMLObject

public class XSDateTimeImpl
extends AbstractValidatingXMLObject
implements XSDateTime

Concrete implementation of XSDateTime.


Field Summary
private  DateTimeFormatter formatter
          The date time formatter to use.
private  DateTime value
          Value of this dateTime element.
 
Fields inherited from interface org.opensaml.xml.schema.XSDateTime
TYPE_LOCAL_NAME, TYPE_NAME
 
Constructor Summary
protected XSDateTimeImpl(String namespaceURI, String elementLocalName, String namespacePrefix)
          Constructor.
 
Method Summary
 DateTimeFormatter getDateTimeFormatter()
          Get the DateTimeFormatter to be used when stringifying the DateTime value.
 List<XMLObject> getOrderedChildren()
          Gets an unmodifiable list of child elements in the order that they will appear in the DOM.
 DateTime getValue()
          Gets the dateTime value.
 void setDateTimeFormatter(DateTimeFormatter newFormatter)
          Set the DateTimeFormatter to be used when stringifying the DateTime value.
 void setValue(DateTime newValue)
          Sets the dateTime value.
 
Methods inherited from class org.opensaml.xml.validation.AbstractValidatingXMLObject
deregisterValidator, getValidators, registerValidator, validate, validateChildren
 
Methods inherited from class org.opensaml.xml.AbstractXMLObject
addNamespace, detach, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, removeNamespace, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensaml.xml.validation.ValidatingXMLObject
deregisterValidator, getValidators, registerValidator, validate
 
Methods inherited from interface org.opensaml.xml.XMLObject
addNamespace, detach, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, removeNamespace, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation
 

Field Detail

value

private DateTime value
Value of this dateTime element.


formatter

private DateTimeFormatter formatter
The date time formatter to use.

Constructor Detail

XSDateTimeImpl

protected XSDateTimeImpl(String namespaceURI,
                         String elementLocalName,
                         String namespacePrefix)
Constructor.

Parameters:
namespaceURI - the namespace the element is in
elementLocalName - the local name of the XML element this Object represents
namespacePrefix - the prefix for the given namespace
Method Detail

getValue

public DateTime getValue()
Gets the dateTime value.

Specified by:
getValue in interface XSDateTime
Returns:
the dateTime value

setValue

public void setValue(DateTime newValue)
Sets the dateTime value.

Specified by:
setValue in interface XSDateTime
Parameters:
newValue - the dateTime value

getOrderedChildren

public List<XMLObject> getOrderedChildren()
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.

Specified by:
getOrderedChildren in interface XMLObject
Returns:
ordered list of child elements

getDateTimeFormatter

public DateTimeFormatter getDateTimeFormatter()
Get the DateTimeFormatter to be used when stringifying the DateTime value.

Defaults to the formatter constructed by calling: org.joda.time.format.ISODateTimeFormat.dateTime().withChronology(org.joda.time.chrono.ISOChronology.getInstanceUTC()

Specified by:
getDateTimeFormatter in interface XSDateTime
Returns:
the currently configured formatter

setDateTimeFormatter

public void setDateTimeFormatter(DateTimeFormatter newFormatter)
Set the DateTimeFormatter to be used when stringifying the DateTime value.

Defaults to the formatter constructed by calling: org.joda.time.format.ISODateTimeFormat.dateTime().withChronology(org.joda.time.chrono.ISOChronology.getInstanceUTC()

Specified by:
setDateTimeFormatter in interface XSDateTime
Parameters:
newFormatter - the new formatter


Copyright © 1999-2013. All Rights Reserved.