Package org.spdx.cdx2spdx
Class CycloneToSpdx
java.lang.Object
org.spdx.cdx2spdx.CycloneToSpdx
public class CycloneToSpdx extends Object
Converts between CycloneDX and SPDX
Based on the spreadsheet https://docs.google.com/spreadsheets/d/1PIiSYLJHlt8djG5OoOYniy_I-J31UMhBKQ62UUBHKVA/edit?usp=sharing
- Author:
- Gary O'Neall
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCycloneToSpdx.SerFileType -
Constructor Summary
Constructors Constructor Description CycloneToSpdx() -
Method Summary
Modifier and Type Method Description static List<String>cycloneDxToSpdx(String cycloneDxFilePath, String spdxFilePath)static CycloneToSpdx.SerFileTypefileToFileType(File file)static org.spdx.storage.ISerializableModelStorefileTypeToStore(CycloneToSpdx.SerFileType fileType)static voidmain(String[] args)
-
Constructor Details
-
CycloneToSpdx
public CycloneToSpdx()
-
-
Method Details
-
fileTypeToStore
public static org.spdx.storage.ISerializableModelStore fileTypeToStore(CycloneToSpdx.SerFileType fileType) throws org.spdx.library.InvalidSPDXAnalysisException- Parameters:
fileType- file type for the store- Returns:
- the appropriate in memory based model store which supports serialization for the fileType
- Throws:
org.spdx.library.InvalidSPDXAnalysisException
-
fileToFileType
- Parameters:
file-- Returns:
- the file type based on the file name and file extension
- Throws:
InvalidFileNameException
-
main
- Parameters:
args- args[0] filename to convert from; args[1] filename to convert to
-
cycloneDxToSpdx
public static List<String> cycloneDxToSpdx(String cycloneDxFilePath, String spdxFilePath) throws CycloneConversionException- Parameters:
cycloneDxFilePath-spdxFilePath-- Throws:
CycloneConversionException
-