Releases: hsu-aut/sparql-result-converter
Releases · hsu-aut/sparql-result-converter
v3.0.1
v3.0.0
Adds another breaking change to the API
- There are now three utility functions that have to be called to get the final result after calling
convertToDefinition()
. These functions were necessary to create a result similar to an original SPARQL query result in case there are no results. The functions are:getAll()
->Returns the output that was previously returned byconvertToDefinition()
, i.e. the complete mapped objectgetFirstRootElement()
-> Convenient helper in case there is just one root element. Returns the grouped content for this elementget(key: string)
-> Returns the mapped content of a root element given bykey
- Furthermore, you can now specify whether or not you want to keep all ungrouped elements as "children". This is done by setting the boolean parameter
keepUngroupedContents
inconvertToDefinition(inputArray, mappingDefinitions, keepUngroupedContents)
. It's true by default.
v.2.0.2
Quick fix for a little mistake that made the whole Converter unusable: The main method "convertToDefintion" was set to private.
v2.0.1
- Adds a minor bug fix that lead to adding empty children elements into the mapped object
v2.0.0
New major release with breaking changes to the API:
- structure of mapping definitions has changed to allow for nested mappings with multiple properties on one layer
- convert-function has been renamed to allow for other convert-functions in the future (e.g. for converting directly into a class)