3030import org .spdx .core .InvalidSPDXAnalysisException ;
3131import org .spdx .core .InvalidSpdxPropertyException ;
3232import org .spdx .library .model .v2 .SpdxConstantsCompatV2 ;
33- import org .spdx .library .model .v2 .license .ListedLicenseException ;
3433import org .spdx .library .model .v3 .SpdxConstantsV3 ;
35- import org .spdx .library .model .v3 .expandedlicensing .ExpandedLicensingListedLicenseException ;
34+ import org .spdx .library .model .v3 .expandedlicensing .ListedLicenseException ;
3635import org .spdx .storage .PropertyDescriptor ;
3736
3837
@@ -53,30 +52,30 @@ public class ExceptionJson {
5352 static {
5453 Map <PropertyDescriptor , String > descriptorsToValue = new HashMap <>();
5554 Set <PropertyDescriptor > collectionProperties = new HashSet <>();
56- descriptorsToValue .put (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_ADDITION_TEXT , "licenseExceptionText" );
55+ descriptorsToValue .put (SpdxConstantsV3 .PROP_ADDITION_TEXT , "licenseExceptionText" );
5756 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_EXCEPTION_TEXT , "licenseExceptionText" );
5857 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_EXCEPTION_TEXT_HTML , "exceptionTextHtml" );
5958 descriptorsToValue .put (SpdxConstantsV3 .PROP_NAME , "name" );
6059 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_NAME , "name" );
6160 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_LICENSE_EXCEPTION_ID , "licenseExceptionId" );
62- descriptorsToValue .put (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_STANDARD_ADDITION_TEMPLATE , "licenseExceptionTemplate" );
61+ descriptorsToValue .put (SpdxConstantsV3 .PROP_STANDARD_ADDITION_TEMPLATE , "licenseExceptionTemplate" );
6362 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_EXCEPTION_TEMPLATE , "licenseExceptionTemplate" );
6463 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_EXAMPLE , "example" );
65- descriptorsToValue .put (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_IS_DEPRECATED_ADDITION_ID , "isDeprecatedLicenseId" );
64+ descriptorsToValue .put (SpdxConstantsV3 .PROP_IS_DEPRECATED_ADDITION_ID , "isDeprecatedLicenseId" );
6665 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_LIC_ID_DEPRECATED , "isDeprecatedLicenseId" );
67- descriptorsToValue .put (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_DEPRECATED_VERSION , "deprecatedVersion" );
66+ descriptorsToValue .put (SpdxConstantsV3 .PROP_DEPRECATED_VERSION , "deprecatedVersion" );
6867 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_LIC_DEPRECATED_VERSION , "deprecatedVersion" );
6968 descriptorsToValue .put (SpdxConstantsV3 .PROP_COMMENT , "comment" );
7069 descriptorsToValue .put (SpdxConstantsCompatV2 .RDFS_PROP_COMMENT , "comment" );
7170 descriptorsToValue .put (SpdxConstantsCompatV2 .PROP_LICENSE_EXCEPTION_ID , "licenseExceptionId" );
72- descriptorsToValue .put (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_SEE_ALSO , "seeAlso" );
73- collectionProperties .add (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_SEE_ALSO );
71+ descriptorsToValue .put (SpdxConstantsV3 .PROP_SEE_ALSO , "seeAlso" );
72+ collectionProperties .add (SpdxConstantsV3 .PROP_SEE_ALSO );
7473 descriptorsToValue .put (SpdxConstantsCompatV2 .RDFS_PROP_SEE_ALSO , "seeAlso" );
7574 collectionProperties .add (SpdxConstantsCompatV2 .RDFS_PROP_SEE_ALSO );
7675
77- descriptorsToValue .put (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_LICENSE_XML , "licenseXml" );
78- descriptorsToValue .put (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_OBSOLETED_BY , "obsoletedBy" );
79- descriptorsToValue .put (SpdxConstantsV3 .PROP_EXPANDED_LICENSING_LIST_VERSION_ADDED , "listVersionAdded" );
76+ descriptorsToValue .put (SpdxConstantsV3 .PROP_LICENSE_XML , "licenseXml" );
77+ descriptorsToValue .put (SpdxConstantsV3 .PROP_OBSOLETED_BY , "obsoletedBy" );
78+ descriptorsToValue .put (SpdxConstantsV3 .PROP_LIST_VERSION_ADDED , "listVersionAdded" );
8079
8180 // The following are not implemented in the JSON - they are added so there is no errors when creating V3 object classes
8281 descriptorsToValue .put (SpdxConstantsV3 .PROP_EXTERNAL_REF , "externalRef" );
@@ -289,23 +288,23 @@ public void removeProperty(PropertyDescriptor propertyDescriptor) throws Invalid
289288
290289 }
291290
292- public void copyFrom (ExpandedLicensingListedLicenseException fromException ) throws InvalidSPDXAnalysisException {
291+ public void copyFrom (ListedLicenseException fromException ) throws InvalidSPDXAnalysisException {
293292 Optional <String > comment = fromException .getComment ();
294293 this .comment = comment .orElse (null );
295- this .deprecatedVersion = fromException .getExpandedLicensingDeprecatedVersion ().orElse (null );
296- this .isDeprecatedLicenseId = fromException .getExpandedLicensingIsDeprecatedAdditionId ().orElse (false );
294+ this .deprecatedVersion = fromException .getDeprecatedVersion ().orElse (null );
295+ this .isDeprecatedLicenseId = fromException .getIsDeprecatedAdditionId ().orElse (false );
297296 this .licenseExceptionId = SpdxListedLicenseModelStore .objectUriToLicenseOrExceptionId (fromException .getObjectUri ());
298- this .licenseExceptionTemplate = fromException .getExpandedLicensingStandardAdditionTemplate ().orElse (null );
299- this .licenseExceptionText = fromException .getExpandedLicensingAdditionText ();
297+ this .licenseExceptionTemplate = fromException .getStandardAdditionTemplate ().orElse (null );
298+ this .licenseExceptionText = fromException .getAdditionText ();
300299 this .name = fromException .getName ().orElse (null );
301- this .seeAlso = new ArrayList <String >(fromException .getExpandedLicensingSeeAlsos ());
302- this .obsoletedBy = fromException .getExpandedLicensingObsoletedBy ().orElse (null );
303- this .listVersionAdded = fromException .getExpandedLicensingListVersionAdded ().orElse (null );
304- this .licenseXml = fromException .getExpandedLicensingLicenseXml ().orElse (null );
300+ this .seeAlso = new ArrayList <String >(fromException .getSeeAlsos ());
301+ this .obsoletedBy = fromException .getObsoletedBy ().orElse (null );
302+ this .listVersionAdded = fromException .getListVersionAdded ().orElse (null );
303+ this .licenseXml = fromException .getLicenseXml ().orElse (null );
305304 }
306305
307306 @ SuppressWarnings ("deprecation" )
308- public void copyFrom (ListedLicenseException fromException ) throws InvalidSPDXAnalysisException {
307+ public void copyFrom (org . spdx . library . model . v2 . license . ListedLicenseException fromException ) throws InvalidSPDXAnalysisException {
309308 this .comment = null ;
310309 this .licenseComments = fromException .getComment ();
311310 if (Objects .nonNull (this .licenseComments ) && this .licenseComments .isEmpty ()) {
@@ -372,14 +371,14 @@ public boolean isPropertyValueAssignableTo(PropertyDescriptor propertyDescriptor
372371
373372 public boolean isCollectionMembersAssignableTo (PropertyDescriptor propertyDescriptor , Class <?> clazz ) {
374373 if (SpdxConstantsCompatV2 .RDFS_PROP_SEE_ALSO .equals (propertyDescriptor ) ||
375- SpdxConstantsV3 .PROP_EXPANDED_LICENSING_SEE_ALSO .equals (propertyDescriptor )) {
374+ SpdxConstantsV3 .PROP_SEE_ALSO .equals (propertyDescriptor )) {
376375 return String .class .isAssignableFrom (clazz );
377376 } else if (SpdxConstantsV3 .PROP_EXTERNAL_REF .equals (propertyDescriptor )) {
378377 return org .spdx .library .model .v3 .core .ExternalRef .class .isAssignableFrom (clazz );
379378 } else if (SpdxConstantsV3 .PROP_VERIFIED_USING .equals (propertyDescriptor )) {
380379 return org .spdx .library .model .v3 .core .IntegrityMethod .class .isAssignableFrom (clazz );
381380 } else if (SpdxConstantsV3 .PROP_EXTENSION .equals (propertyDescriptor )) {
382- return org .spdx .library .model .v3 .extension .ExtensionExtension .class .isAssignableFrom (clazz );
381+ return org .spdx .library .model .v3 .extension .Extension .class .isAssignableFrom (clazz );
383382 } else if (SpdxConstantsV3 .PROP_EXTERNAL_IDENTIFIER .equals (propertyDescriptor )) {
384383 return org .spdx .library .model .v3 .core .ExternalIdentifier .class .isAssignableFrom (clazz );
385384 } else if (SpdxConstantsV3 .PROP_CREATED_USING .equals (propertyDescriptor )) {
0 commit comments