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.StringtoString()Gets the underlyingWellFormedNameas 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 underlyingWellFormedNameas a CPE URI.- Specified by:
toStringin interfaceCPEName- Overrides:
toStringin classjava.lang.Object- Returns:
- the
WellFormedNamebound to a URI - See Also:
AbstractCPEName.toUriString()
-