Class DataMappingToString

  • All Implemented Interfaces:
    com.priint.pubserver.datamapping.DataMappingToStringLocal, com.priint.pubserver.plugin.interfaces.PluginControl

    public class DataMappingToString
    extends com.priint.pubserver.plugin.PluginControlDefault
    implements com.priint.pubserver.datamapping.DataMappingToStringLocal
    • Field Summary

      • Fields inherited from interface com.priint.pubserver.datamapping.DataMappingToStringLocal

        MAPPED_NAME
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> bestLocalizedTextToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, com.priint.pubserver.plugin.entitydata.Context context, java.lang.String defaultValue)
      Maps the text of a text list that best matches the context to string.
      java.util.List<java.lang.String> bucketLabelToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> buckets)
      maps the label of the first bucket of a bucket list to string
      java.util.List<java.lang.String> bucketPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> buckets, java.lang.String propertyName)
      Gets an arbitrary property from a bucket
      java.util.List<java.lang.String> cordPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Cord> cords, java.lang.String propertyName)
      Gets an arbitrary property from a cord
      java.util.List<java.lang.String> firstKeyValueByKeyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String key, java.lang.String designator)
      Returns designated field(s) of first KeyValue with given key in input list
      java.util.List<java.lang.String> firstKeyValueToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String designator)
      Returns designated field(s) of first KeyValue in input list
      java.util.List<java.lang.String> firstMediaAssetTextToString​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets)
      Get the first text of the first media asset
      java.util.List<java.lang.String> firstMediaAssetToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets)  
      java.util.List<java.lang.String> firstMediaAssetToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media)
      Gets the path of the first media object from the first media asset.
      java.util.List<java.lang.String> firstMediaAssetToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)  
      java.util.List<java.lang.String> firstMediaAssetToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media)
      gets the URL of the first media object from the first media asset
      java.util.List<java.lang.String> firstPriceToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String designator)
      maps the first price of a price list to string
      java.util.List<java.lang.String> firstTextOfAncestorBucketsToString​(java.lang.String sessionId, java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> descendants, java.lang.String entityModelName, java.lang.String ancestorEntityId, java.lang.String textIdentifier, int level, com.priint.pubserver.plugin.entitydata.Context context, java.lang.String searchStr)
      goes back n levels in bucket tree and maps the specified text of that ancestor bucket to string.
      java.util.List<java.lang.String> firstTextToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)
      maps the first text of a text list to string
      java.util.List<java.lang.String> firstTextToStringOrEmptyString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)
      maps the first text of a text list to string, at least return empty string
      java.util.List<java.lang.String> keyValuePropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String propertyName)
      Gets an arbitrary property from a keyValue
      java.util.List<java.lang.String> keyValuesToStrings​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues)
      maps all values of a key value list to a string list
      java.util.List<java.lang.String> lastMediaAssetToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)  
      java.util.List<java.lang.String> lastMediaAssetToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media)
      gets the path of the last media object from the last media asset
      java.util.List<java.lang.String> lastMediaAssetToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)  
      java.util.List<java.lang.String> lastMediaAssetToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String type, java.lang.String media)
      gets the URL of the last media object from the last media asset
      java.util.List<java.lang.String> lastTextToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)
      maps the last text of a text list to string
      java.util.List<java.lang.String> mapKeyValuesByKeyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> inputList, java.lang.String reqRecords, java.lang.String key, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)
      Returns designated field(s) of requested KeyValues or all KeyValues to a string, with selected delimiter, prefix and suffix
      java.util.List<java.lang.String> mapKeyValuesToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)
      Returns designated field(s) of requested KeyValues or all KeyValues with given key to a string, with selected delimiter, prefix and suffix
      java.util.List<java.lang.String> mediaAssetListToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String record, java.lang.String type, java.lang.String media)
      gets the path of the first media object from the first media asset
      java.util.List<java.lang.String> mediaAssetListToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String record, java.lang.String type, java.lang.String media)
      gets the URL of the first media object from the first media asset
      java.util.List<java.lang.String> mediaAssetPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets, java.lang.String propertyName)
      Gets an arbitrary property from a mediaAsset
      java.util.List<java.lang.String> nthPriceToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String designator, int nth)
      The nth price as string: map the field(s) selected by designator of the nth price to a string
      java.util.List<java.lang.String> planningPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Planning> plannings, java.lang.String propertyName)
      Gets an arbitrary property from a planning
      java.util.List<java.lang.String> priceListToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Price> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix, java.lang.String designator)
      Returns list of Price converted into delimited string
      java.util.List<java.lang.String> pricePropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices, java.lang.String propertyName)
      Gets an arbitrary property from a price
      java.util.List<java.lang.String> tableDataPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.TableData> tableDatas, java.lang.String propertyName)
      Gets an arbitrary property from a tableData
      java.util.List<java.lang.String> textListToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> inputList, java.lang.String reqRecords, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix)
      Returns list of Text converted into delimited string
      java.util.List<java.lang.String> textListToStrings​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, java.lang.String range, java.lang.String delimiter, java.lang.String prefix, java.lang.String suffix)
      maps all texts of a text list to a string list
      java.util.List<java.lang.String> textPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, java.lang.String propertyName)
      Gets an arbitrary property from a text
      java.util.List<java.lang.String> textsToStrings​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)
      maps all texts of a text list to a string list
      java.util.List<java.lang.String> textToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts, int nth)
      maps the nth text of a text list to string
      java.util.List<java.lang.String> uniqueKeyIdentifiers​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues)  
      java.util.List<java.lang.String> valuesByKeyToStrings​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues, java.lang.String key)
      maps all values associated to the given key to a string list
      • Methods inherited from class com.priint.pubserver.plugin.PluginControlDefault

        afterCreateConfigurations, afterDeleteConfigurations, afterUpdateConfigurations, createConfiguration, deleteConfigurations, getSession, getSessionId, initInstance, loadServerConfig, ping, readSessionAttribute, updateConfigurations, writeSessionAttribute
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.priint.pubserver.plugin.interfaces.PluginControl

        validateConfigurations
    • Constructor Detail

      • DataMappingToString

        public DataMappingToString()
    • Method Detail

      • bucketLabelToString

        public java.util.List<java.lang.String> bucketLabelToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> buckets)
                                                             throws com.priint.pubserver.exception.PubServerException
        maps the label of the first bucket of a bucket list to string
        Specified by:
        bucketLabelToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        buckets - list of buckets
        Returns:
        label of the first bucket in the buckets list
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstTextToStringOrEmptyString

        public java.util.List<java.lang.String> firstTextToStringOrEmptyString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)
                                                                        throws com.priint.pubserver.exception.PubServerException
        maps the first text of a text list to string, at least return empty string
        Parameters:
        texts - list of texts
        Returns:
        text of the first list entry if list empty return empty string
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstTextToString

        public java.util.List<java.lang.String> firstTextToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)
                                                           throws com.priint.pubserver.exception.PubServerException
        maps the first text of a text list to string
        Specified by:
        firstTextToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        texts - list of texts
        Returns:
        text of the first list entry
        Throws:
        com.priint.pubserver.exception.PubServerException
      • bestLocalizedTextToString

        public java.util.List<java.lang.String> bestLocalizedTextToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts,
                                                                          com.priint.pubserver.plugin.entitydata.Context context,
                                                                          java.lang.String defaultValue)
                                                                   throws com.priint.pubserver.exception.PubServerException
        Maps the text of a text list that best matches the context to string. Returns defaultValue if no matching text found.

        Intention: content system has text like

         [
          {lang: "de", cntry:"",   value: "Viele Grüße"}, 
          {lang: "de", cntry:"AT", value: "Grüezzi"}, 
          {lang: "de", cntry:"CH", value: "Viele Grüsse"}
         ] 
        If called for context {language:"deu", country:"DE"} it should return "Viele Grüße" although there is no "de-DE" in the data.

        In EntityModel set entity context for country to [unused].
        Connector will probably return both texts - at least pubhubdb would do.
        DataMapping will read all texts and check if the correct one is in, otherwise fall back to the generic version, or in the end to a default value.

        In example "de-DE" will not be found. But "de" will be returned.
        If the first entry was not be there, "de-AT" would be returned because it is the first entry matching at least "de".

        Parameters:
        texts - list of texts
        context - Context as search filter (e.g country and language)
        defaultValue - default value to be returned if no data found
        Returns:
        text value of the best matching list entry or defaultValue as string
        Throws:
        com.priint.pubserver.exception.PubServerException
      • textToString

        public java.util.List<java.lang.String> textToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts,
                                                             int nth)
                                                      throws com.priint.pubserver.exception.PubServerException
        maps the nth text of a text list to string
        Specified by:
        textToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        texts - list of texts
        nth - which list entry to return
        Returns:
        text of the nth list entry
        Throws:
        com.priint.pubserver.exception.PubServerException
      • lastTextToString

        public java.util.List<java.lang.String> lastTextToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)
                                                          throws com.priint.pubserver.exception.PubServerException
        maps the last text of a text list to string
        Specified by:
        lastTextToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        texts - list of texts
        Returns:
        text of the last list entry
        Throws:
        com.priint.pubserver.exception.PubServerException
      • textsToStrings

        public java.util.List<java.lang.String> textsToStrings​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts)
                                                        throws com.priint.pubserver.exception.PubServerException
        maps all texts of a text list to a string list
        Specified by:
        textsToStrings in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        texts - list of texts
        Returns:
        string list with all texts
        Throws:
        com.priint.pubserver.exception.PubServerException
      • textListToString

        public java.util.List<java.lang.String> textListToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> inputList,
                                                                 java.lang.String reqRecords,
                                                                 java.lang.String delimiter,
                                                                 java.lang.String prefix,
                                                                 java.lang.String suffix)
        Returns list of Text converted into delimited string
        Parameters:
        inputList - list of Text to be converted
        reqRecords - requested records from text list
        delimiter - string to be used for result
        prefix - string to be added before the first element
        suffix - string to be added after the last element
        Returns:
        string consisting of prefix, texts with delimiter and suffix as first element of string list
      • textListToStrings

        public java.util.List<java.lang.String> textListToStrings​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts,
                                                                  java.lang.String range,
                                                                  java.lang.String delimiter,
                                                                  java.lang.String prefix,
                                                                  java.lang.String suffix)
                                                           throws com.priint.pubserver.exception.PubServerException
        maps all texts of a text list to a string list
        Specified by:
        textListToStrings in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        texts - list of texts
        range - selects which entries from the text list to concatenate
        delimiter - put between the texts
        prefix - put as prefix for first text
        suffix - put as suffix behind last text
        Returns:
        string consisting of prefix, texts with delimiter and suffix as first element of string list
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstTextOfAncestorBucketsToString

        public java.util.List<java.lang.String> firstTextOfAncestorBucketsToString​(java.lang.String sessionId,
                                                                                   java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> descendants,
                                                                                   java.lang.String entityModelName,
                                                                                   java.lang.String ancestorEntityId,
                                                                                   java.lang.String textIdentifier,
                                                                                   int level,
                                                                                   com.priint.pubserver.plugin.entitydata.Context context,
                                                                                   java.lang.String searchStr)
                                                                            throws com.priint.pubserver.exception.PubServerException
        goes back n levels in bucket tree and maps the specified text of that ancestor bucket to string. If level > 1 all ancestors must have the same entityId.
        Specified by:
        firstTextOfAncestorBucketsToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        sessionId - SessionId (use tag)
        descendants - List of buckets, only first entry is used
        entityModelName - Name of the Entity Model (use tag)
        ancestorEntityId - EntityId of the ancestors
        textIdentifier - Text entity of bucket to be returned
        level - Number of steps up in bucket tree (begins with 1)
        context - Context as search filter (e.g country and language)
        searchStr - Search string
        Returns:
        specified text of ancestor bucket, with specified level up in bucket tree
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstKeyValueToString

        public java.util.List<java.lang.String> firstKeyValueToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues,
                                                                      java.lang.String designator)
                                                               throws com.priint.pubserver.exception.PubServerException
        Returns designated field(s) of first KeyValue in input list
        Parameters:
        keyValues - List of KeyValues to be converted
        designator - String 'ValueWithoutUnit', 'ValueWithUnit', 'Label', 'Symbol', 'Unit' or 'ParentIdentifier'
        Returns:
        String list with one or no element
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstKeyValueByKeyToString

        public java.util.List<java.lang.String> firstKeyValueByKeyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues,
                                                                           java.lang.String key,
                                                                           java.lang.String designator)
                                                                    throws com.priint.pubserver.exception.PubServerException
        Returns designated field(s) of first KeyValue with given key in input list
        Parameters:
        keyValues - List of KeyValues to be converted
        key - filter KeyValues by this
        designator - String 'ValueWithoutUnit', 'ValueWithUnit', 'Label', 'Symbol', 'Unit' or 'ParentIdentifier'
        Returns:
        String list with one or no element
        Throws:
        com.priint.pubserver.exception.PubServerException
      • mapKeyValuesToString

        public java.util.List<java.lang.String> mapKeyValuesToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> inputList,
                                                                     java.lang.String reqRecords,
                                                                     java.lang.String delimiter,
                                                                     java.lang.String prefix,
                                                                     java.lang.String suffix,
                                                                     java.lang.String designator)
        Returns designated field(s) of requested KeyValues or all KeyValues with given key to a string, with selected delimiter, prefix and suffix
        Parameters:
        inputList - List of KeyValues to be converted
        reqRecords - list of requested records from the keyValue list, delimited by ',' (comma) can contain
        • string 'all' whole list will be returned
        • positive numbers - returns record of the index decremented by one e.g 1 will return index of 0
        • negative numbers - returns element count from the end of the list, e.g -1 will return index of the last element
        • 0 (zero) - returns element, the same result as 1
        delimiter - string to be added between the elements
        prefix - string to be added before the first element
        suffix - string to be added after the last element
        designator - String 'ValueWithoutUnit', 'ValueWithUnit', 'Label', 'Symbol', 'Unit' or 'ParentIdentifier'
        Returns:
        String list with one or no element
      • mapKeyValuesByKeyToString

        public java.util.List<java.lang.String> mapKeyValuesByKeyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> inputList,
                                                                          java.lang.String reqRecords,
                                                                          java.lang.String key,
                                                                          java.lang.String delimiter,
                                                                          java.lang.String prefix,
                                                                          java.lang.String suffix,
                                                                          java.lang.String designator)
        Returns designated field(s) of requested KeyValues or all KeyValues to a string, with selected delimiter, prefix and suffix
        Parameters:
        inputList - List of KeyValues to be converted
        reqRecords - list of requested records from the keyValue list, delimited by ',' (comma) can contain
        • string 'all' whole list will be returned
        • positive numbers - returns record of the index decremented by one e.g 1 will return index of 0
        • negative numbers - returns element count from the end of the list, e.g -1 will return index of the last element
        • 0 (zero) - returns element, the same result as 1
        key - filter KeyValues by this
        delimiter - string to be added between the elements
        prefix - string to be added before the first element
        suffix - string to be added after the last element
        designator - String 'ValueWithoutUnit', 'ValueWithUnit', 'Label', 'Symbol', 'Unit' or 'ParentIdentifier'
        Returns:
        String list with one or no element
      • keyValuesToStrings

        public java.util.List<java.lang.String> keyValuesToStrings​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues)
                                                            throws com.priint.pubserver.exception.PubServerException
        maps all values of a key value list to a string list
        Specified by:
        keyValuesToStrings in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        keyValues - result set of the query
        Returns:
        a string list of the values of all given key values
        Throws:
        com.priint.pubserver.exception.PubServerException
      • valuesByKeyToStrings

        public java.util.List<java.lang.String> valuesByKeyToStrings​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues,
                                                                     java.lang.String key)
                                                              throws com.priint.pubserver.exception.PubServerException
        maps all values associated to the given key to a string list
        Specified by:
        valuesByKeyToStrings in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        keyValues - result set of the query
        key - filter keeping only key values with given key
        Returns:
        a string list of the values of the filtered key values
        Throws:
        com.priint.pubserver.exception.PubServerException
      • mediaAssetListToFileUrl

        public java.util.List<java.lang.String> mediaAssetListToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets,
                                                                        java.lang.String record,
                                                                        java.lang.String type,
                                                                        java.lang.String media)
                                                                 throws com.priint.pubserver.exception.PubServerException
        gets the URL of the first media object from the first media asset
        Specified by:
        mediaAssetListToFileUrl in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        mediaAssets - the result set of the query
        record - select which record of the set shall be returned
        type - type of the media object to be returned
        media - media of the media object to be returned
        Returns:
        list of string with one element, the url
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstMediaAssetToFileUrl

        public java.util.List<java.lang.String> firstMediaAssetToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets,
                                                                         java.lang.String type,
                                                                         java.lang.String media)
                                                                  throws com.priint.pubserver.exception.PubServerException
        gets the URL of the first media object from the first media asset
        Parameters:
        mediaAssets - the result set of the query
        type - type of the media object to be returned
        media - media of the media object to be returned
        Returns:
        list of string, the first element is the url
        Throws:
        com.priint.pubserver.exception.PubServerException
      • lastMediaAssetToFileUrl

        public java.util.List<java.lang.String> lastMediaAssetToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets,
                                                                        java.lang.String type,
                                                                        java.lang.String media)
                                                                 throws com.priint.pubserver.exception.PubServerException
        gets the URL of the last media object from the last media asset
        Parameters:
        mediaAssets - the result set of the query
        type - type of the media object to be returned
        media - media of the media object to be returned
        Returns:
        list of string, the first element is the URL
        Throws:
        com.priint.pubserver.exception.PubServerException
      • mediaAssetListToFilePath

        public java.util.List<java.lang.String> mediaAssetListToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets,
                                                                         java.lang.String record,
                                                                         java.lang.String type,
                                                                         java.lang.String media)
                                                                  throws com.priint.pubserver.exception.PubServerException
        gets the path of the first media object from the first media asset
        Specified by:
        mediaAssetListToFilePath in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        mediaAssets - the result set of the query
        record - select which record of the media asset list shall be returned
        type - type of the media object to be returned
        media - media of the media object to be returned
        Returns:
        list of string with one element, the path
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstMediaAssetToFilePath

        public java.util.List<java.lang.String> firstMediaAssetToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets,
                                                                          java.lang.String type,
                                                                          java.lang.String media)
                                                                   throws com.priint.pubserver.exception.PubServerException
        Gets the path of the first media object from the first media asset.

        If no path separator character is found in input path and filename will be concatenated using system default (i.e. backslash on windows)

        Parameters:
        mediaAssets - the result set of the query
        type - type of the media object to be returned
        media - media of the media object to be returned
        Returns:
        list of string with one element, the path
        Throws:
        com.priint.pubserver.exception.PubServerException
      • lastMediaAssetToFilePath

        public java.util.List<java.lang.String> lastMediaAssetToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets,
                                                                         java.lang.String type,
                                                                         java.lang.String media)
                                                                  throws com.priint.pubserver.exception.PubServerException
        gets the path of the last media object from the last media asset
        Parameters:
        mediaAssets - the result set of the query
        type - type of the media object to be returned
        media - media of the media object to be returned
        Returns:
        list of string with one element, the path
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstMediaAssetTextToString

        public java.util.List<java.lang.String> firstMediaAssetTextToString​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets)
        Get the first text of the first media asset
        Parameters:
        mediaAssets - the result set of the query
        Returns:
        list of string with one element, the text or an empty string, if no text is found
      • firstMediaAssetToFilePath

        public java.util.List<java.lang.String> firstMediaAssetToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets)
                                                                   throws com.priint.pubserver.exception.PubServerException
        Specified by:
        firstMediaAssetToFilePath in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstMediaAssetToFileUrl

        public java.util.List<java.lang.String> firstMediaAssetToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)
                                                                  throws com.priint.pubserver.exception.PubServerException
        Specified by:
        firstMediaAssetToFileUrl in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Throws:
        com.priint.pubserver.exception.PubServerException
      • lastMediaAssetToFilePath

        public java.util.List<java.lang.String> lastMediaAssetToFilePath​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)
                                                                  throws com.priint.pubserver.exception.PubServerException
        Specified by:
        lastMediaAssetToFilePath in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Throws:
        com.priint.pubserver.exception.PubServerException
      • lastMediaAssetToFileUrl

        public java.util.List<java.lang.String> lastMediaAssetToFileUrl​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> arg0)
                                                                 throws com.priint.pubserver.exception.PubServerException
        Specified by:
        lastMediaAssetToFileUrl in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Throws:
        com.priint.pubserver.exception.PubServerException
      • firstPriceToString

        public java.util.List<java.lang.String> firstPriceToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices,
                                                                   java.lang.String designator)
                                                            throws com.priint.pubserver.exception.PubServerException
        maps the first price of a price list to string
        Parameters:
        prices - list of prices
        designator - Either Price (default), PriceAndCurrency, Label, Currency, PriceUnit, PackagingUnit or QuantityOfPackagingUnit
        Returns:
        text of the first list entry
        Throws:
        com.priint.pubserver.exception.PubServerException
      • nthPriceToString

        public java.util.List<java.lang.String> nthPriceToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices,
                                                                 java.lang.String designator,
                                                                 int nth)
                                                          throws com.priint.pubserver.exception.PubServerException
        The nth price as string: map the field(s) selected by designator of the nth price to a string
        Specified by:
        nthPriceToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        prices - result of the query, <Entity.ResultList>
        designator - Either Price (default), PriceAndCurrency, Label, Currency, PriceUnit, PackagingUnit or QuantityOfPackagingUnit
        nth - the nth entry of the price list, should be >0
        Returns:
        string list with no (if input list is empty or too short) or one element
        Throws:
        com.priint.pubserver.exception.PubServerException
      • priceListToString

        public java.util.List<java.lang.String> priceListToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Price> inputList,
                                                                  java.lang.String reqRecords,
                                                                  java.lang.String delimiter,
                                                                  java.lang.String prefix,
                                                                  java.lang.String suffix,
                                                                  java.lang.String designator)
        Returns list of Price converted into delimited string
        Parameters:
        inputList - List of Prices to be converted
        reqRecords - string containing a list of requested records from the pricelist delimited by ',' (comma).

        Can contain

        • string 'all' whole list will be returned
        • positive numbers - returns record of the index decremented by one e.g 1 will return index of 0
        • negative numbers - returns element count from the end of the list, e.g -1 will return index of the last element
        • 0 (zero) - returns element, the same result as 1
        delimiter - string used for result delimitation
        prefix - string to be added before the first element
        suffix - string to be added after the last element
        designator - Price (default), PriceAndCurrency, Label, Currency, PriceUnit, PackagingUnit, QuantityOfPackagingUnit
        Returns:
        delimited string of requested records
      • bucketPropertyToString

        public java.util.List<java.lang.String> bucketPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Bucket> buckets,
                                                                       java.lang.String propertyName)
                                                                throws com.priint.pubserver.exception.PubServerException

        Gets an arbitrary property from a bucket

        Specified by:
        bucketPropertyToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        buckets - result from data query
        propertyName - name of the property
        Returns:
        list of the requested properties
        Throws:
        com.priint.pubserver.exception.PubServerException
      • cordPropertyToString

        public java.util.List<java.lang.String> cordPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Cord> cords,
                                                                     java.lang.String propertyName)
                                                              throws com.priint.pubserver.exception.PubServerException

        Gets an arbitrary property from a cord

        Specified by:
        cordPropertyToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        cords - result from data query
        propertyName - name of the property
        Returns:
        list of the requested properties
        Throws:
        com.priint.pubserver.exception.PubServerException
      • keyValuePropertyToString

        public java.util.List<java.lang.String> keyValuePropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues,
                                                                         java.lang.String propertyName)
                                                                  throws com.priint.pubserver.exception.PubServerException

        Gets an arbitrary property from a keyValue

        Specified by:
        keyValuePropertyToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        keyValues - result from data query
        propertyName - name of the property
        Returns:
        list of the requested properties
        Throws:
        com.priint.pubserver.exception.PubServerException
      • mediaAssetPropertyToString

        public java.util.List<java.lang.String> mediaAssetPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.MediaAsset> mediaAssets,
                                                                           java.lang.String propertyName)
                                                                    throws com.priint.pubserver.exception.PubServerException

        Gets an arbitrary property from a mediaAsset

        Specified by:
        mediaAssetPropertyToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        mediaAssets - result from data query
        propertyName - name of the property
        Returns:
        list of the requested properties
        Throws:
        com.priint.pubserver.exception.PubServerException
      • planningPropertyToString

        public java.util.List<java.lang.String> planningPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Planning> plannings,
                                                                         java.lang.String propertyName)
                                                                  throws com.priint.pubserver.exception.PubServerException

        Gets an arbitrary property from a planning

        Specified by:
        planningPropertyToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        plannings - result from data query
        propertyName - name of the property
        Returns:
        list of the requested properties
        Throws:
        com.priint.pubserver.exception.PubServerException
      • pricePropertyToString

        public java.util.List<java.lang.String> pricePropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Price> prices,
                                                                      java.lang.String propertyName)
                                                               throws com.priint.pubserver.exception.PubServerException

        Gets an arbitrary property from a price

        Specified by:
        pricePropertyToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        prices - result from data query
        propertyName - name of the property
        Returns:
        list of the requested properties
        Throws:
        com.priint.pubserver.exception.PubServerException
      • textPropertyToString

        public java.util.List<java.lang.String> textPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.Text> texts,
                                                                     java.lang.String propertyName)
                                                              throws com.priint.pubserver.exception.PubServerException

        Gets an arbitrary property from a text

        Specified by:
        textPropertyToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        texts - result from data query
        propertyName - name of the property
        Returns:
        list of the requested properties
        Throws:
        com.priint.pubserver.exception.PubServerException
      • tableDataPropertyToString

        public java.util.List<java.lang.String> tableDataPropertyToString​(java.util.List<com.priint.pubserver.plugin.entitydata.TableData> tableDatas,
                                                                          java.lang.String propertyName)
                                                                   throws com.priint.pubserver.exception.PubServerException

        Gets an arbitrary property from a tableData

        Specified by:
        tableDataPropertyToString in interface com.priint.pubserver.datamapping.DataMappingToStringLocal
        Parameters:
        tableDatas - result from data query
        propertyName - name of the property
        Returns:
        list of the requested properties
        Throws:
        com.priint.pubserver.exception.PubServerException
      • uniqueKeyIdentifiers

        public java.util.List<java.lang.String> uniqueKeyIdentifiers​(java.util.List<com.priint.pubserver.plugin.entitydata.KeyValue> keyValues)
                                                              throws com.priint.pubserver.exception.PubServerException
        Throws:
        com.priint.pubserver.exception.PubServerException