-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
586 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package org.cyclonedx.model.evidence; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; | ||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; | ||
import org.cyclonedx.model.ExtensibleElement; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public class Frame extends ExtensibleElement | ||
{ | ||
private String packageFrame; | ||
|
||
private String module; | ||
|
||
private String function; | ||
|
||
private List<String> parameters; | ||
|
||
private Integer line; | ||
|
||
private Integer column; | ||
|
||
private String fullFilename; | ||
|
||
public String getPackageFrame() { | ||
return packageFrame; | ||
} | ||
|
||
public void setPackageFrame(final String packageFrame) { | ||
this.packageFrame = packageFrame; | ||
} | ||
|
||
public String getModule() { | ||
return module; | ||
} | ||
|
||
public void setModule(final String module) { | ||
this.module = module; | ||
} | ||
|
||
public String getFunction() { | ||
return function; | ||
} | ||
|
||
public void setFunction(final String function) { | ||
this.function = function; | ||
} | ||
|
||
@JsonProperty("parameters") | ||
@JacksonXmlElementWrapper(localName = "parameters") | ||
@JacksonXmlProperty(localName = "parameter") | ||
public List<String> getParameters() { | ||
return parameters; | ||
} | ||
|
||
public void setParameters(final List<String> parameters) { | ||
this.parameters = parameters; | ||
} | ||
|
||
public Integer getLine() { | ||
return line; | ||
} | ||
|
||
public void setLine(final Integer line) { | ||
this.line = line; | ||
} | ||
|
||
public Integer getColumn() { | ||
return column; | ||
} | ||
|
||
public void setColumn(final Integer column) { | ||
this.column = column; | ||
} | ||
|
||
public String getFullFilename() { | ||
return fullFilename; | ||
} | ||
|
||
public void setFullFilename(final String fullFilename) { | ||
this.fullFilename = fullFilename; | ||
} | ||
} |
126 changes: 126 additions & 0 deletions
126
src/main/java/org/cyclonedx/model/evidence/Identity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
package org.cyclonedx.model.evidence; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonGetter; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; | ||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; | ||
import org.cyclonedx.model.ExtensibleElement; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonPropertyOrder({"field", "confidence", "methods", "tools"}) | ||
public class Identity extends ExtensibleElement | ||
{ | ||
public Field field; | ||
|
||
public Double confidence; | ||
|
||
public List<Method> methods; | ||
|
||
public List<Tool> tools; | ||
|
||
public enum Field { | ||
@JsonProperty("group") | ||
GROUP("group"), | ||
@JsonProperty("name") | ||
NAME("name"), | ||
@JsonProperty("version") | ||
VERSION("version"), | ||
@JsonProperty("purl") | ||
PURL("purl"), | ||
@JsonProperty("cpe") | ||
CPE( "cpe"), | ||
@JsonProperty("swid") | ||
SWID("swid"), | ||
@JsonProperty("hash") | ||
HASH( "hash"); | ||
|
||
private final String name; | ||
|
||
public String getTypeName() { | ||
return this.name; | ||
} | ||
|
||
Field(String name) { | ||
this.name = name; | ||
} | ||
} | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public static class Tool { | ||
@JacksonXmlProperty(isAttribute = true, localName = "ref") | ||
@JsonProperty("ref") | ||
private String ref; | ||
|
||
|
||
private String bomLink; | ||
|
||
public Tool() { | ||
} | ||
|
||
public Tool(String ref) { | ||
this.ref = ref; | ||
} | ||
|
||
public String getRef() { | ||
return ref; | ||
} | ||
|
||
public void setRef(final String ref) { | ||
this.ref = ref; | ||
} | ||
|
||
@JsonProperty("bomLinkElement") | ||
public String getBomLink() { | ||
return bomLink; | ||
} | ||
|
||
public void setBomLink(final String bomLink) { | ||
this.bomLink = bomLink; | ||
} | ||
} | ||
|
||
public Field getField() { | ||
return field; | ||
} | ||
|
||
public void setField(final Field field) { | ||
this.field = field; | ||
} | ||
|
||
public Double getConfidence() { | ||
return confidence; | ||
} | ||
|
||
public void setConfidence(final Double confidence) { | ||
this.confidence = confidence; | ||
} | ||
|
||
@JsonProperty("methods") | ||
@JacksonXmlElementWrapper(localName = "methods") | ||
@JacksonXmlProperty(localName = "method") | ||
public List<Method> getMethods() { | ||
return methods; | ||
} | ||
|
||
public void setMethods(final List<Method> methods) { | ||
this.methods = methods; | ||
} | ||
|
||
@JsonProperty("tools") | ||
@JacksonXmlElementWrapper(localName = "tools") | ||
@JacksonXmlProperty(localName = "tool") | ||
public List<Tool> getTools() { | ||
return tools; | ||
} | ||
|
||
public void setTools(final List<Tool> tools) { | ||
this.tools = tools; | ||
} | ||
} |
Oops, something went wrong.