Skip to content

Commit

Permalink
initial changes
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Alzate <[email protected]>
  • Loading branch information
mr-zepol committed Apr 2, 2024
1 parent 82ddd51 commit e77bb4a
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/main/java/org/cyclonedx/model/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
"copyright",
"cpe",
"purl",
"omniborId",
"swhid",
"swid",
"modified",
"pedigree",
Expand Down Expand Up @@ -148,6 +150,10 @@ public String getScopeName() {
private String copyright;
private String cpe;
private String purl;
@VersionFilter(Version.VERSION_16)
private List<String> omniborId;
@VersionFilter(Version.VERSION_16)
private List<String> swhid;
@VersionFilter(Version.VERSION_12)
private Swid swid;
private Boolean modified;
Expand Down Expand Up @@ -439,10 +445,28 @@ public void setData(final ComponentData data) {
this.data = data;
}

@JacksonXmlElementWrapper(useWrapping = false)
public List<String> getOmniborId() {
return omniborId;
}

public void setOmniborId(final List<String> omniborId) {
this.omniborId = omniborId;
}

@JacksonXmlElementWrapper(useWrapping = false)
public List<String> getSwhid() {
return swhid;
}

public void setSwhid(final List<String> 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
Expand All @@ -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) &&
Expand Down

0 comments on commit e77bb4a

Please sign in to comment.