Class IndexEntry

java.lang.Object
org.owasp.dependencycheck.data.cpe.IndexEntry
All Implemented Interfaces:
Serializable

@ThreadSafe public class IndexEntry extends Object implements Serializable
A CPE entry containing the name, vendor, product, and version.
Author:
Jeremy Long
See Also:
  • Constructor Details

    • IndexEntry

      public IndexEntry()
  • Method Details

    • 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 String getVendor()
      Get the value of vendor.
      Returns:
      the value of vendor
    • setVendor

      public void setVendor(String vendor)
      Set the value of vendor.
      Parameters:
      vendor - new value of vendor
    • getProduct

      public String getProduct()
      Get the value of product.
      Returns:
      the value of product
    • setProduct

      public void setProduct(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(String cpeName)

      Parses a name attribute value, from the cpe.xml, into its corresponding parts: vendor, product.

      Example:

      nbsp;nbsp;nbsp;cpe:/a:apache:struts:1.1:rc2

      Results 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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Standard implementation of toString showing vendor and product.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the object