Package gov.nist.secauto.cpe.naming.util
Class CPEUriName
java.lang.Object
gov.nist.secauto.cpe.naming.util.AbstractCPEName
gov.nist.secauto.cpe.naming.util.CPEUriName
- All Implemented Interfaces:
CPEName
public class CPEUriName extends AbstractCPEName
A concrete implementation of a URI unbound to a WellFormedName.
-
Constructor Summary
Constructors Constructor Description CPEUriName(java.lang.String uri)
Constructs a URI bound CPE name based on the provided URI string.CPEUriName(java.net.URI uri)
Constructs a URI bound CPE name based on the provided URI string. -
Method Summary
Modifier and Type Method Description java.lang.String
toString()
Gets the underlyingWellFormedName
as a CPE URI.Methods inherited from class gov.nist.secauto.cpe.naming.util.AbstractCPEName
getWellFormedName, toFormattedString, toUri, toUriString
-
Constructor Details
-
CPEUriName
public CPEUriName(java.lang.String uri) throws java.text.ParseExceptionConstructs a URI bound CPE name based on the provided URI string.- Parameters:
uri
- a CPE name bound to a URI- Throws:
java.text.ParseException
- if the URI bound CPE name is not valid
-
CPEUriName
public CPEUriName(java.net.URI uri) throws java.text.ParseExceptionConstructs a URI bound CPE name based on the provided URI string.- Parameters:
uri
- a CPE name bound to a URI- Throws:
java.text.ParseException
- if the URI bound CPE name is not valid
-
-
Method Details
-
toString
public java.lang.String toString()Gets the underlyingWellFormedName
as a CPE URI.- Specified by:
toString
in interfaceCPEName
- Overrides:
toString
in classjava.lang.Object
- Returns:
- the
WellFormedName
bound to a URI - See Also:
AbstractCPEName.toUriString()
-