Class CopyrightTranslator


  • public class CopyrightTranslator
    extends AbstractValueTranslator
    Copyright ValueTranslator that format copyright year by using given date format.
    • Constructor Detail

      • CopyrightTranslator

        public CopyrightTranslator()
    • Method Detail

      • exportValue

        public java.lang.String exportValue​(java.lang.Object value)
        Description copied from class: AbstractValueTranslator
        Translates an attribute value for export usage. This means the attribute value must be transformed into a string which should be re-importable again.
        Specified by:
        exportValue in class AbstractValueTranslator
        Parameters:
        value - value to translate
        Returns:
        String translated value
      • importValue

        public java.lang.Object importValue​(java.lang.String valueExpr,
                                            Item toItem)
        Description copied from class: AbstractValueTranslator
        Translates a tokenized csv value for import usage. This means that the result object must be a instance of the expected attribute type.
        Specified by:
        importValue in class AbstractValueTranslator
        Parameters:
        valueExpr - expression to translate
        toItem - the target item in case it already exist, null otherwise (for partOf attributes!)
        Returns:
        Object translated value