Package org.mitre.cpe.naming.util

Examples of org.mitre.cpe.naming.util.CPEName


    }
    return retval;
  }

  private Status getCPEResult(String idref) throws ParseException {
    CPEName cpeName = CPEFactory.newCPEName(idref);

    // attempt to use a cached result
    Status retval = cpeToStatusMap.get(cpeName);
    if (retval == null) {
      // attempt to match
      for (CPEName foundCpe : foundCPENames) {
        if (CPENameMatcher.isSuperset(cpeName.getWellFormedName(),
            foundCpe.getWellFormedName())) {
          retval = Status.TRUE;
          break;
        }
      }
View Full Code Here


  }

  private void handleCheckResults(CheckResults results,
      CPEDictionary dictionary) {
    for (CPE cpe : dictionary.getCPEs()) {
      CPEName cpeName = cpe.getCpeName();
      for (Check check : cpe.getChecks()) {
        CheckResult checkResult = results.getCheckResult(check);

        Status status;
        if (checkResult == null) {
View Full Code Here

     * determined to be either EQUAL or SUPERSET [CPE23-M:6.2]. A match SHALL
     * result in a TRUE value for the <cpe:fact-ref> element, otherwise the
     * element SHALL be given a value of FALSE.
     */
    public Result evaluate(CPEFactReference ref) {
      CPEName source = ref.getReferencedCPE();
      Collection<CPEName> targetList = existingCPEs;

      Result retval = Result.FALSE;
      for (CPEName target : targetList) {
        boolean superset = CPENameMatcher.isSuperset(source.getWellFormedName(), target.getWellFormedName());
        if (superset) {
          retval = Result.TRUE;
          break;
        }
      }
View Full Code Here

TOP

Related Classes of org.mitre.cpe.naming.util.CPEName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.