|
||||||||||
| 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 java.util.Map<java.lang.String,java.lang.String> |
templateCache
|
| Constructor Summary | |
|---|---|
CovComplPlotUtil()
|
|
| Method Summary | |
|---|---|
static int |
compareVersion(java.lang.String v1,
java.lang.String v2)
Compare version string |
static hudson.FilePath[] |
findFile(hudson.FilePath basePath,
java.lang.String pattern)
Find files matching given pattern from given base path |
static java.lang.String |
getClassResourcePath(java.lang.Class<?> clazz,
java.lang.String extension)
get corresponding class resource file path from the folder where the class is in. |
static java.lang.String |
getFileAsString(java.lang.String location)
Read file from given location and return string. |
static org.dom4j.Document |
getXmlFileDocument(java.io.InputStream stream)
Get Document instance by parsing given stream. |
static org.dom4j.Document |
getXmlFileDocument(java.io.InputStream stream,
org.dom4j.DocumentFactory factory)
Get Document instance by parsing given stream. |
static org.dom4j.Element |
getXPathNode(org.dom4j.Node node,
java.lang.String xpathStr)
Get single xpath matching nodes. |
static java.util.List<org.dom4j.Element> |
getXPathNodeList(org.dom4j.Node node,
java.lang.String xpathStr)
Get all xpath matching nodes. |
static java.lang.String |
getXPathNodeText(org.dom4j.Node node,
java.lang.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 java.util.Map<java.lang.String,java.lang.String> templateCache
| Constructor Detail |
|---|
public CovComplPlotUtil()
| Method Detail |
|---|
public static java.lang.String getXPathNodeText(org.dom4j.Node node,
java.lang.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 java.util.List<org.dom4j.Element> getXPathNodeList(org.dom4j.Node node,
java.lang.String xpathStr)
node - node from which xpath search startsxpathStr - XPath String
public static org.dom4j.Element getXPathNode(org.dom4j.Node node,
java.lang.String xpathStr)
throws NoXPathContentException
node - node from which xpath search startsxpathStr - XPath String
NoXPathContentException - occurs when no matching.
public static org.dom4j.Document getXmlFileDocument(java.io.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(java.io.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,
java.lang.String pattern)
basePath - base path from which the search startspattern - file matching pattern
FilePath array.
public static java.lang.String getClassResourcePath(java.lang.Class<?> clazz,
java.lang.String extension)
clazz - classextension - file extension to be added
public static int compareVersion(java.lang.String v1,
java.lang.String v2)
v1 - version1v2 - version2
public static java.lang.String getFileAsString(java.lang.String location)
location - file location
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||