Class XsltHelper

java.lang.Object
org.opencastproject.coverimage.impl.xsl.XsltHelper

public final class XsltHelper extends Object
Helper class to use within the XSLT transformation
  • Method Details

    • split

      public static String split(String text, int maxChars, int line, boolean isLastLine)
      Splits a string into several lines, depending on the maximum allowed characters per line and returns the desired line.
      Parameters:
      text - Text to split up
      maxChars - maximum allowed characters per line
      line - line number to return (starting by 1)
      isLastLine - whether this is the last line used to represent the string. If so, the string will be abbreviated using ellipsis in case the text cannot be represented by the given number of lines
      Returns:
      the line or null if the given text is null, the line number is less than 1 or if the desired line does not exist