Package org.apache.xmpbox.type
Class DateType
- java.lang.Object
-
- org.apache.xmpbox.type.AbstractField
-
- org.apache.xmpbox.type.AbstractSimpleProperty
-
- org.apache.xmpbox.type.DateType
-
public class DateType extends AbstractSimpleProperty
Object representation of a Date XMP type
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Calendar
dateValue
-
Constructor Summary
Constructors Constructor Description DateType(XMPMetadata metadata, java.lang.String namespaceURI, java.lang.String prefix, java.lang.String propertyName, java.lang.Object value)
Property Date type constructor (namespaceURI is given)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getStringValue()
Return the property valuejava.util.Calendar
getValue()
return the property valueprivate boolean
isGoodType(java.lang.Object value)
Check if the value has a type which can be understoodvoid
setValue(java.lang.Object value)
Set value of this propertyprivate void
setValueFromCalendar(java.util.Calendar value)
Set property valueprivate void
setValueFromString(java.lang.String value)
Set the property value with a String-
Methods inherited from class org.apache.xmpbox.type.AbstractSimpleProperty
getNamespace, getPrefix, getRawValue, toString
-
Methods inherited from class org.apache.xmpbox.type.AbstractField
containsAttribute, getAllAttributes, getAttribute, getMetadata, getPropertyName, removeAttribute, setAttribute, setPropertyName
-
-
-
-
Constructor Detail
-
DateType
public DateType(XMPMetadata metadata, java.lang.String namespaceURI, java.lang.String prefix, java.lang.String propertyName, java.lang.Object value)
Property Date type constructor (namespaceURI is given)- Parameters:
metadata
- The metadata to attach to this propertynamespaceURI
- the namespace URI to associate to this propertyprefix
- The prefix to set for this propertypropertyName
- The local Name of this propertyvalue
- The value to set for this property
-
-
Method Detail
-
setValueFromCalendar
private void setValueFromCalendar(java.util.Calendar value)
Set property value- Parameters:
value
- the new Calendar element value
-
getValue
public java.util.Calendar getValue()
return the property value- Specified by:
getValue
in classAbstractSimpleProperty
- Returns:
- boolean
-
isGoodType
private boolean isGoodType(java.lang.Object value)
Check if the value has a type which can be understood- Parameters:
value
- Object value to check- Returns:
- True if types are compatibles
-
setValue
public void setValue(java.lang.Object value)
Set value of this property- Specified by:
setValue
in classAbstractSimpleProperty
- Parameters:
value
- The value to set
-
getStringValue
public java.lang.String getStringValue()
Description copied from class:AbstractSimpleProperty
Return the property value- Specified by:
getStringValue
in classAbstractSimpleProperty
- Returns:
- a string
-
setValueFromString
private void setValueFromString(java.lang.String value)
Set the property value with a String- Parameters:
value
- The String value
-
-