Package org.rumbledb.items
Class DateItem
java.lang.Object
org.rumbledb.items.AbstractAtomicItem
org.rumbledb.items.DateItem
- All Implemented Interfaces:
Serializable,Item
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncopy(boolean mutable) Makes a copy.Returns the dateTime value of the item, if it is an atomic item of type dateTimeItem or dateItem or timeItem.intgetDay()Return only day of the item, if it's DateTime or Duration It will not convert months and years into days.Returns the dynamic type of the item (only for error message purposes).booleanReturns the effective boolean value of the item, if atomic.longReturns the EpochMillis of the item, if it's DateTime or Duration It will collect all the parts of the item and compress it into the EpochMillisintgetMonth()Return only month of the item, if it's DateTime or Duration It will not convert years into monthsintOffset is an integer between −840 and 840 inclusiveReturns the SparkSQL type of the item for use in a query.Returns the string value of the item, if it is an atomic item.Returns the Object containing the converted value of the item for a DataFrame.intgetYear()Return year of the item, if it's DateTime or DurationbooleanTests whether the item contains a representation of date or time (or both).booleanbooleanisAtomic()Tests whether the item is an atomic item.booleanisDate()Tests whether the item is an atomic item of type date.Methods inherited from class org.rumbledb.items.AbstractAtomicItem
equals, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.rumbledb.api.Item
addOrReplaceNamespace, addParentToDescendants, appendItem, appendSequence, atomizedValue, attributes, baseUri, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, children, clearSchemaType, declaredNamespaceNodes, documentUri, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getCollection, getContent, getDayTimeDurationComponent, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEstimator, getFloatValue, getHour, getIdentifier, getIntegerValue, getIntValue, getItemAt, getItemByKey, getItemByKey, getItemKeys, getItemMembers, getItemValues, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMutabilityLevel, getNanosecond, getNotationValue, getParameterNames, getPathIn, getPeriodValue, getQNameValue, getRDDVariablesInClosure, getSchemaTypeAnnotation, getSecond, getSequenceAt, getSequenceByKey, getSequenceByKey, getSequenceMembers, getSequenceValues, getSignature, getSize, getSparkSQLValue, getSparkSQLValue, getStringKeys, getTableLocation, getTextValue, getTimeValue, getTopLevelID, getTopLevelOrder, getTransformer, getXmlDocumentPosition, hasKey, hasKey, isAnyURI, isArray, isArrayOfItems, isAttributeNode, isBase64Binary, isBinary, isBoolean, isBuiltinFunction, isCommentNode, isDateTime, isDayTimeDuration, isDecimal, isDocumentNode, isDouble, isDuration, isElementNode, isEstimator, isFloat, isFunction, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isId, isIdrefs, isInt, isInteger, isMap, isNamespaceNode, isNaN, isNode, isNotation, isNull, isNumeric, isObject, isPeriod, isProcessingInstructionNode, isQName, isString, isTextNode, isTime, isTransformer, isUntypedAtomic, isYearMonthDuration, namespaceNodes, nilled, nodeKind, nodeName, parent, physicalEquals, putItemAt, putItemByKey, putItemByKey, putItemsAt, putLazyItemByKey, putSequenceAt, putSequenceByKey, putSequenceByKey, putSequencesAt, removeItemAt, removeItemByKey, removeItemByKey, removeSequenceAt, serialize, serializeAsJSON, setCollection, setMutabilityLevel, setParent, setPathIn, setSchemaType, setSchemaType, setTableLocation, setTopLevelID, setTopLevelOrder, setXmlDocumentPosition, setXmlSchemaIdentityProperties, setXmlSchemaNilled, typedValue, typeName, unparsedEntityPublicId, unparsedEntitySystemId
-
Method Details
-
copy
Description copied from interface:ItemMakes a copy.- Parameters:
mutable- whether the copy should be mutable (if supported by the item).- Returns:
- a copy
-
getStringValue
Description copied from interface:ItemReturns the string value of the item, if it is an atomic item.- Returns:
- the string value.
-
isDate
public boolean isDate()Description copied from interface:ItemTests whether the item is an atomic item of type date.- Returns:
- true if it is an atomic item of type date, false otherwise.
-
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:ItemReturns the effective boolean value of the item, if atomic.- Returns:
- the effective boolean value.
-
hasDateTime
public boolean hasDateTime()Description copied from interface:ItemTests whether the item contains a representation of date or time (or both).- Returns:
- true if it is an atomic item of type time, date or dateTime, false otherwise.
-
getDynamicType
Description copied from interface:ItemReturns the dynamic type of the item (only for error message purposes).- Returns:
- the dynamic type as an item type.
-
isAtomic
public boolean isAtomic()Description copied from interface:ItemTests whether the item is an atomic item.- Returns:
- true if it is an atomic item, false otherwise.
-
getSparkSQLType
Description copied from interface:ItemReturns the SparkSQL type of the item for use in a query.- Returns:
- String representing the SparkSQL type of the item.
-
getMonth
public int getMonth()Description copied from interface:ItemReturn only month of the item, if it's DateTime or Duration It will not convert years into months- Returns:
- only month
-
getYear
public int getYear()Description copied from interface:ItemReturn year of the item, if it's DateTime or Duration- Returns:
- year
-
getDay
public int getDay()Description copied from interface:ItemReturn only day of the item, if it's DateTime or Duration It will not convert months and years into days.- Returns:
- only day
-
getOffset
public int getOffset()Description copied from interface:ItemOffset is an integer between −840 and 840 inclusive- Returns:
- offset in minutes
-
hasTimeZone
public boolean hasTimeZone()- Returns:
- true if the Item has a timeZone, false otherwise
-
getDateTimeValue
Description copied from interface:ItemReturns the dateTime value of the item, if it is an atomic item of type dateTimeItem or dateItem or timeItem.- Returns:
- the dateTime value as a OffsetDateTime.
-
getVariantValue
Description copied from interface:ItemReturns the Object containing the converted value of the item for a DataFrame. For use to build Variant columns.- Returns:
- Object representing the converted value of the item.
-
getEpochMillis
public long getEpochMillis()Description copied from interface:ItemReturns the EpochMillis of the item, if it's DateTime or Duration It will collect all the parts of the item and compress it into the EpochMillis- Returns:
- the EpochMillis
-