Package org.apache.ant.cyclonedx
Class ExternalReference
- java.lang.Object
-
- org.apache.ant.cyclonedx.ExternalReference
-
public class ExternalReference extends java.lang.ObjectAn "external reference", i.e. a notable link for the component or the SBOM itself.External references must have a type and an URL. The sepcification also supports optional comments and hashes which are currently not supported.
External references appear as children of
ComponentorExternalReferenceSetelements.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<org.cyclonedx.model.ExternalReference>CycloneDxExternalReferenceComparatorComparator for CycloneDX external references.
-
Constructor Summary
Constructors Constructor Description ExternalReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetType(java.lang.String type)Set the type of the external reference.voidsetUrl(java.lang.String url)Set the URL (actually URI) of the external reference.org.cyclonedx.model.ExternalReferencetoCycloneDxExternalReference()Maps the instance to a CycloneDX ExternalReference.
-
-
-
Method Detail
-
setUrl
public void setUrl(java.lang.String url)
Set the URL (actually URI) of the external reference.Required. This setter does not validate the value actually follows the URI syntax.
- Parameters:
url- reference's URI
-
setType
public void setType(java.lang.String type)
Set the type of the external reference.Required.
Types defined by the specification or the enum names of CycloneDX Core (Java)'s type enum are accepted.
- Parameters:
type- reference's type
-
toCycloneDxExternalReference
public org.cyclonedx.model.ExternalReference toCycloneDxExternalReference()
Maps the instance to a CycloneDX ExternalReference.- Returns:
- CycloneDX version of this instance.
-
-