org.mitre.cpe.common
Class WellFormedName

java.lang.Object
  extended by org.mitre.cpe.common.WellFormedName

public class WellFormedName
extends java.lang.Object

The WellFormedName class represents a Well Formed Name, as defined in the CPE Specification version 2.3.

See Also:
cpe.mitre.org for details.

Constructor Summary
WellFormedName()
          Constructs a new WellFormedName object, with all components set to the default value "ANY".
WellFormedName(java.lang.Object part, java.lang.Object vendor, java.lang.Object product, java.lang.Object version, java.lang.Object update, java.lang.Object edition, java.lang.Object language, java.lang.Object sw_edition, java.lang.Object target_sw, java.lang.Object target_hw, java.lang.Object other)
          Constructs a new WellFormedName object, setting each component to the given parameter value.
 
Method Summary
 java.lang.Object get(java.lang.String attribute)
           
 void set(java.lang.String attribute, java.lang.Object value)
          Sets the given attribute to value, if the attribute is in the list of permissible components
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WellFormedName

public WellFormedName()
               throws java.text.ParseException
Constructs a new WellFormedName object, with all components set to the default value "ANY".

Throws:
java.text.ParseException

WellFormedName

public WellFormedName(java.lang.Object part,
                      java.lang.Object vendor,
                      java.lang.Object product,
                      java.lang.Object version,
                      java.lang.Object update,
                      java.lang.Object edition,
                      java.lang.Object language,
                      java.lang.Object sw_edition,
                      java.lang.Object target_sw,
                      java.lang.Object target_hw,
                      java.lang.Object other)
               throws java.text.ParseException
Constructs a new WellFormedName object, setting each component to the given parameter value. If a parameter is null, the component is set to the default value "ANY".

Parameters:
part - string representing the part component
vendor - string representing the vendor component
product - string representing the product component
version - string representing the version component
update - string representing the update component
edition - string representing the edition component
language - string representing the language component
sw_edition - string representing the sw_edition component
target_sw - string representing the target_sw component
target_hw - string representing the target_hw component
other - string representing the other component
Throws:
java.text.ParseException
Method Detail

get

public java.lang.Object get(java.lang.String attribute)
Parameters:
attribute - String representing the component value to get
Returns:
the String value of the given component, or default value "ANY" if the component does not exist

set

public final void set(java.lang.String attribute,
                      java.lang.Object value)
               throws java.text.ParseException
Sets the given attribute to value, if the attribute is in the list of permissible components

Parameters:
attribute - String representing the component to set
value - Object representing the value of the given component
Throws:
java.text.ParseException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String representation of the WellFormedName