public class DateFormatter extends SingleContextDocumentProcessor implements com.exalead.util.Checkable, java.io.Serializable
SingleContextDocumentProcessor.Transformer<T>
DocumentProcessor.FromDataModel
Modifier and Type | Field and Description |
---|---|
java.lang.String |
dateOutputContext |
java.lang.String |
dateOutputFormat |
java.lang.String |
dateTimeOutputContext |
java.lang.String |
dateTimeOutputFormat |
static boolean |
DEFAULT_REMOVE_ORIGINAL_CHUNK |
java.lang.String |
inputFormat |
boolean |
removeOriginalChunk |
java.lang.String |
timeOutputContext |
java.lang.String |
timeOutputFormat |
inputContext
acceptCondition, dataModelClass, dataModelProperty, dataModelState, DEFAULT_DISABLED, disabled, fromDataModel, name
Constructor and Description |
---|
DateFormatter() |
DateFormatter(DateFormatter o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(DocumentProcessor.Transformer<T> transformer,
T[] t) |
<T> T |
accept(SingleContextDocumentProcessor.Transformer<T> transformer,
T[] t) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this DateFormatter.
|
static DateFormatter |
fromString(java.lang.String s)
String representation of this DateFormatter.
|
java.lang.String |
getDateOutputContext()
Suffix for the name of the DocumentChunk containing the date as defined by dateOutputFormat (default YYYY/MM/DD).
The original name of the input DocumentChunk and this suffix are concatenated ($orig$dateTimeOutputContext) to produce the name actually used. This DocumentChunk is usually remapped to a category for navigation. |
java.lang.String |
getDateOutputFormat()
A date output format compliant with libc's strftime.
|
java.lang.String |
getDateTimeOutputContext()
Suffix for the name of the DocumentChunk containing the date as defined by dateTimeOutputFormat (default YYYY/MM/DD-HH:MM:SS).
The original ContextName of the input DocumentChunk and this suffix are concatenated ($orig$dateTimeOutputContext) to produce the ContextName actually used. This DocumentChunk is usually used for date display. |
java.lang.String |
getDateTimeOutputFormat()
A date and time output format compliant with libc's strftime.
|
java.lang.String |
getInputFormat()
An optional date input format, compliant with libc's
strptime() format.If such a format is provided, the automatic date format heuristic is disabled, and the provided date format is used exclusively. Documentation of accepted formats: (days and month literals are only recognized in English) Day %a: weekday abbreviated ("Mon", ...) %A: weekday full ("Monday", ...) %d: day of the month, zero filled [01-31] %e: Equivalent to %d [1-31] %j: day year, zero filled [001-366] %u: day of week starting with Monday (1), i.e. |
java.lang.String |
getTimeOutputContext()
Suffix for the name of the DocumentChunk containing the date as defined by timeOutputFormat (default HH:MM:SS).
The original name of the input DocumentChunk and this suffix are concatenated ($orig$dateTimeOutputContext) to produce the name actually used. |
java.lang.String |
getTimeOutputFormat()
A time output format compliant with libc's strftime.
|
boolean |
isRemoveOriginalChunk()
Removes the original input chunk.
|
DateFormatter |
makeCopy()
Creates and returns a deep copy of this DateFormatter.
|
static DateFormatter |
readFrom(java.io.InputStream is)
Read this DateFormatter from an XML fragment.
|
void |
setDateOutputContext(java.lang.String dateOutputContext)
Suffix for the name of the DocumentChunk containing the date as defined by dateOutputFormat (default YYYY/MM/DD).
The original name of the input DocumentChunk and this suffix are concatenated ($orig$dateTimeOutputContext) to produce the name actually used. This DocumentChunk is usually remapped to a category for navigation. |
void |
setDateOutputFormat(java.lang.String dateOutputFormat)
A date output format compliant with libc's strftime.
|
void |
setDateTimeOutputContext(java.lang.String dateTimeOutputContext)
Suffix for the name of the DocumentChunk containing the date as defined by dateTimeOutputFormat (default YYYY/MM/DD-HH:MM:SS).
The original ContextName of the input DocumentChunk and this suffix are concatenated ($orig$dateTimeOutputContext) to produce the ContextName actually used. This DocumentChunk is usually used for date display. |
void |
setDateTimeOutputFormat(java.lang.String dateTimeOutputFormat)
A date and time output format compliant with libc's strftime.
|
void |
setInputFormat(java.lang.String inputFormat)
An optional date input format, compliant with libc's
strptime() format.If such a format is provided, the automatic date format heuristic is disabled, and the provided date format is used exclusively. Documentation of accepted formats: (days and month literals are only recognized in English) Day %a: weekday abbreviated ("Mon", ...) %A: weekday full ("Monday", ...) %d: day of the month, zero filled [01-31] %e: Equivalent to %d [1-31] %j: day year, zero filled [001-366] %u: day of week starting with Monday (1), i.e. |
void |
setRemoveOriginalChunk(boolean removeOriginalChunk)
Removes the original input chunk.
|
void |
setTimeOutputContext(java.lang.String timeOutputContext)
Suffix for the name of the DocumentChunk containing the date as defined by timeOutputFormat (default HH:MM:SS).
The original name of the input DocumentChunk and this suffix are concatenated ($orig$dateTimeOutputContext) to produce the name actually used. |
void |
setTimeOutputFormat(java.lang.String timeOutputFormat)
A time output format compliant with libc's strftime.
|
java.lang.String |
toString()
String representation of this DateFormatter.
|
DateFormatter |
withAcceptCondition(AcceptCondition acceptCondition) |
DateFormatter |
withDataModelClass(java.lang.String dataModelClass) |
DateFormatter |
withDataModelProperty(java.lang.String dataModelProperty) |
DateFormatter |
withDataModelState(java.lang.String dataModelState) |
DateFormatter |
withDateOutputContext(java.lang.String dateOutputContext) |
DateFormatter |
withDateOutputFormat(java.lang.String dateOutputFormat) |
DateFormatter |
withDateTimeOutputContext(java.lang.String dateTimeOutputContext) |
DateFormatter |
withDateTimeOutputFormat(java.lang.String dateTimeOutputFormat) |
DateFormatter |
withDisabled(boolean disabled) |
DateFormatter |
withDisabled(java.lang.Boolean disabled) |
DateFormatter |
withFromDataModel(DocumentProcessor fromDataModel) |
DateFormatter |
withInputContext(java.lang.String inputContext) |
DateFormatter |
withInputFormat(java.lang.String inputFormat) |
DateFormatter |
withName(java.lang.String name) |
DateFormatter |
withRemoveOriginalChunk(boolean removeOriginalChunk) |
DateFormatter |
withRemoveOriginalChunk(java.lang.Boolean removeOriginalChunk) |
DateFormatter |
withTimeOutputContext(java.lang.String timeOutputContext) |
DateFormatter |
withTimeOutputFormat(java.lang.String timeOutputFormat) |
void |
writeTo(java.io.OutputStream os)
Write this DateFormatter as an XML fragment
|
getInputContext, setInputContext
getAcceptCondition, getDataModelClass, getDataModelProperty, getDataModelState, getFromDataModel, getName, isDisabled, setAcceptCondition, setDataModelClass, setDataModelProperty, setDataModelState, setDisabled, setFromDataModel, setName
public java.lang.String dateTimeOutputContext
public java.lang.String dateTimeOutputFormat
public java.lang.String dateOutputContext
public java.lang.String dateOutputFormat
public java.lang.String timeOutputContext
public java.lang.String timeOutputFormat
public java.lang.String inputFormat
public boolean removeOriginalChunk
public static final boolean DEFAULT_REMOVE_ORIGINAL_CHUNK
public DateFormatter()
public DateFormatter(DateFormatter o)
public DateFormatter withInputContext(java.lang.String inputContext)
withInputContext
in class SingleContextDocumentProcessor
public DateFormatter withAcceptCondition(AcceptCondition acceptCondition)
withAcceptCondition
in class SingleContextDocumentProcessor
public DateFormatter withName(java.lang.String name)
withName
in class SingleContextDocumentProcessor
public DateFormatter withDataModelState(java.lang.String dataModelState)
withDataModelState
in class SingleContextDocumentProcessor
public DateFormatter withFromDataModel(DocumentProcessor fromDataModel)
withFromDataModel
in class SingleContextDocumentProcessor
public DateFormatter withDataModelClass(java.lang.String dataModelClass)
withDataModelClass
in class SingleContextDocumentProcessor
public DateFormatter withDataModelProperty(java.lang.String dataModelProperty)
withDataModelProperty
in class SingleContextDocumentProcessor
public DateFormatter withDisabled(boolean disabled)
withDisabled
in class SingleContextDocumentProcessor
public DateFormatter withDisabled(java.lang.Boolean disabled)
withDisabled
in class SingleContextDocumentProcessor
public void setDateTimeOutputContext(java.lang.String dateTimeOutputContext)
public java.lang.String getDateTimeOutputContext()
public DateFormatter withDateTimeOutputContext(java.lang.String dateTimeOutputContext)
public void setDateTimeOutputFormat(java.lang.String dateTimeOutputFormat)
public java.lang.String getDateTimeOutputFormat()
public DateFormatter withDateTimeOutputFormat(java.lang.String dateTimeOutputFormat)
public void setDateOutputContext(java.lang.String dateOutputContext)
public java.lang.String getDateOutputContext()
public DateFormatter withDateOutputContext(java.lang.String dateOutputContext)
public void setDateOutputFormat(java.lang.String dateOutputFormat)
public java.lang.String getDateOutputFormat()
public DateFormatter withDateOutputFormat(java.lang.String dateOutputFormat)
public void setTimeOutputContext(java.lang.String timeOutputContext)
public java.lang.String getTimeOutputContext()
public DateFormatter withTimeOutputContext(java.lang.String timeOutputContext)
public void setTimeOutputFormat(java.lang.String timeOutputFormat)
public java.lang.String getTimeOutputFormat()
public DateFormatter withTimeOutputFormat(java.lang.String timeOutputFormat)
public void setInputFormat(java.lang.String inputFormat)
strptime()
format.public java.lang.String getInputFormat()
strptime()
format.public DateFormatter withInputFormat(java.lang.String inputFormat)
public void setRemoveOriginalChunk(boolean removeOriginalChunk)
public boolean isRemoveOriginalChunk()
public DateFormatter withRemoveOriginalChunk(boolean removeOriginalChunk)
public DateFormatter withRemoveOriginalChunk(java.lang.Boolean removeOriginalChunk)
public DateFormatter makeCopy()
makeCopy
in class SingleContextDocumentProcessor
public static DateFormatter readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
writeTo
in class SingleContextDocumentProcessor
javax.xml.bind.JAXBException
java.io.IOException
public static DateFormatter fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class SingleContextDocumentProcessor
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class SingleContextDocumentProcessor
com.exalead.util.TypedException
public <T> T accept(SingleContextDocumentProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class SingleContextDocumentProcessor
com.exalead.util.TypedException
public <T> T accept(DocumentProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class DocumentProcessor
com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.