Class XSLUtility

java.lang.Object
de.latlon.deejump.plugin.style.XSLUtility

public class XSLUtility extends Object
...
Author:
Ugo Taddei
  • Constructor Details

    • XSLUtility

      public XSLUtility()
  • Method Details

    • toHexColor

      public static String toHexColor(Node colorNode)
      Parameters:
      colorNode - an XML Node containing an hexadecimal color
      Returns:
      the hex color
    • toAlphaValue

      public static String toAlphaValue(Node node)
      Parameters:
      node - an XML Node containing a Color alpha value
      Returns:
      the alpha value
    • toFontFamily

      public static String toFontFamily(Node node)
      Parameters:
      node - an XML Node containing a font family name
      Returns:
      the family name
    • toFontStyle

      public static String toFontStyle(Node fontNode)
      Parameters:
      fontNode - an XML Node containing a font style
      Returns:
      the font style
    • toWellKnowName

      public static String toWellKnowName(Node vertexStyleNode)
      Parameters:
      vertexStyleNode - a vertex style XML Node
      Returns:
      the vertex style name
    • getImageURL

      public static String getImageURL(String filename, Node fill, Node stroke, int size) throws IOException
      Parameters:
      filename - file containing the image
      fill - node containing the fill property (svg case)
      stroke - node containing the stroke property (svg case)
      size - size of the image
      Returns:
      a URL to the image (svg images will be colored and saved as image)
      Throws:
      IOException - if an IOException occurs
    • fileToURL

      public static String fileToURL(String filename)
      Parameters:
      filename - file name
      Returns:
      the url
    • replaceComma

      public static String replaceComma(Node node)
      Parameters:
      node - XML Node to format
      Returns:
      the new string TODO : what is it for ? why ss[0] is doubled when there is no comma, what happens if there are several commas
    • getIconURL

      public static String getIconURL(String icon)
      Parameters:
      icon - icon name
      Returns:
      the url string
    • createPatternImage

      public static String createPatternImage(int width, int extent, String pattern, String color) throws IOException
      Parameters:
      width - width of the WKTFillPattern
      extent - extent of the WKTFillPattern
      pattern - name of the pattern
      color - color code
      Returns:
      the image url
      Throws:
      IOException - if an IOException occurs