public final class Dates extends AbstractBaseComponent
In DDMS | 2.0 | 3.0 | 3.1 | 4.0.1/4.1 | 5.0 |
History |
---|
None. |
Nested Elements | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Attributes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Validation Rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Modifier and Type | Class and Description |
---|---|
static class |
Dates.Builder
Builder for this DDMS component.
|
OUTPUT_TEMPLATES
Constructor and Description |
---|
Dates(nu.xom.Element element)
Constructor for creating a component from a XOM Element
|
Dates(List<ApproximableDate> acquiredOns,
String created,
String posted,
String validTil,
String infoCutOff,
String approvedOn,
String receivedOn)
Constructor for creating a component from raw data.
|
Dates(String created,
String posted,
String validTil,
String infoCutOff,
String approvedOn,
String receivedOn)
Deprecated.
A new constructor was added for DDMS 4.1 to support ddms:acquiredOn. This constructor is preserved
for backwards compatibility, but may disappear in the next major release.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Test for logical equality.
|
List<ApproximableDate> |
getAcquiredOns()
Accessor for the acquiredOn dates (0-many optional).
|
javax.xml.datatype.XMLGregorianCalendar |
getApprovedOn()
Accessor for the approved on date.
|
String |
getApprovedOnString()
Accessor for the approved on date.
|
javax.xml.datatype.XMLGregorianCalendar |
getCreated()
Accessor for the created date.
|
String |
getCreatedString()
Accessor for the created date.
|
String |
getHTMLTextOutput(OutputFormat format,
String prefix,
String suffix)
Renders this component as HTML or Text, with an optional prefix to nest it.
|
javax.xml.datatype.XMLGregorianCalendar |
getInfoCutOff()
Accessor for the cutoff date.
|
String |
getInfoCutOffString()
Accessor for the cutoff date.
|
com.google.gson.JsonObject |
getJSONObject()
Renders this component as a JSON object, which can either be converted to a JSON string or inserted into the
parent JSON object.
|
static String |
getName(DDMSVersion version)
Accessor for the element name of this component, based on the version of DDMS used
|
protected List<IDDMSComponent> |
getNestedComponents()
Accessor for a collection of nested components.
|
javax.xml.datatype.XMLGregorianCalendar |
getPosted()
Accessor for the posted date.
|
String |
getPostedString()
Accessor for the posted date.
|
javax.xml.datatype.XMLGregorianCalendar |
getReceivedOn()
Accessor for the received on date.
|
String |
getReceivedOnString()
Accessor for the received on date.
|
javax.xml.datatype.XMLGregorianCalendar |
getValidTil()
Accessor for the expiration date.
|
String |
getValidTilString()
Accessor for the expiration date.
|
int |
hashCode()
Returns a hashcode for the component.
|
protected void |
validate()
Base case for validation.
|
protected void |
validateWarnings()
Base case for warnings.
|
addDdms40Warning, addJson, addJson, addJson, addJson, addWarning, addWarnings, buildHTMLTextOutput, buildHTMLTextOutput, buildIndex, buildPrefix, getAttributeValue, getAttributeValue, getChild, getChildTextAsDouble, getDDMSVersion, getLocatorSuffix, getName, getNamespace, getPrefix, getQualifiedName, getSecurityAttributes, getValidationWarnings, getXOMElement, getXOMElementCopy, requireAtLeastVersion, requireAtMostVersion, setXOMElement, toHTML, toJSON, toString, toText, toXML
public Dates(nu.xom.Element element) throws InvalidDDMSException
element
- the XOM element representing thisInvalidDDMSException
- if any required information is missing or malformedpublic Dates(String created, String posted, String validTil, String infoCutOff, String approvedOn, String receivedOn) throws InvalidDDMSException
created
- the creation dateposted
- the posting datevalidTil
- the expiration dateinfoCutOff
- the info cutoff dateapprovedOn
- the approved on datereceivedOn
- the received on dateInvalidDDMSException
- if any required information is missing or malformedpublic Dates(List<ApproximableDate> acquiredOns, String created, String posted, String validTil, String infoCutOff, String approvedOn, String receivedOn) throws InvalidDDMSException
acquiredOns
- the acquisition datescreated
- the creation dateposted
- the posting datevalidTil
- the expiration dateinfoCutOff
- the info cutoff dateapprovedOn
- the approved on datereceivedOn
- the received on dateInvalidDDMSException
- if any required information is missing or malformedprotected void validate() throws InvalidDDMSException
AbstractBaseComponent
validate
in class AbstractBaseComponent
InvalidDDMSException
AbstractBaseComponent.validate()
protected void validateWarnings()
AbstractBaseComponent
validateWarnings
in class AbstractBaseComponent
AbstractBaseComponent.validateWarnings()
public com.google.gson.JsonObject getJSONObject()
AbstractBaseComponent
getJSONObject
in class AbstractBaseComponent
AbstractBaseComponent.getJSONObject()
public String getHTMLTextOutput(OutputFormat format, String prefix, String suffix)
AbstractBaseComponent
I consider this to be an internal method, that unfortunately must be marked as public to allow cross-package access when generating output. Use toHTML() and toText() as the formal, public methods to generate output.
getHTMLTextOutput
in class AbstractBaseComponent
format
- the desired format of this outputprefix
- an optional prefix to put on each name.suffix
- an optional suffix to append to each name, such as an index.AbstractBaseComponent.getHTMLTextOutput(OutputFormat, String, String)
protected List<IDDMSComponent> getNestedComponents()
AbstractBaseComponent
getNestedComponents
in class AbstractBaseComponent
AbstractBaseComponent.getNestedComponents()
public boolean equals(Object obj)
AbstractBaseComponent
The base case tests against the name value and namespaceURI, as well as any child components classified as "nested components" and any security attributes. Extending classes may require additional rules for equality. This case automatically includes any nested components or security attributes.
equals
in class AbstractBaseComponent
Object.equals(Object)
public int hashCode()
AbstractBaseComponent
This automatically includes any nested components or security attributes.
hashCode
in class AbstractBaseComponent
Object.hashCode()
public static String getName(DDMSVersion version)
version
- the DDMSVersionpublic javax.xml.datatype.XMLGregorianCalendar getCreated()
DDMS 4.1 added a new allowable date format (ddms:DateHourMinType). This method will convert values of that
type into an XMLGregorianCalendar, using intelligent defaults for any missing information (e.g. 00 for seconds).
getCreatedString()
will return the raw XML format without any assumptions.
public String getCreatedString()
public javax.xml.datatype.XMLGregorianCalendar getPosted()
DDMS 4.1 added a new allowable date format (ddms:DateHourMinType). This method will convert values of that
type into an XMLGregorianCalendar, using intelligent defaults for any missing information (e.g. 00 for seconds).
getPostedString()
will return the raw XML format without any assumptions.
public String getPostedString()
public javax.xml.datatype.XMLGregorianCalendar getValidTil()
DDMS 4.1 added a new allowable date format (ddms:DateHourMinType). This method will convert values of that
type into an XMLGregorianCalendar, using intelligent defaults for any missing information (e.g. 00 for seconds).
getValidTilString()
will return the raw XML format without any assumptions.
public String getValidTilString()
public javax.xml.datatype.XMLGregorianCalendar getInfoCutOff()
DDMS 4.1 added a new allowable date format (ddms:DateHourMinType). This method will convert values of that
type into an XMLGregorianCalendar, using intelligent defaults for any missing information (e.g. 00 for seconds).
getInfoCutOffString()
will return the raw XML format without any assumptions.
public String getInfoCutOffString()
public javax.xml.datatype.XMLGregorianCalendar getApprovedOn()
DDMS 4.1 added a new allowable date format (ddms:DateHourMinType). This method will convert values of that
type into an XMLGregorianCalendar, using intelligent defaults for any missing information (e.g. 00 for seconds).
getApprovedOnString()
will return the raw XML format without any assumptions.
public String getApprovedOnString()
public javax.xml.datatype.XMLGregorianCalendar getReceivedOn()
DDMS 4.1 added a new allowable date format (ddms:DateHourMinType). This method will convert values of that
type into an XMLGregorianCalendar, using intelligent defaults for any missing information (e.g. 00 for seconds).
getReceivedOnString()
will return the raw XML format without any assumptions.
public String getReceivedOnString()
public List<ApproximableDate> getAcquiredOns()
Copyright 2010 - 2019 by Brian Uri!
Generated on 09/15/2016 12:36 PM
https://ddmsence.urizone.net/