-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(SPDX): Use new SPDX library (#1496) and release pages for showin…
…g SPDX/SPDX Lite data (#1240) Signed-off-by: tuan99123 <tuan2.nguyennhu@toshiba.co.jp>
- Loading branch information
Showing
133 changed files
with
13,896 additions
and
268 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
43 changes: 43 additions & 0 deletions
43
...rc/main/java/org/eclipse/sw360/components/summary/DocumentCreationInformationSummary.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,43 @@ | ||
/* | ||
* Copyright TOSHIBA CORPORATION, 2021. Part of the SW360 Portal Project. | ||
* Copyright Toshiba Software Development (Vietnam) Co., Ltd., 2021. Part of the SW360 Portal Project. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.sw360.components.summary; | ||
|
||
import org.eclipse.sw360.datahandler.thrift.spdx.documentcreationinformation.*; | ||
|
||
import static org.eclipse.sw360.datahandler.thrift.ThriftUtils.copyField; | ||
|
||
/** | ||
* Created by HieuPV on 22/07/21. | ||
* | ||
* @author hieu1.phamvan@toshiba.co.jp | ||
*/ | ||
public class DocumentCreationInformationSummary extends DocumentSummary<DocumentCreationInformation> { | ||
|
||
@Override | ||
protected DocumentCreationInformation summary(SummaryType type, DocumentCreationInformation document) { | ||
// Copy required details | ||
DocumentCreationInformation copy = new DocumentCreationInformation(); | ||
|
||
switch (type) { | ||
case SUMMARY: | ||
copyField(document, copy, DocumentCreationInformation._Fields.ID); | ||
copyField(document, copy, DocumentCreationInformation._Fields.SPDXID); | ||
copyField(document, copy, DocumentCreationInformation._Fields.NAME); | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
return copy; | ||
} | ||
|
||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...src-common/src/main/java/org/eclipse/sw360/components/summary/FileInformationSummary.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,43 @@ | ||
/* | ||
* Copyright TOSHIBA CORPORATION, 2021. Part of the SW360 Portal Project. | ||
* Copyright Toshiba Software Development (Vietnam) Co., Ltd., 2021. Part of the SW360 Portal Project. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.sw360.components.summary; | ||
|
||
import org.eclipse.sw360.datahandler.thrift.spdx.fileinformation.*; | ||
|
||
import static org.eclipse.sw360.datahandler.thrift.ThriftUtils.copyField; | ||
|
||
/** | ||
* Created by HieuPV on 22/07/21. | ||
* | ||
* @author hieu1.phamvan@toshiba.co.jp | ||
*/ | ||
public class FileInformationSummary extends DocumentSummary<FileInformation> { | ||
|
||
@Override | ||
protected FileInformation summary(SummaryType type, FileInformation document) { | ||
// Copy required details | ||
FileInformation copy = new FileInformation(); | ||
|
||
switch (type) { | ||
case SUMMARY: | ||
copyField(document, copy, FileInformation._Fields.ID); | ||
copyField(document, copy, FileInformation._Fields.SPDXID); | ||
copyField(document, copy, FileInformation._Fields.FILE_NAME); | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
return copy; | ||
} | ||
|
||
|
||
} |
42 changes: 42 additions & 0 deletions
42
...-common/src/main/java/org/eclipse/sw360/components/summary/PackageInformationSummary.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,42 @@ | ||
/* | ||
* Copyright TOSHIBA CORPORATION, 2021. Part of the SW360 Portal Project. | ||
* Copyright Toshiba Software Development (Vietnam) Co., Ltd., 2021. Part of the SW360 Portal Project. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.sw360.components.summary; | ||
|
||
import org.eclipse.sw360.datahandler.thrift.spdx.spdxpackageinfo.*; | ||
|
||
import static org.eclipse.sw360.datahandler.thrift.ThriftUtils.copyField; | ||
|
||
/** | ||
* Created by HieuPV on 22/07/21. | ||
* | ||
* @author hieu1.phamvan@toshiba.co.jp | ||
*/ | ||
public class PackageInformationSummary extends DocumentSummary<PackageInformation> { | ||
|
||
@Override | ||
protected PackageInformation summary(SummaryType type, PackageInformation document) { | ||
// Copy required details | ||
PackageInformation copy = new PackageInformation(); | ||
|
||
switch (type) { | ||
case SUMMARY: | ||
copyField(document, copy, PackageInformation._Fields.ID); | ||
copyField(document, copy, PackageInformation._Fields.SPDXID); | ||
copyField(document, copy, PackageInformation._Fields.NAME); | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
return copy; | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...nd/src-common/src/main/java/org/eclipse/sw360/components/summary/SpdxDocumentSummary.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,43 @@ | ||
/* | ||
* Copyright TOSHIBA CORPORATION, 2021. Part of the SW360 Portal Project. | ||
* Copyright Toshiba Software Development (Vietnam) Co., Ltd., 2021. Part of the SW360 Portal Project. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.sw360.components.summary; | ||
|
||
import org.eclipse.sw360.datahandler.thrift.spdx.spdxdocument.SPDXDocument; | ||
|
||
import static org.eclipse.sw360.datahandler.thrift.ThriftUtils.copyField; | ||
|
||
/** | ||
* Created by HieuPV on 22/07/21. | ||
* | ||
* @author hieu1.phamvan@toshiba.co.jp | ||
*/ | ||
public class SpdxDocumentSummary extends DocumentSummary<SPDXDocument> { | ||
|
||
@Override | ||
protected SPDXDocument summary(SummaryType type, SPDXDocument document) { | ||
// Copy required details | ||
SPDXDocument copy = new SPDXDocument(); | ||
|
||
switch (type) { | ||
case SUMMARY: | ||
copyField(document, copy, SPDXDocument._Fields.ID); | ||
copyField(document, copy, SPDXDocument._Fields.SPDX_DOCUMENT_CREATION_INFO_ID); | ||
copyField(document, copy, SPDXDocument._Fields.SPDX_PACKAGE_INFO_IDS); | ||
copyField(document, copy, SPDXDocument._Fields.SPDX_FILE_INFO_IDS); | ||
default: | ||
break; | ||
} | ||
|
||
return copy; | ||
} | ||
|
||
|
||
} |
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
Oops, something went wrong.