Class PurlUtilsKt
-
- All Implemented Interfaces:
public final class PurlUtilsKt
-
-
Method Summary
Modifier and Type Method Description final static StringgetPurlType(Identifier $self)Map a Package's type to the string representation of the respective PurlType, or fall back to PurlType.GENERIC if the Package's type has no direct equivalent. final static StringtoPurl(Identifier $self, Map<String, String> qualifiers, String subpath)Create the canonical package URL ("purl") based on the properties of the Identifier. final static StringtoPurl(Identifier $self, Map<String, String> qualifiers)Create the canonical package URL ("purl") based on the properties of the Identifier. final static StringtoPurl(Identifier $self)Create the canonical package URL ("purl") based on the properties of the Identifier. -
-
Method Detail
-
getPurlType
final static String getPurlType(Identifier $self)
Map a Package's type to the string representation of the respective PurlType, or fall back to PurlType.GENERIC if the Package's type has no direct equivalent.
-
toPurl
final static String toPurl(Identifier $self, Map<String, String> qualifiers, String subpath)
Create the canonical package URL ("purl") based on the properties of the Identifier. Some issues remain with this specification (see e.g. https://github.com/package-url/purl-spec/issues/33). Optional qualifiers may be given and will be appended to the purl as query parameters e.g. pkg:deb/debian/curl@7.50.3-1?arch=i386&distro=jessie Optional subpath may be given and will be appended to the purl e.g. pkg:golang/google.golang.org/genproto#googleapis/api/annotations
This implementation uses the package type as 'type' purl element as it is used in the documentation. E.g. 'maven' for Gradle projects.
-
toPurl
final static String toPurl(Identifier $self, Map<String, String> qualifiers)
Create the canonical package URL ("purl") based on the properties of the Identifier. Some issues remain with this specification (see e.g. https://github.com/package-url/purl-spec/issues/33). Optional qualifiers may be given and will be appended to the purl as query parameters e.g. pkg:deb/debian/curl@7.50.3-1?arch=i386&distro=jessie Optional subpath may be given and will be appended to the purl e.g. pkg:golang/google.golang.org/genproto#googleapis/api/annotations
This implementation uses the package type as 'type' purl element as it is used in the documentation. E.g. 'maven' for Gradle projects.
-
toPurl
final static String toPurl(Identifier $self)
Create the canonical package URL ("purl") based on the properties of the Identifier. Some issues remain with this specification (see e.g. https://github.com/package-url/purl-spec/issues/33). Optional qualifiers may be given and will be appended to the purl as query parameters e.g. pkg:deb/debian/curl@7.50.3-1?arch=i386&distro=jessie Optional subpath may be given and will be appended to the purl e.g. pkg:golang/google.golang.org/genproto#googleapis/api/annotations
This implementation uses the package type as 'type' purl element as it is used in the documentation. E.g. 'maven' for Gradle projects.
-
-
-
-