|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.plugins.covcomplplot.util.CovComplPlotUtil
public class CovComplPlotUtil
Utility Class for various data process
Field Summary | |
---|---|
static org.dom4j.DocumentFactory |
factory
DocumentFactory to handler namespace in the xml file |
static Map<String,String> |
templateCache
|
Constructor Summary | |
---|---|
CovComplPlotUtil()
|
Method Summary | |
---|---|
static int |
compareVersion(String v1,
String v2)
Compare version string |
static hudson.FilePath[] |
findFile(hudson.FilePath basePath,
String pattern)
Find files matching given pattern from given base path |
static String |
getClassResourcePath(Class<?> clazz,
String extension)
get corresponding class resource file path from the folder where the class is in. |
static String |
getFileAsString(String location)
Read file from given location and return string. |
static org.dom4j.Document |
getXmlFileDocument(InputStream stream)
Get Document instance by parsing given stream. |
static org.dom4j.Document |
getXmlFileDocument(InputStream stream,
org.dom4j.DocumentFactory factory)
Get Document instance by parsing given stream. |
static org.dom4j.Element |
getXPathNode(org.dom4j.Node node,
String xpathStr)
Get single xpath matching nodes. |
static List<org.dom4j.Element> |
getXPathNodeList(org.dom4j.Node node,
String xpathStr)
Get all xpath matching nodes. |
static String |
getXPathNodeText(org.dom4j.Node node,
String xpathStr)
Get first matching string value from the given node by searching given xpath. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static org.dom4j.DocumentFactory factory
public static Map<String,String> templateCache
Constructor Detail |
---|
public CovComplPlotUtil()
Method Detail |
---|
public static String getXPathNodeText(org.dom4j.Node node, String xpathStr) throws NoXPathContentException
node
- the node from which xpath search starts.xpathStr
- XPath String
NoXPathContentException
- occurs XPath is incorrect or nothing can be found.public static List<org.dom4j.Element> getXPathNodeList(org.dom4j.Node node, String xpathStr)
node
- node from which xpath search startsxpathStr
- XPath String
public static org.dom4j.Element getXPathNode(org.dom4j.Node node, String xpathStr) throws NoXPathContentException
node
- node from which xpath search startsxpathStr
- XPath String
NoXPathContentException
- occurs when no matching.public static org.dom4j.Document getXmlFileDocument(InputStream stream, org.dom4j.DocumentFactory factory) throws org.dom4j.DocumentException
Document
instance by parsing given stream.
stream
- inputStreamfactory
- DocumentFactory
instance to handle namespace
Document
instance
org.dom4j.DocumentException
- occurs when wrong xml is provided.public static org.dom4j.Document getXmlFileDocument(InputStream stream) throws org.dom4j.DocumentException
Document
instance by parsing given stream.
stream
- inputStream
Document
instance
org.dom4j.DocumentException
- occurs when wrong xml is provided.public static hudson.FilePath[] findFile(hudson.FilePath basePath, String pattern)
basePath
- base path from which the search startspattern
- file matching pattern
FilePath
array.public static String getClassResourcePath(Class<?> clazz, String extension)
clazz
- classextension
- file extension to be added
public static int compareVersion(String v1, String v2)
v1
- version1v2
- version2
public static String getFileAsString(String location)
location
- file location
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |