org.mitre.cpe.matching
Class CPENameMatcher

java.lang.Object
  extended by org.mitre.cpe.matching.CPENameMatcher

public class CPENameMatcher
extends java.lang.Object

The CPENameMatcher is an implementation of the CPE Matching algorithm, as specified in the CPE Matching Standard version 2.3.

See Also:
cpe.mitre.org for more information.

Constructor Summary
CPENameMatcher()
           
 
Method Summary
 java.util.Hashtable compareWFNs(WellFormedName source, WellFormedName target)
          Compares each attribute value pair in two Well Formed Names.
 boolean isDisjoint(WellFormedName source, WellFormedName target)
          Tests two Well Formed Names for disjointness.
 boolean isEqual(WellFormedName source, WellFormedName target)
          Tests two Well Formed Names for equality.
 boolean isSubset(WellFormedName source, WellFormedName target)
          Tests if the target Well Formed Name is a subset of the source Well Formed Name.
 boolean isSuperset(WellFormedName source, WellFormedName target)
          Tests if the target Well Formed name is a superset of the source Well Formed Name.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CPENameMatcher

public CPENameMatcher()
Method Detail

isDisjoint

public boolean isDisjoint(WellFormedName source,
                          WellFormedName target)
Tests two Well Formed Names for disjointness.

Parameters:
source - Source WFN
target - Target WFN
Returns:
true if the names are disjoint, false otherwise

isEqual

public boolean isEqual(WellFormedName source,
                       WellFormedName target)
Tests two Well Formed Names for equality.

Parameters:
source - Source WFN
target - Target WFN
Returns:
true if the names are equal, false otherwise

isSubset

public boolean isSubset(WellFormedName source,
                        WellFormedName target)
Tests if the target Well Formed Name is a subset of the source Well Formed Name.

Parameters:
source - Source WFN
target - Target WFN
Returns:
true if the target is a subset of the source, false otherwise

isSuperset

public boolean isSuperset(WellFormedName source,
                          WellFormedName target)
Tests if the target Well Formed name is a superset of the source Well Formed Name.

Parameters:
source - Source WFN
target - Target WFN
Returns:
true if the target is a superset of the source, false otherwise

compareWFNs

public java.util.Hashtable compareWFNs(WellFormedName source,
                                       WellFormedName target)
Compares each attribute value pair in two Well Formed Names.

Parameters:
source - Source WFN
target - Target WFN
Returns:
A Hashtable mapping attribute string to attribute value Relation

main

public static void main(java.lang.String[] args)
                 throws java.text.ParseException
Throws:
java.text.ParseException