Releases: cinchapi/data-transform-api
Releases · cinchapi/data-transform-api
Version 1.4.0
- Added
Transformers#nestwhich takes anotherTransformerand applies it to each level of a nested data structure (e.g.MaporSequence). - Added
Transformers#copywhich copies the value associated with one key and also associates it with another key. - Fixed a bug in the
Transformers#valueRemoveIfEmptyfactory that caused the returnedTransformerto 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
ScriptedTransformerframework.ScriptedTransformeris 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
Transformersfactory class are serializable. ScriptedTransformers are serializable.- A
CompositeTransformercan be serialized if all of the composed transformers can be serailized. - Custom transformers that require serialization should be implemented using the
ScriptedTransformerframework.
- All built-in transformers provided in the
- Added
Transformer#serializeandTransformer#deserializestatic methods.
Version 1.2.0
- Deprecated and renamed a few
Transformerfactories for better consistencykeyCaseFormatis deprecated in favor ofkeyConditionalConvertCaseFormatorkeyEnsureCaseFormatkeyStripInvalidCharsis deprecated in favor ofkeyRemoveInvalidCharskeyValueStripQuotesis deprecated in favor ofkeyValueRemoveQuotesremoveValuesThatAreis deprecated in favor ofvalueRemoveIfvalueSplitOnDelimiteris deprecated in favor ofvalueStringSplitOnDelimiter
- Added some factories for common
TransformerskeyEnsureCaseFormatcan be used to conver ALL keys to a particular case format.keyWhitespaceToUnderscorereplace all whitespace characters with underscores in ALL keyskeyRemoveWhitespaceremoves all whitespace characters (no replacement) in ALL keyskeyRemoveInvalidChars(replacement forkeyStripInvalidChars) has been overloaded to accept a collection of invalid characters in addition to aPredicatethat determines if a character is invalid.- A version of
valueRemoveIfEmptythat takes no arguments can be used to return aTransformerthat removes values that match defeault definition ofEmpty#ness - Added versions of
valueAsBoolean,valueAsNumber,valueAsResolvableLinkInstruction,valueAsTagandvalueAsTimestampthat 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
keyRemoveInvalidCharsthat takes aPredicateexpects the predicate to determine whether the character isinvalid. whereas thekeyStripInvalidCharsmethod takes aCheckthat is expected to determmine if a character is valid.
Version 1.1.0
- Added an
Transformer#transformmethod that takes a genericObjectvalueparameter. - Added a
Transformers#noOpstatic factory that provides aTransformerthat does not perform any key or value transformations. - Added the following built-in
Transformers:explodekeyMapvalueAsBooleanvalueAsNumbervalueAsResolvableLinkInstructionvalueAsTagvalueStringToJavavalueAsTimestampvalueNullifyIfEmpty
- Added the
Transformers#composeForEachmeta transformer for applying a collection of transformers to each item within a sequence of values. - Added the
Transfroemrs#forEachmeta transformer for applying a transformer to each item within a sequence of values.
Version 1.0.0
Initial Release