Repository: CycloneDX/cyclonedx-core-java
Pull request #501 (2024-09-07 16:07:43)

Move classes from package
Solves https://github.com/CycloneDX/cyclonedx-core-java/issues/497


Patch:
diff --git a/src/main/java/org/cyclonedx/model/Component.java b/src/main/java/org/cyclonedx/model/Component.java
index 0c4b95f31..1fa882ef1 100644
--- a/src/main/java/org/cyclonedx/model/Component.java
+++ b/src/main/java/org/cyclonedx/model/Component.java
@@ -28,7 +28,7 @@ import org.cyclonedx.Version;
 import org.cyclonedx.model.component.ModelCard;
 import org.cyclonedx.model.component.crypto.CryptoProperties;
 import org.cyclonedx.model.component.Tags;
-import org.cyclonedx.model.component.modelCard.ComponentData;
+import org.cyclonedx.model.component.data.ComponentData;
 import org.cyclonedx.util.deserializer.ExternalReferencesDeserializer;
 import org.cyclonedx.util.deserializer.HashesDeserializer;
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
diff --git a/src/main/java/org/cyclonedx/model/component/modelCard/ComponentData.java b/src/main/java/org/cyclonedx/model/component/data/ComponentData.java
similarity index 93%
rename from src/main/java/org/cyclonedx/model/component/modelCard/ComponentData.java
rename to src/main/java/org/cyclonedx/model/component/data/ComponentData.java
index 1b3d59613..20af2c0ec 100644
--- a/src/main/java/org/cyclonedx/model/component/modelCard/ComponentData.java
+++ b/src/main/java/org/cyclonedx/model/component/data/ComponentData.java
@@ -1,4 +1,4 @@
-package org.cyclonedx.model.component.modelCard;
+package org.cyclonedx.model.component.data;
 
 import java.util.List;
 import java.util.Objects;
@@ -8,9 +8,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import org.cyclonedx.model.ExtensibleElement;
-import org.cyclonedx.model.component.modelCard.data.Content;
-import org.cyclonedx.model.component.modelCard.data.Governance;
-import org.cyclonedx.model.component.modelCard.data.Graphics;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
 @JsonInclude(JsonInclude.Include.NON_EMPTY)
diff --git a/src/main/java/org/cyclonedx/model/component/modelCard/data/Content.java b/src/main/java/org/cyclonedx/model/component/data/Content.java
similarity index 96%
rename from src/main/java/org/cyclonedx/model/component/modelCard/data/Content.java
rename to src/main/java/org/cyclonedx/model/component/data/Content.java
index 4693cb9a6..8177a6847 100644
--- a/src/main/java/org/cyclonedx/model/component/modelCard/data/Content.java
+++ b/src/main/java/org/cyclonedx/model/component/data/Content.java
@@ -1,4 +1,4 @@
-package org.cyclonedx.model.component.modelCard.data;
+package org.cyclonedx.model.component.data;
 
 import java.util.List;
 import java.util.Objects;
diff --git a/src/main/java/org/cyclonedx/model/component/modelCard/DatasetChoice.java b/src/main/java/org/cyclonedx/model/component/data/DatasetChoice.java
similarity index 96%
rename from src/main/java/org/cyclonedx/model/component/modelCard/DatasetChoice.java
rename to src/main/java/org/cyclonedx/model/component/data/DatasetChoice.java
index ee05e70d8..9866e982a 100644
--- a/src/main/java/org/cyclonedx/model/component/modelCard/DatasetChoice.java
+++ b/src/main/java/org/cyclonedx/model/component/data/DatasetChoice.java
@@ -1,4 +1,4 @@
-package org.cyclonedx.model.component.modelCard;
+package org.cyclonedx.model.component.data;
 
 import java.util.Objects;
 
diff --git a/src/main/java/org/cyclonedx/model/component/modelCard/data/Governance.java b/src/main/java/org/cyclonedx/model/component/data/Governance.java
similarity index 97%
rename from src/main/java/org/cyclonedx/model/component/modelCard/data/Governance.java
rename to src/main/java/org/cyclonedx/model/component/data/Governance.java
index fd42c6cb6..4e18412b8 100644
--- a/src/main/java/org/cyclonedx/model/component/modelCard/data/Governance.java
+++ b/src/main/java/org/cyclonedx/model/component/data/Governance.java
@@ -1,4 +1,4 @@
-package org.cyclonedx.model.component.modelCard.data;
+package org.cyclonedx.model.component.data;
 
 import java.util.List;
 import java.util.Objects;
