Class IndexEntry
- java.lang.Object
-
- org.owasp.dependencycheck.data.cpe.IndexEntry
-
- All Implemented Interfaces:
java.io.Serializable
@ThreadSafe public class IndexEntry extends java.lang.Object implements java.io.SerializableA CPE entry containing the name, vendor, product, and version.- Author:
- Jeremy Long
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IndexEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetDocumentId()Get the value of documentId.java.lang.StringgetProduct()Get the value of product.floatgetSearchScore()Get the value of searchScore.java.lang.StringgetVendor()Get the value of vendor.inthashCode()voidparseName(java.lang.String cpeName)Parses a name attribute value, from the cpe.xml, into its corresponding parts: vendor, product.voidsetDocumentId(int documentId)Set the value of documentId.voidsetProduct(java.lang.String product)Set the value of product.voidsetSearchScore(float searchScore)Set the value of searchScore.voidsetVendor(java.lang.String vendor)Set the value of vendor.java.lang.StringtoString()Standard implementation of toString showing vendor and product.
-
-
-
Method Detail
-
getDocumentId
public int getDocumentId()
Get the value of documentId.- Returns:
- the value of documentId
-
setDocumentId
public void setDocumentId(int documentId)
Set the value of documentId.- Parameters:
documentId- new value of documentId
-
getVendor
public java.lang.String getVendor()
Get the value of vendor.- Returns:
- the value of vendor
-
setVendor
public void setVendor(java.lang.String vendor)
Set the value of vendor.- Parameters:
vendor- new value of vendor
-
getProduct
public java.lang.String getProduct()
Get the value of product.- Returns:
- the value of product
-
setProduct
public void setProduct(java.lang.String product)
Set the value of product.- Parameters:
product- new value of product
-
getSearchScore
public float getSearchScore()
Get the value of searchScore.- Returns:
- the value of searchScore
-
setSearchScore
public void setSearchScore(float searchScore)
Set the value of searchScore.- Parameters:
searchScore- new value of searchScore
-
parseName
public void parseName(java.lang.String cpeName) throws java.io.UnsupportedEncodingExceptionParses a name attribute value, from the cpe.xml, into its corresponding parts: vendor, product.
Example:
nbsp;nbsp;nbsp;cpe:/a:apache:struts:1.1:rc2Results in:
- Vendor: apache
- Product: struts
If it is necessary to parse the CPE into more parts (i.e. to include version and revision) then you should use the `cpe-parser`.
- Parameters:
cpeName- the CPE name- Throws:
java.io.UnsupportedEncodingException- should never be thrown...
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
Standard implementation of toString showing vendor and product.- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representation of the object
-
-