diff --git a/src/main/java/org/cyclonedx/model/Component.java b/src/main/java/org/cyclonedx/model/Component.java index 456a29b85..4f7ac795c 100644 --- a/src/main/java/org/cyclonedx/model/Component.java +++ b/src/main/java/org/cyclonedx/model/Component.java @@ -56,6 +56,8 @@ "copyright", "cpe", "purl", + "omniborId", + "swhid", "swid", "modified", "pedigree", @@ -148,6 +150,10 @@ public String getScopeName() { private String copyright; private String cpe; private String purl; + @VersionFilter(Version.VERSION_16) + private List omniborId; + @VersionFilter(Version.VERSION_16) + private List swhid; @VersionFilter(Version.VERSION_12) private Swid swid; private Boolean modified; @@ -439,10 +445,28 @@ public void setData(final ComponentData data) { this.data = data; } + @JacksonXmlElementWrapper(useWrapping = false) + public List getOmniborId() { + return omniborId; + } + + public void setOmniborId(final List omniborId) { + this.omniborId = omniborId; + } + + @JacksonXmlElementWrapper(useWrapping = false) + public List getSwhid() { + return swhid; + } + + public void setSwhid(final List swhid) { + this.swhid = swhid; + } + @Override public int hashCode() { return Objects.hash(author, publisher, group, name, version, description, scope, hashes, license, copyright, - cpe, purl, swid, modified, components, evidence, releaseNotes, type, modelCard, data); + cpe, purl, omniborId, swhid, swid, modified, components, evidence, releaseNotes, type, modelCard, data); } @Override @@ -465,6 +489,8 @@ public boolean equals(Object o) { Objects.equals(cpe, component.cpe) && Objects.equals(purl, component.purl) && Objects.equals(swid, component.swid) && + Objects.equals(swhid, component.swhid) && + Objects.equals(omniborId, component.omniborId) && Objects.equals(components, component.components) && Objects.equals(evidence, component.evidence) && Objects.equals(mimeType, component.mimeType) &&