forked from eclipse-sw360/sw360
-
Notifications
You must be signed in to change notification settings - Fork 4
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 (eclipse-sw360#1496) and release pag…
…es for showing SPDX/SPDX Lite data (eclipse-sw360#1240) and Import Export Release Signed-off-by: Nguyen Nhu Tuan <tuan2.nguyennhu@toshiba.co.jp>
- Loading branch information
Showing
127 changed files
with
13,460 additions
and
251 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
38 changes: 38 additions & 0 deletions
38
...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,38 @@ | ||
/* | ||
* Copyright TOSHIBA CORPORATION, 2022. Part of the SW360 Portal Project. | ||
* Copyright Toshiba Software Development (Vietnam) Co., Ltd., 2022. 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; | ||
|
||
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; | ||
} | ||
|
||
|
||
} |
38 changes: 38 additions & 0 deletions
38
...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,38 @@ | ||
/* | ||
* Copyright TOSHIBA CORPORATION, 2022. Part of the SW360 Portal Project. | ||
* Copyright Toshiba Software Development (Vietnam) Co., Ltd., 2022. 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; | ||
|
||
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; | ||
} | ||
|
||
|
||
} |
37 changes: 37 additions & 0 deletions
37
...-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,37 @@ | ||
/* | ||
* Copyright TOSHIBA CORPORATION, 2022. Part of the SW360 Portal Project. | ||
* Copyright Toshiba Software Development (Vietnam) Co., Ltd., 2022. 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; | ||
|
||
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; | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
...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,38 @@ | ||
/* | ||
* Copyright TOSHIBA CORPORATION, 2022. Part of the SW360 Portal Project. | ||
* Copyright Toshiba Software Development (Vietnam) Co., Ltd., 2022. 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; | ||
|
||
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.