public class DescriptionEcosystemMapper
extends java.lang.Object
Constructor and Description |
---|
DescriptionEcosystemMapper()
Constructs a new description ecosystem mapper.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEcosystem(io.github.jeremylong.openvulnerability.client.nvd.DefCveItem cve)
Returns the ecosystem if identified by English description from the CVE
data.
|
java.lang.String |
getEcosystem(java.lang.String multicase)
Determines the ecosystem for the given string.
|
protected static boolean[] |
getPrefixesFor(java.lang.String str) |
protected void |
increment(int i,
int[] ecosystemMap) |
protected static boolean |
isExtension(java.lang.String str,
int begin,
int end) |
protected static boolean |
isLowercaseAscii(java.lang.String multicase,
int start,
int end) |
static boolean |
isURL(java.lang.String c,
int begin)
Tests if the string is a URL by looking for '://'.
|
protected static StringAhoCorasickDoubleArrayTrie<EcosystemHint> |
toAhoCorasickDoubleArrayTrie() |
public DescriptionEcosystemMapper()
protected static boolean[] getPrefixesFor(java.lang.String str)
protected static StringAhoCorasickDoubleArrayTrie<EcosystemHint> toAhoCorasickDoubleArrayTrie()
protected static boolean isExtension(java.lang.String str, int begin, int end)
protected static boolean isLowercaseAscii(java.lang.String multicase, int start, int end)
public static boolean isURL(java.lang.String c, int begin)
c
- the text to test.begin
- the position in the string to begin searching; note the
search is decreasing to 0true
if `://` is found; otherwise false
protected void increment(int i, int[] ecosystemMap)
public java.lang.String getEcosystem(io.github.jeremylong.openvulnerability.client.nvd.DefCveItem cve)
cve
- the CVE datapublic java.lang.String getEcosystem(java.lang.String multicase)
multicase
- the string to testCopyright© 2012-21 Jeremy Long. All Rights Reserved.