de.latlon.deejump.plugin.style
Class XSLUtility

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

public class XSLUtility
extends java.lang.Object

...

Author:
Ugo Taddei

Constructor Summary
XSLUtility()
           
 
Method Summary
static java.lang.String createPatternImage(int width, int extent, java.lang.String pattern, java.lang.String color)
           
static java.lang.String fileToURL(java.lang.String filename)
           
static java.lang.String getIconURL(java.lang.String icon)
           
static java.lang.String getImageURL(java.lang.String filename, org.w3c.dom.Node fill, org.w3c.dom.Node stroke, int size)
           
static java.lang.String replaceComma(org.w3c.dom.Node node)
           
static java.lang.String toAlphaValue(org.w3c.dom.Node colorNode)
           
static java.lang.String toFontFamily(org.w3c.dom.Node colorNode)
           
static java.lang.String toFontStyle(org.w3c.dom.Node fontNode)
           
static java.lang.String toHexColor(org.w3c.dom.Node colorNode)
           
static java.lang.String toWellKnowName(org.w3c.dom.Node vertexStyleNode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLUtility

public XSLUtility()
Method Detail

toHexColor

public static java.lang.String toHexColor(org.w3c.dom.Node colorNode)
Parameters:
colorNode -
Returns:
the hex color

toAlphaValue

public static java.lang.String toAlphaValue(org.w3c.dom.Node colorNode)
Parameters:
colorNode -
Returns:
the alpha value

toFontFamily

public static java.lang.String toFontFamily(org.w3c.dom.Node colorNode)
Parameters:
colorNode -
Returns:
the family name

toFontStyle

public static java.lang.String toFontStyle(org.w3c.dom.Node fontNode)
Parameters:
fontNode -
Returns:
the style

toWellKnowName

public static java.lang.String toWellKnowName(org.w3c.dom.Node vertexStyleNode)
Parameters:
vertexStyleNode -
Returns:
the WKN

getImageURL

public static java.lang.String getImageURL(java.lang.String filename,
                                           org.w3c.dom.Node fill,
                                           org.w3c.dom.Node stroke,
                                           int size)
                                    throws java.io.IOException
Parameters:
filename -
fill -
stroke -
size -
Returns:
a URL to the image (svg images will be colored and saved as image)
Throws:
java.io.IOException

fileToURL

public static java.lang.String fileToURL(java.lang.String filename)
Parameters:
filename -
Returns:
the url

replaceComma

public static java.lang.String replaceComma(org.w3c.dom.Node node)
Parameters:
node -
Returns:
the new string

getIconURL

public static java.lang.String getIconURL(java.lang.String icon)
Parameters:
icon -
Returns:
the url

createPatternImage

public static java.lang.String createPatternImage(int width,
                                                  int extent,
                                                  java.lang.String pattern,
                                                  java.lang.String color)
                                           throws java.io.IOException
Parameters:
width -
extent -
pattern -
color -
Returns:
the image url
Throws:
java.io.IOException