Releases: cinchapi/data-transform-api
Releases · cinchapi/data-transform-api
Version 1.4.0
- Added
Transformers#nest
which takes anotherTransformer
and applies it to each level of a nested data structure (e.g.Map
orSequence
). - Added
Transformers#copy
which copies the value associated with one key and also associates it with another key. - Fixed a bug in the
Transformers#valueRemoveIfEmpty
factory that caused the returnedTransformer
to fail serialization.
Version 1.3.1
- Fixed some bugs related to serializing and deserializing some built-in
Transformers
. - Added missing transformers to ensure values are handled as Strings.
Version 1.3.0
- Added the
ScriptedTransformer
framework.ScriptedTransformer
is abstract class that can be extended to provide transformation logic via a script that is compatible with the Java script engine platform. Right now, javascript is the supported language for writing transformer scripts. - Added support for Transformer serialization. The rules of serialization are:
- All built-in transformers provided in the
Transformers
factory class are serializable. ScriptedTransformer
s are serializable.- A
CompositeTransformer
can be serialized if all of the composed transformers can be serailized. - Custom transformers that require serialization should be implemented using the
ScriptedTransformer
framework.
- All built-in transformers provided in the
- Added
Transformer#serialize
andTransformer#deserialize
static methods.
Version 1.2.0
- Deprecated and renamed a few
Transformer
factories for better consistencykeyCaseFormat
is deprecated in favor ofkeyConditionalConvertCaseFormat
orkeyEnsureCaseFormat
keyStripInvalidChars
is deprecated in favor ofkeyRemoveInvalidChars
keyValueStripQuotes
is deprecated in favor ofkeyValueRemoveQuotes
removeValuesThatAre
is deprecated in favor ofvalueRemoveIf
valueSplitOnDelimiter
is deprecated in favor ofvalueStringSplitOnDelimiter
- Added some factories for common
Transformers
keyEnsureCaseFormat
can be used to conver ALL keys to a particular case format.keyWhitespaceToUnderscore
replace all whitespace characters with underscores in ALL keyskeyRemoveWhitespace
removes all whitespace characters (no replacement) in ALL keyskeyRemoveInvalidChars
(replacement forkeyStripInvalidChars
) has been overloaded to accept a collection of invalid characters in addition to aPredicate
that determines if a character is invalid.- A version of
valueRemoveIfEmpty
that takes no arguments can be used to return aTransformer
that removes values that match defeault definition ofEmpty#ness
- Added versions of
valueAsBoolean
,valueAsNumber
,valueAsResolvableLinkInstruction
,valueAsTag
andvalueAsTimestamp
that accept one or more keys to which the value transformation is limited. If no keys are provided, values for every key will be transformed.
- The version of
keyRemoveInvalidChars
that takes aPredicate
expects the predicate to determine whether the character isinvalid
. whereas thekeyStripInvalidChars
method takes aCheck
that is expected to determmine if a character is valid.
Version 1.1.0
- Added an
Transformer#transform
method that takes a genericObject
value
parameter. - Added a
Transformers#noOp
static factory that provides aTransformer
that does not perform any key or value transformations. - Added the following built-in
Transformers
:explode
keyMap
valueAsBoolean
valueAsNumber
valueAsResolvableLinkInstruction
valueAsTag
valueStringToJava
valueAsTimestamp
valueNullifyIfEmpty
- Added the
Transformers#composeForEach
meta transformer for applying a collection of transformers to each item within a sequence of values. - Added the
Transfroemrs#forEach
meta transformer for applying a transformer to each item within a sequence of values.
Version 1.0.0
Initial Release