diff --git a/src/main/java/org/cyclonedx/model/component/modelCard/data/Graphics.java b/src/main/java/org/cyclonedx/model/component/data/Graphics.java
similarity index 97%
rename from src/main/java/org/cyclonedx/model/component/modelCard/data/Graphics.java
rename to src/main/java/org/cyclonedx/model/component/data/Graphics.java
index fa0cecbbb..9edc7c671 100644
--- a/src/main/java/org/cyclonedx/model/component/modelCard/data/Graphics.java
+++ b/src/main/java/org/cyclonedx/model/component/data/Graphics.java
@@ -1,4 +1,4 @@
-package org.cyclonedx.model.component.modelCard.data;
+package org.cyclonedx.model.component.data;
 
 import java.util.List;
 import java.util.Objects;
diff --git a/src/main/java/org/cyclonedx/model/component/modelCard/ModelParameters.java b/src/main/java/org/cyclonedx/model/component/modelCard/ModelParameters.java
index a7f256702..70aff3d93 100644
--- a/src/main/java/org/cyclonedx/model/component/modelCard/ModelParameters.java
+++ b/src/main/java/org/cyclonedx/model/component/modelCard/ModelParameters.java
@@ -9,6 +9,7 @@ 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;
+import org.cyclonedx.model.component.data.DatasetChoice;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
 @JsonInclude(JsonInclude.Include.NON_EMPTY)
diff --git a/src/main/java/org/cyclonedx/model/component/modelCard/QuantitativeAnalysis.java b/src/main/java/org/cyclonedx/model/component/modelCard/QuantitativeAnalysis.java
index a241e9d75..bd05995e3 100644
--- a/src/main/java/org/cyclonedx/model/component/modelCard/QuantitativeAnalysis.java
+++ b/src/main/java/org/cyclonedx/model/component/modelCard/QuantitativeAnalysis.java
@@ -9,7 +9,8 @@ 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;
-import org.cyclonedx.model.component.modelCard.data.Graphics;
+import org.cyclonedx.model.component.data.Graphics;
+
 @JsonIgnoreProperties(ignoreUnknown = true)
 @JsonInclude(JsonInclude.Include.NON_EMPTY)
 @JsonPropertyOrder({"performanceMetrics", "graphics"})
diff --git a/src/main/java/org/cyclonedx/util/deserializer/DatasetsChoiceDeserializer.java b/src/main/java/org/cyclonedx/util/deserializer/DatasetsChoiceDeserializer.java
index 94ad01d23..b0b92dd57 100644
--- a/src/main/java/org/cyclonedx/util/deserializer/DatasetsChoiceDeserializer.java
+++ b/src/main/java/org/cyclonedx/util/deserializer/DatasetsChoiceDeserializer.java
@@ -6,8 +6,8 @@ import com.fasterxml.jackson.databind.DeserializationContext;
 import com.fasterxml.jackson.databind.JsonDeserializer;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import org.cyclonedx.model.component.modelCard.ComponentData;
-import org.cyclonedx.model.component.modelCard.DatasetChoice;
+import org.cyclonedx.model.component.data.ComponentData;
+import org.cyclonedx.model.component.data.DatasetChoice;
 
 import java.io.IOException;
 


Test patch:
diff --git a/src/main/java/org/cyclonedx/model/attestation/evidence/Data.java b/src/main/java/org/cyclonedx/model/attestation/evidence/Data.java
index d5f134eb7..9f8a2afbc 100644
--- a/src/main/java/org/cyclonedx/model/attestation/evidence/Data.java
+++ b/src/main/java/org/cyclonedx/model/attestation/evidence/Data.java
@@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
 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.component.modelCard.data.Governance;
+import org.cyclonedx.model.component.data.Governance;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
 @JsonInclude(JsonInclude.Include.NON_EMPTY)