You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-V3-UPGRADE.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,30 @@ With the support of SPDX 3.0, several changes have been made to the library code
4
4
Although we tried to keep breaking changes to a minimum, some of the changes were necessary due to breaking changes in the spec. itself.
5
5
We also took advantage of the changes to fix some annoying design flaws in the previous implementation of the library.
6
6
7
+
## Classes and Methods moved to SPDX Java Core library
8
+
9
+
The SPDX Java Core Library is in a separate repository and jar file.
10
+
11
+
The following classes and methods are moved from `org.spdx.library` to `org.spdx.core`:
12
+
13
+
-`DefaultModelStore`
14
+
- Most exception classes including `InvalidSPDXAnalysisException`
15
+
-`ModelCollection`
16
+
-`ModelSet`
17
+
-`SimpleUriValue`
18
+
-`TypedValue`
19
+
20
+
The packages in `org.spdx.licenseTemplates` are now in the `java-spdx-core` repository.
21
+
22
+
A new class `LicenseTextHelper` was added and the method `isLicenseTextEquivalent(String, String)` along with many supporting methods were moved to `LicenseTextHelper` from `org.spdx.utility.compare.LicenseCompareHelper`.
23
+
24
+
## Changes to SPDX version 2 package, class, and method names
25
+
To support accessing SPDX 2.X model object while updating the library for SPDX 3.0 support, the package names for the SPDX 2.X model objects are now named `org.spdx.library.model.v2.[package]`.
26
+
27
+
Many of the class and property names have been changed to append `CompatV2` to clearly designate a compatible object is being referenced.
28
+
29
+
Also note that the model classes are now stored in a separate repository `spdx-java-model-2_X`.
30
+
7
31
## Changes to ExternalElement and ExternalExtractedLicenseInfo (SPDX Version 2.X classes)
8
32
9
33
- Constructors changed to take the document URI for the document containing the external element or license. This is different from the previous constructor which took the document URI of the document containing the reference and an ID of the form `DocumentRef-XX:[ID]` To accomodate compatibility, the constructors
@@ -12,6 +36,19 @@ will check for the old DocumentRef format and attempt a conversion.
12
36
13
37
Note that this incompatibility was introduced due to using a common mode store API which in some cases will not have the documentUri as a required parameter
14
38
39
+
## Changes to deserialize interface
40
+
Since SPDX documents are not generally required in SPDX spec version 3.0, the SPDX namespace was removed from the return value for deserialized and also removed as a parameter for the serialize method. Serialize will now serialize all objects - which may be multiple SPDX documents.
41
+
42
+
To find all the SPDX documents in a serialization, you can execute:
0 commit comments