public class CpeIdentifier extends java.lang.Object implements Identifier
| Constructor and Description |
|---|
CpeIdentifier(us.springett.parsers.cpe.Cpe cpe,
Confidence confidence)
Constructs a new CPE Identifier from a CPE object with the given
confidence.
|
CpeIdentifier(us.springett.parsers.cpe.Cpe cpe,
java.lang.String url,
Confidence confidence)
Constructs a new CPE Identifier from a CPE object with the given
confidence.
|
CpeIdentifier(java.lang.String vendor,
java.lang.String product,
java.lang.String version,
Confidence confidence)
Constructs a new CPE Identifier from a CPE object with the given
confidence.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(@NotNull Identifier o) |
boolean |
equals(java.lang.Object obj) |
Confidence |
getConfidence()
Get the value of confidence.
|
us.springett.parsers.cpe.Cpe |
getCpe()
Returns the CPE object.
|
java.lang.String |
getNotes()
Get the value of notes from suppression notes.
|
java.lang.String |
getUrl()
Get the value of URL.
|
java.lang.String |
getValue()
Get the string representation of the Identifier.
|
int |
hashCode() |
void |
setConfidence(Confidence confidence)
Set the value of confidence.
|
void |
setNotes(java.lang.String notes)
Set the value of notes.
|
void |
setUrl(java.lang.String url)
Set the value of URL.
|
java.lang.String |
toString()
Returns the CPE 2.3 formatted string.
|
public CpeIdentifier(us.springett.parsers.cpe.Cpe cpe,
Confidence confidence)
cpe - the CPE valueconfidence - the confidence in the identifiers matchpublic CpeIdentifier(us.springett.parsers.cpe.Cpe cpe,
java.lang.String url,
Confidence confidence)
cpe - the CPE valueurl - the URL for the identifierconfidence - the confidence in the identifiers matchpublic CpeIdentifier(java.lang.String vendor,
java.lang.String product,
java.lang.String version,
Confidence confidence)
throws us.springett.parsers.cpe.exceptions.CpeValidationException
vendor - the vendorproduct - the product nameversion - the versionconfidence - the confidence in the identifiers matchus.springett.parsers.cpe.exceptions.CpeValidationException - thrown if there is an error converting the
vendor, product, and version into a CPE objectpublic us.springett.parsers.cpe.Cpe getCpe()
public Confidence getConfidence()
IdentifiergetConfidence in interface Identifierpublic java.lang.String getNotes()
IdentifiergetNotes in interface Identifierpublic java.lang.String getUrl()
IdentifiergetUrl in interface Identifierpublic void setConfidence(Confidence confidence)
setConfidence in interface Identifierconfidence - the value of confidencepublic void setUrl(java.lang.String url)
setUrl in interface Identifierurl - the value of URLpublic void setNotes(java.lang.String notes)
IdentifiersetNotes in interface Identifiernotes - new value of notespublic java.lang.String getValue()
IdentifiergetValue in interface Identifierpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(@NotNull
@NotNull Identifier o)
compareTo in interface java.lang.Comparable<Identifier>Copyright© 2012-21 Jeremy Long. All Rights Reserved.