public class PurlIdentifier extends java.lang.Object implements Identifier
| Constructor and Description |
|---|
PurlIdentifier(com.github.packageurl.PackageURL purl,
Confidence confidence)
Constructs a new Package-URL identifier.
|
PurlIdentifier(com.github.packageurl.PackageURL purl,
java.lang.String url,
Confidence confidence)
Constructs a new Package-URL identifier.
|
PurlIdentifier(java.lang.String type,
java.lang.String name,
java.lang.String version,
Confidence confidence)
Constructs a new Package-URL identifier.
|
PurlIdentifier(java.lang.String type,
java.lang.String namespace,
java.lang.String name,
java.lang.String version,
Confidence confidence)
Constructs a new Package-URL identifier.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(@NotNull Identifier o) |
boolean |
equals(java.lang.Object obj) |
Confidence |
getConfidence()
Get the value of confidence.
|
java.lang.String |
getName()
Returns the Package URL name.
|
java.lang.String |
getNamespace()
Returns the Package URL name space.
|
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.
|
java.lang.String |
getVersion()
Returns the Package URL version.
|
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 |
toGav()
Returns the GAV representation of the Package URL as utilized in gradle
builds.
|
java.lang.String |
toString()
Returns the CPE 2.3 formatted string.
|
public PurlIdentifier(com.github.packageurl.PackageURL purl,
Confidence confidence)
purl - the Package-URL objectconfidence - the confidence that the identifier is correct for the
given dependencypublic PurlIdentifier(com.github.packageurl.PackageURL purl,
java.lang.String url,
Confidence confidence)
purl - the Package-URL objecturl - the URL for the identifierconfidence - the confidence that the identifier is correct for the
given dependencypublic PurlIdentifier(java.lang.String type,
java.lang.String name,
java.lang.String version,
Confidence confidence)
throws com.github.packageurl.MalformedPackageURLException
type - the type of package-URLname - the nameversion - the versionconfidence - the confidence that the identifier is correct for the
given dependencycom.github.packageurl.MalformedPackageURLException - thrown if the type, name space,
name, and version cannot be converted into a package-URLpublic PurlIdentifier(java.lang.String type,
java.lang.String namespace,
java.lang.String name,
java.lang.String version,
Confidence confidence)
throws com.github.packageurl.MalformedPackageURLException
type - the type of package-URLnamespace - the name spacename - the nameversion - the versionconfidence - the confidence that the identifier is correct for the
given dependencycom.github.packageurl.MalformedPackageURLException - thrown if the type, name space,
name, and version cannot be converted into a package-URLpublic 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 toString()
toString in class java.lang.Objectpublic java.lang.String getValue()
IdentifiergetValue in interface Identifierpublic java.lang.String getNamespace()
public java.lang.String getName()
PackageURL.getName()public java.lang.String getVersion()
PackageURL.getVersion()public java.lang.String toGav()
public int compareTo(@NotNull
@NotNull Identifier o)
compareTo in interface java.lang.Comparable<Identifier>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright© 2012-21 Jeremy Long. All Rights Reserved.