Package gov.nist.secauto.cpe.naming.util
Class AbstractCPEName
java.lang.Object
gov.nist.secauto.cpe.naming.util.AbstractCPEName
- All Implemented Interfaces:
CPEName
- Direct Known Subclasses:
CPEFormattedStringName
,CPEUriName
public abstract class AbstractCPEName extends java.lang.Object implements CPEName
An abstract implementation of a notional unbound CPE Name expressed as a
WellFormedName
.-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCPEName(WellFormedName wfn)
Construct a notional, unbound CPE Name based on aWellFormedName
. -
Method Summary
Modifier and Type Method Description WellFormedName
getWellFormedName()
Gets the underlyingWellFormedName
.java.lang.String
toFormattedString()
Gets the underlyingWellFormedName
as a formatted string.java.net.URI
toUri()
Gets the underlyingWellFormedName
as a CPE URI.java.lang.String
toUriString()
Gets the underlyingWellFormedName
as a CPE URI.
-
Constructor Details
-
AbstractCPEName
Construct a notional, unbound CPE Name based on aWellFormedName
.- Parameters:
wfn
- theWellFormedName
associated with the CPE Name
-
-
Method Details
-
getWellFormedName
Description copied from interface:CPEName
Gets the underlyingWellFormedName
.- Specified by:
getWellFormedName
in interfaceCPEName
- Returns:
WellFormedName
representing the unbound CPE Name
-
toUri
public java.net.URI toUri()Description copied from interface:CPEName
Gets the underlyingWellFormedName
as a CPE URI.- Specified by:
toUri
in interfaceCPEName
- Returns:
- the
WellFormedName
bound to a URI
-
toUriString
public java.lang.String toUriString()Description copied from interface:CPEName
Gets the underlyingWellFormedName
as a CPE URI.- Specified by:
toUriString
in interfaceCPEName
- Returns:
- the
WellFormedName
bound to a URI
-
toFormattedString
public java.lang.String toFormattedString()Description copied from interface:CPEName
Gets the underlyingWellFormedName
as a formatted string.- Specified by:
toFormattedString
in interfaceCPEName
- Returns:
- the
WellFormedName
as a CPE formatted string
-